Commit graph

41 commits

Author SHA1 Message Date
Guillaume Gomez
ac9b1e881c Add missing #[must_use] attribute for clippy 2022-01-04 19:43:07 +01:00
Sebastian Dröge
ee1a5e8395 Add #[must_use] attribute to many builders 2021-12-04 10:26:08 +02:00
Sebastian Dröge
502a0080f0 pbutils/encoding_profile: Fix up initialization assertion macros 2021-10-24 20:52:23 +03:00
Sebastian Dröge
18c7c6a3a6 pbutils/encoding_profile: Silence various missing doc alias warnings
They're all wrong because they're on private functions. The public
functions all have the correct doc aliases already.
2021-10-24 20:52:23 +03:00
Sebastian Dröge
fa72d53437 pbutils/encoding_profile: Remove unnecessary lifetime annotations 2021-10-24 20:52:23 +03:00
Sebastian Dröge
b4a3738b82 Move more code to caps/structure builders
Instead of the new() functions requiring slices. The code reads cleaner.
2021-10-24 18:57:15 +03:00
Sebastian Dröge
984ab87c79 pbutils/encoding_profile: Require passing the format caps to the builders and make construction infallible
There's no way it can fail if a format is provided and we don't pass
random pointers around.
2021-10-24 18:39:55 +03:00
Sebastian Dröge
06916b23c7 pbutils/encoding_profile: Make the profile builder new() functions private and use the builder() functions on the main types
Also don't re-export the builder types at the crate root.
Fewer types to juggle in application code.
2021-10-24 18:29:03 +03:00
Sebastian Dröge
9e1fb4570f pbutils/encoding_profile: Move doc aliases to the correct function definitions/declarations
And also add `::builder()` functions on the audio/video/container
encoding profile types.
2021-10-24 18:23:45 +03:00
Sebastian Dröge
e95a75fdab pbutils/encoding_profile: Add support for 1.18 single-segment API 2021-10-24 18:15:53 +03:00
Marijn Suijten
540062b97c Add missing doc aliases to manual code
Using the same script as [1], called with:

    python3 add_doc_alias.py gstreamer*/**/src

[1]: https://github.com/gtk-rs/gtk-rs-core/pull/83
2021-05-19 22:36:18 +02:00
François Laignel
49583597ed manual code: fix-getters-def doc aliases 2021-05-03 20:46:57 +02:00
Bilal Elmoussaoui
890cd03632 manual renames of to_glib into into_glib 2021-04-27 19:44:41 +02:00
Sebastian Dröge
1d59ea91c5 Clean up various imports everywhere 2021-04-26 15:16:58 +03:00
Marijn Suijten
2c40ce10ab gstreamer,pbutils: Only import traits from prelude
Future changes will make all traits - both manual and auto - unavailable
from the crate root; they can then only be imported from the `prelude`.
2021-04-26 13:24:02 +02:00
François Laignel
99616ec0b4 post fix-getters manual updates 2021-04-13 17:54:40 +02:00
François Laignel
53be8e5f58 fix-getters-{def,calls} pass 2021-04-13 17:54:40 +02:00
Sebastian Dröge
ce1148b474 Update everything for glib macro renamings 2020-12-18 00:56:47 +02:00
Guillaume Gomez
ff5a36561a Fix license header situation 2020-12-15 11:53:31 +01:00
Sebastian Dröge
0c17f32eee gstreamer-pbutils: Update manual code to 2018 edition 2020-11-22 19:15:20 +02:00
Sebastian Dröge
a426c03720 Fix various new clippy warnings 2020-07-28 14:13:22 +03:00
Sebastian Dröge
d417656707 Use thiserror more widely for deriving Error/Display impls of error types 2020-05-26 19:26:35 +03:00
Guillaume Gomez
c07fe14191 gstreamer*: Add missing init checks 2020-04-12 17:25:54 +03:00
Sebastian Dröge
94ace06883 Remove deprecated std::error::Error::description() impls 2020-04-11 19:39:04 +03:00
Guillaume Desmottes
50234bb5e6 pbutils: encoding_profile: remove get_restriction() from Container API
Same rationale as the preceding commit, restriction isn't meant to be
used with container profiles.
2020-02-26 15:48:53 +05:30
Guillaume Desmottes
745aee629b pbutils: encoding_profile: remove restriction setters from Container API
As stated in the GstEncodingProfile documentation, restrictions are not
meant to be used for container profiles. So remove the APIs allowing to
set one when building and to change it later on.
2020-02-26 15:47:09 +05:30
Sebastian Dröge
69be1ce2fc Fix various new clippy warnings from 1.40 2019-12-22 12:10:27 +02:00
Sebastian Dröge
856a5a25e8 pbutils: Fix build after EncodingContainerProfileExt stopped being generated
It's a final type and there can't be any subclasses, so there should not
be any extension trait.
2019-06-18 14:01:52 +03:00
Sebastian Dröge
d1e562b9f6 Explicitly add dyn keyword to trait objects
Trait objects without are deprecated with the latest nightly and this
makes it more clear that we're doing dynamic dispatch anyway.
2019-06-06 09:09:34 +03:00
Sebastian Dröge
86e969d964 Remove various Into<Option<_>> trait bounds from functions
In autogenerated code these were already replaced but some manual code
still kept them.
2019-05-24 10:04:16 +00:00
Sebastian Dröge
e7898c1b24 Update manual code 2019-04-15 19:19:19 +03:00
Sebastian Dröge
86a31b4139 Silence/fix various clippy warnings 2019-03-07 14:05:35 +02:00
Sebastian Dröge
bd0cbe99b3 Add more Debug impls to everything possible 2019-01-22 17:46:08 +02:00
Sebastian Dröge
931c485150 Update manual code for glib API changes 2019-01-16 13:52:56 +02:00
François Laignel
226070d216 BoolError: update to new build macros
See https://github.com/gtk-rs/glib/pull/419
2019-01-04 16:02:40 +01:00
Sebastian Dröge
70fde430c9 Add copyright header 2018-10-08 09:22:32 +03:00
Sebastian Dröge
8e413fa3c9 Store encoding profiles inside the container builder as a Vec 2018-10-08 09:17:26 +03:00
Sebastian Dröge
5d17718e3b Remove unnecessary mut 2018-10-08 09:09:14 +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
43235969be encoding_profile: set_restriction is transfer-full not transfer-none
Avoid refcounting mistakes by using the right converting functions
before calling the ffi layer functions
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