Commit graph

22 commits

Author SHA1 Message Date
François Laignel
53be8e5f58 fix-getters-{def,calls} pass 2021-04-13 17:54:40 +02:00
Marijn Suijten
d8cd01027e examples: Fix some typos 2021-04-10 13:42:04 +02:00
Sebastian Dröge
ea239c587e Store panic information not in a custom instance struct but in the instance data provided by the subclassing infrastructure
This scales better as there will only be only such data instead of two
or more when having deeper class hierarchies with multiple Rust
elements, and also makes it unnecessary to use a special instance struct
so the default works well.
2021-03-09 16:36:35 +02:00
Sebastian Dröge
b8c20c07ce Update for new #[glib::object_subclass] attribute macro 2021-03-07 13:08:06 +02:00
Sebastian Dröge
e11b12df7c gstreamer: Provide class metadata, pad templates and basetransform configuration via trait methods
This is closer to how this works in Python and also how properties and
signals work now in the glib bindings.

class_init() only has to be implemented for more special uses now.
2021-01-25 13:56:55 +02:00
Sebastian Dröge
53aae7ddba Remove gst_ prefix from all macros except for the logging macros
The latter stay e.g. gst_debug! to be more clear and not conflict with
e.g. the debug! macro from the log crate.
2020-12-20 19:40:34 +02:00
Sebastian Dröge
ce1148b474 Update everything for glib macro renamings 2020-12-18 00:56:47 +02:00
Sebastian Dröge
f3b5340875 Update for new simplified glib::Object::new() API 2020-12-17 17:43:17 +02:00
Sebastian Dröge
145f0ed6f5 gstreamer-base: Make virtual methods take wrapper of type, not parent 2020-11-14 19:39:27 +02:00
Sebastian Dröge
1d53b66858 Fix compilation with GLib subclassing changes 2020-11-14 19:39:27 +02:00
Sebastian Dröge
447e53bcca examples: Update for simplified glib_wrapper! macro for subclasses 2020-11-05 16:41:48 +02:00
Sebastian Dröge
5ad45cef42 examples: Rename crates in Cargo.toml and get rid of extern crate 2020-10-10 11:10:20 +03:00
Sebastian Dröge
2ac5a68896 examples: Remove unused imports
Not required anymore after a fix in glib.
2020-09-01 09:53:09 +03:00
Sebastian Dröge
4f5b2f5060 Update for removal of ObjectImpl::get_type_data() 2020-07-26 18:02:05 +03:00
Otavio Salvador
2022890766 examples: Move out from 'failure' crate as it is deprecated
The 'failure' crate has been stale for quite some time and better
alternatives has been developed since its introduction. We choose the
'anyhow' and 'derive_more' to replace it.
2020-05-04 11:16:50 -03:00
Otavio Salvador
6fc70ee6b6 examples: Move to 2018 edition
This code rework the examples to use the new 2018 edition and also
rework the code to avoid using unnecessary 'extern crate' calls.

The 'use extern crate gstreamer as gst', as well as the other gstramer
related crates, were kept, otherwise we'd need to do it on 'Cargo.toml'
but it would make it more difficult to figure out the respective crate
name.
2020-05-03 18:42:57 -03:00
Sebastian Dröge
ca6bcf36ab examples: Stop using deprecated Error::description() 2020-03-19 14:20:52 +02:00
Sebastian Dröge
7230aee069 Switch everything from lazy_static to once_cell::Lazy
Fewer macros, faster compile-time and the Lazy type will likely end up
in the standard library in a similar form to this.
2020-01-22 19:57:41 +02:00
Sebastian Dröge
69be1ce2fc Fix various new clippy warnings from 1.40 2019-12-22 12:10:27 +02:00
Sebastian Dröge
be3c378f28 Use Results instead of Options where they signal an error instead of just a missing value
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-17 22:21:28 +02:00
Tony Jinwoo Ahn
c563fb6f44 gstreamer-audio/audio_info: Change functions from returning Option to Result
Partial work for:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-14 14:10:06 +00:00
Sebastian Dröge
ccd01b93bf examples: Add an example for subclassing and providing Rust API on the subclass 2019-10-30 16:07:23 +01:00