Commit graph

2595 commits

Author SHA1 Message Date
Bilal Elmoussaoui
213020165a manual changes post ObjectExt improvements 2021-11-08 14:42:59 +01:00
Bilal Elmoussaoui
0d009bca31 regen with latest gir 2021-11-08 14:42:59 +01:00
Sebastian Dröge
0444660d1f gstreamer: Don't use a trait object for the property value in ChildProxy::set_child_property()
This makes it nicer to use as `1` can be passed directly instead of `&1`.
2021-11-06 09:36:38 +02:00
Sebastian Dröge
220c500799 gstreamer: Add numer()/denom() functions to gst::Fraction to get the values by value instead of reference 2021-11-06 00:23:07 +02:00
Sebastian Dröge
a3015ab507 gstreamer: Refactor gst::IntRange constructors to not require specifying the contained type necessarily 2021-11-06 00:23:07 +02:00
Sebastian Dröge
9901f0c6a2 gstreamer: Refactor gst::Array / gst::List bindings to work correctly with the refactored traits in glib
Also allow only a single type inside them.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/360
2021-11-06 00:23:07 +02:00
Sebastian Dröge
30bb699cbc gstreamer: Use plain &str for parameters instead of Into<&str>
The latter doesn't really have any advantage and only bloats the API.
2021-11-05 17:37:41 +02:00
François Laignel
82b7239379 regen: NONE as associated consts 2021-11-04 18:42:06 +01:00
François Laignel
3780dc7667 update gir: NONE as associated consts 2021-11-04 18:40:24 +01:00
Sebastian Dröge
c942a1d563 gstreamer: Implement Element::request_pad_simple() only once
With < 1.20 it will use `gst_element_get_request_pad()` and otherwise
`gst_element_request_pad_simple()`. It's not marked as deprecated in
either case.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/358
2021-11-04 15:44:35 +02:00
Sebastian Dröge
b4282c9444 ci: Update cargo-outdated to a branch with Rust edition 2021 support 2021-11-04 13:40:16 +02:00
Sebastian Dröge
cdfe4b3d67 Remove unneeded std::convert::TryFrom/TryInto and std::str::FromStr imports 2021-10-31 18:20:31 +02:00
Sebastian Dröge
082d109f27 pbutils: Implement DiscovererContainerInfo::tags() manually
Unclear why it's not generated.
2021-10-31 12:43:49 +02:00
Sebastian Dröge
d785bf8c3a Regenerate with latest gir 2021-10-31 11:47:34 +02:00
Sebastian Dröge
c00a97f5ec Update to Rust edition 2021 and minimum supported Rust version 1.56
Also update CI image to use meson 0.60.
2021-10-31 11:47:34 +02:00
Sebastian Dröge
0a5100ca9b Update GStreamer gir files 2021-10-31 11:46:50 +02:00
Sebastian Dröge
b2746c6c29 Update gir 2021-10-30 10:32:05 +03:00
Sebastian Dröge
b43d785d83 Move README.md to the repo root and link it from inside the gstreamer subdirectory 2021-10-27 00:01:00 +03:00
Sebastian Dröge
e657e676d5 Relax main context checks in Bus::add_local() and gst_video::convert_sample_async_local() 2021-10-25 09:54:33 +00:00
Sebastian Dröge
42feed5441 examples: Remove unnecessary MainContext::push_thread_default() 2021-10-25 09:54:33 +00:00
Sebastian Dröge
c2e43f86a5 gstreamer: Update to option-operations 0.4 2021-10-25 09:51:14 +03: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
92f9f3be39 Remove various unnecessary & from property/structure field related code 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
8cc018c164 examples: Move to the new, simplified encoding profile API 2021-10-24 18:45:38 +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
Sebastian Dröge
7f0ca0011c Add gst::GstObjectImpl, gst::ProxyPadImpl, gst_audio::AudioBaseSrc, gst_audio::AudioBaseSink subclassing traits
These were missing from the type hierarchy previously and are now
required because of more strict checks in the GLib bindings.
2021-10-23 11:59:03 +03:00
Sebastian Dröge
12fec484c7 Simplify IsSubclassable trait impls 2021-10-23 11:27:46 +03:00
Sebastian Dröge
cc76442601 gstreamer: Update ron dev-dependency to 0.7 2021-10-23 10:40:24 +03:00
Sebastian Dröge
4579fb006b ci: Update to Rust 1.56 and meson 0.59.2 2021-10-22 22:04:45 +03:00
Guillaume Desmottes
fc49a0cfd8 ci: build some plugins
I'll need those for the tests of a new element I'm writting for
gst-plugins-rs.
2021-10-22 09:38:44 +02:00
Sebastian Dröge
18e45dd991 gstreamer: Add FromIterator/Extend impls based on owned Strings and glib::Quark 2021-10-20 14:28:14 +03:00
Sebastian Dröge
a7be9ea9d9 gstreamer: Implement Extend trait for buffer, buffer list, caps, caps features and structure
And also implement FromIterator<Memory> for buffer.
2021-10-20 13:53:23 +03:00
Sebastian Dröge
febd0ee144 Declare the minimum supported Rust version in Cargo.toml 2021-10-18 19:30:37 +03:00
Sebastian Dröge
e6b78d1489 gstreamer: Have Structure::from_iter() take owned values
They were copied internally, which can be avoided in many cases if
working with owned values anyway.
2021-10-18 16:36:15 +03:00
François Laignel
f315d3a052 Use published option-operations 2021-10-18 14:30:59 +02:00
François Laignel
4bbd201377 Impl Option*{Div,Mul,Rem}
Use the inner type for Rhs, as implemented for Duration.
These operations make sense without providing a "unit".
2021-10-18 14:30:59 +02:00
François Laignel
f83b385487 tutorial: take advantage of Div impl on Percent 2021-10-18 14:30:59 +02:00
François Laignel
deb22b264e format, clock_time: gather macros together
The modules format and clock_time share common macros which are
scattered between each modules. This cross reference makes it
difficult to maintain the macros.

This commit also make it possible to use macro
impl_common_ops_for_newtype_uint for Percent.
2021-10-18 14:30:59 +02:00
François Laignel
986a136492 clock_time & format: basic opt-ops impl
The option-operations crate provides traits to improve usability
when dealing with `Option`s, which is often the case with
`ClockTime` & most formats.
2021-10-18 14:30:59 +02:00
François Laignel
051df59cd1 clock_time, format: fix checked, saturating, wrapping ops
These operations were implemented using the integer implementations.
These types' MAX values are different from the integers so they must
use specific implementations.

Also add the overflowing variants.
2021-10-18 14:30:59 +02:00
Guillaume Desmottes
675fe349a7 gstreamer: implement Sum on ClockTime
Small convenient helper.
2021-10-18 08:05:56 +02:00
Sebastian Dröge
67af5ac569 gstreamer: Add support for 1.18 instant rate request message 2021-10-17 14:39:38 +03:00
Sebastian Dröge
cdddf48f08 gstreamer: Correctly mark various messages as new in 1.10/1.16 2021-10-17 14:33:34 +03:00
Sebastian Dröge
6e3878c8f5 gstreamer: Add bindings for 1.18 instant-rate-change related events 2021-10-17 14:27:44 +03:00