Commit graph

43 commits

Author SHA1 Message Date
Sebastian Dröge 567ce0a3bf Group and merge imports in all manual code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182>
2023-01-04 13:25:17 +02:00
Sebastian Dröge a1165a7456 gstreamer: Add bin/pipeline builders
And also implement the Default trait for them.
2022-10-22 17:36:36 +03:00
Sebastian Dröge 7423b1dea6 elementfactory: Change make() / create() to builders and keep the old variants as create_with_name() / make_with_name()
As a side-effect, this also now includes the element factory name in the
error messages instead of giving the same error string for every
factory.

Partially fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/318

Also let them all go through the same, single object construction code.
2022-10-19 17:48:39 +03:00
Sebastian Dröge 4651c9db4d Update minimum supported version to 1.14
This is the version that is available in Ubuntu 18.04.
2022-04-07 12:45:47 +03:00
Sebastian Dröge f31aa2efee examples: Update for glib::Boxed derive macro rename 2021-11-22 10:54:52 +02:00
Bilal Elmoussaoui 213020165a manual changes post ObjectExt improvements 2021-11-08 14:42:59 +01:00
Sebastian Dröge 92f9f3be39 Remove various unnecessary & from property/structure field related code 2021-10-24 20:52:23 +03:00
Sebastian Dröge 8cc018c164 examples: Move to the new, simplified encoding profile API 2021-10-24 18:45:38 +03:00
François Laignel e31ce9d07b Manual ClockTime updates 2021-06-04 22:09:38 +02:00
Marijn Suijten f89e840d27 Remove redundant prelude imports
When importing the prelude of a crate like `gst` the `glib` prelude is
provided too.  Shedding these imports saves quite a few lines and
adheres to keeping it simple; we're not reexporting base/parent preludes
for no reason :)
2021-04-29 12:05:13 +02:00
Sebastian Dröge eda1d3d4a7 Update for Value trait refactoring 2021-04-25 14:45:08 +03:00
François Laignel 1395d773c3 manual fixes remove get prefix round 2 2021-04-20 18:18:02 +02:00
François Laignel 6ab9164dca fix-getters-calls 0.3.0 pass 2021-04-20 18:18:02 +02:00
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 0d5a488b86 examples: Remove two now-unused imports 2021-01-29 10:18:10 +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 5ad45cef42 examples: Rename crates in Cargo.toml and get rid of extern crate 2020-10-10 11:10:20 +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
Vikram Fugro 0ca6be25c5 examples: remove the use of description() in Error
Replace the use of deprecated method "Error::description()"
with to_string() method
2020-04-01 17:30:17 +03:00
Sebastian Dröge ca6bcf36ab examples: Stop using deprecated Error::description() 2020-03-19 14:20:52 +02:00
Sebastian Dröge d0bfdda97f examples: Update for new GLib boxed deriving API 2020-03-19 14:20:52 +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
Sebastian Dröge 107ae588f2 examples: Fix various clippy warnings 2019-10-04 11:01:55 +03:00
Sebastian Dröge 39ef834cfe examples: Fix compilation after GValue API changes 2019-08-13 18:30:40 +03:00
Sebastian Dröge 86a31b4139 Silence/fix various clippy warnings 2019-03-07 14:05:35 +02:00
François Laignel 948fb2ae4b Replace XXXReturn with Result<XXXSuccess, XXXError>
... in function signatures.

These breaking changes aim at improving usability by allowing users
to take advantage of Rust error management features sur as `ok_or`,
`map_err`, `expect` and the `?` operator. See the `examples` and
`tutorials` to get an idea of the impacts.
2019-01-11 18:33:04 +01:00
Philippe Normand 98d0bc01ac examples: Fix v1.10 feature build
GLib-rs macros are needed for this feature.
2019-01-03 22:01:41 +00:00
Philippe Normand bef6d741d3 Fix examples and tutorials for GString support 2019-01-03 22:01:41 +00:00
Sebastian Dröge 69af6a5975 bus: Add iter() and iter_timed() that return Iterators around the corresponding pop() functions
And make use of them in the examples where it makes sense.
2018-12-28 00:06:03 +02:00
Markus Ebner 466e02df3a Add verbose documentation to the examples
Added verbose documentation to all of the repository's examples.
2018-11-29 19:59:57 +01:00
Sebastian Dröge db6a6543b4 Update for some more glib-rs API changes 2018-11-29 00:22:43 +02:00
Sebastian Dröge ab626adc4a Use new GLib boxed-type definition feature for carrying Rust types over GStreamer error messages 2018-11-28 08:57:17 +02:00
Sebastian Dröge 8a6bcbcedb Run through rustfmt once again 2018-10-28 13:47:02 +00:00
Sebastian Dröge eb0a804a50 Run everything through latest rustfmt 2018-10-08 15:02:23 +03:00
Sebastian Dröge 2c7dff3b45 Run everything through rustfmt again 2018-10-08 09:32:08 +03:00
Sebastian Dröge 2d45d3840f Clean up imports a bit 2018-10-08 09:31:39 +03:00
Thiago Santos 382138b75a More encoding_profile binding improvements
- enable is_equal function again (unsure why it was disabled)
- remove restriction-caps property, encoding-profile objects are
immutable
- remove cast need by using IsA<EncodingProfile> in parameters and
returning the correct type of encodingprofile subclass from the build()
functions. It used a internal hack for storing those IsA objects in
order to keep the API clean and ready to be used, this should be sorted
out as soon as we figure out how to store them in the buidlers.
- encodebin example: remove Result error propagation when it is caused
by programming mistakes. A panic will happen in those cases.
- run rustfmt
2018-10-08 09:06:46 +03:00
Thiago Santos f3c8dfeb9b EncodingProfile: remove setters and constructors, use builders
Provide builders for the EncodingProfile so that the created objects are
imutable and can have the Send and Sync traits
2018-10-08 09:06:46 +03:00
Thiago Santos 861f052c3d encoding_profile: add builders for all types 2018-10-08 09:06:46 +03:00
Thiago Santos 67bdfee1f6 encodebin: add an example for encodebin usage 2018-10-08 09:06:46 +03:00