Commit graph

662 commits

Author SHA1 Message Date
François Laignel
514a05accd Manual update for new Value::get signature 2019-08-13 10:57:32 +02:00
François Laignel
5d012945df Regen 2019-08-11 10:43:30 +02:00
François Laignel
26fda95a54 Fix functions unit tests for v < 1_12 2019-08-08 19:38:42 +02:00
Josh Matthews
0e36ac5205 Add high level bindings for adding new log handlers and removing the default handler. 2019-07-22 16:06:41 +00:00
Sebastian Dröge
fcc361f920 gstreamer: Add bindings for gst::calculate_linear_regression() 2019-07-17 00:24:13 +03:00
Sebastian Dröge
eb59456ae3 Update CHANGELOG.md for 0.14.3 2019-07-16 12:47:15 +03:00
Sebastian Dröge
007f80ca32 buffer: Allow setting/unsetting buffer flags
As there are extension flags types, we need separate setter/unsetter
functions for the flags, or otherwise we would always clear the
extension flags types (e.g. GstVideoBufferFlags).
2019-07-16 11:51:23 +03:00
Sebastian Dröge
36b0cafc5e Update CHANGELOG.md for 0.14.2 2019-07-15 20:03:48 +03:00
Sebastian Dröge
ae58a469d1 meta: Add support for ReferenceTimestampMeta 2019-07-14 22:32:10 +03:00
Sebastian Dröge
d8325212f4 Fix various clippy warnings 2019-07-11 22:02:01 +03:00
Sebastian Dröge
f63d50546a Don't use ONCE_INIT anymore now that Once::new() is const 2019-07-11 17:56:50 +03:00
Sebastian Dröge
424a87efbf Use MaybeUninit::zeroed() everywhere possible instead of mem::zeroed() 2019-07-11 17:56:50 +03:00
Sebastian Dröge
3a8d05075d Switch everything from mem::uninitialized() to MaybeUninit or mem::zeroed()
And also fix a few cases where mem::uninitialized() was simply wrong to
use.
2019-07-11 17:56:50 +03:00
Sebastian Dröge
bde6a04780 Regenerate everything with latest gir 2019-07-10 11:21:28 +03:00
Sebastian Dröge
dcbf68e9e7 Update CHANGELOG.md for 0.14.1 2019-07-06 23:57:28 +03:00
Sebastian Dröge
9a3e7d0aa9 gstreamer/format: Fix serde serialization unit test
Regression from fdb95f0033
2019-07-06 10:19:03 +03:00
Sebastian Dröge
28a24a4fc0 Update versions to 0.15.0 2019-06-24 20:53:05 +03:00
Sebastian Dröge
fa6cb789cd Update CHANGELOG.md for 0.14.0 2019-06-24 20:52:03 +03:00
Sebastian Dröge
47f0940b44 Regenerate everything with latest gir 2019-06-24 20:52:03 +03:00
Guillaume Desmottes
24d9dc6209 gstreamer: tags: make call to to_string() explicit
This one was actually working but better to be safe as it may be
ambigious.
2019-06-18 17:11:24 +05:30
Guillaume Desmottes
40d2db7095 gstreamer: caps: make call to to_string() explicit
This one was actually working but better to be safe as it may be
ambigious.
2019-06-18 17:11:24 +05:30
Sebastian Dröge
b87ffa17bb Run rustfmt also over all the generated code 2019-06-18 13:12:00 +03:00
Sebastian Dröge
e5aa6f59f9 Regenerate everything 2019-06-18 13:10:46 +03:00
Sebastian Dröge
4f024af7d6 gstreamer/serde: Fix compilation with serde feature enabled 2019-06-06 09:25:19 +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
Guillaume Desmottes
7a69a1137c gstreamer: plugin_feature: use Rank enum 2019-06-04 12:56:18 +03:00
Guillaume Desmottes
1cd733fb0b gstreamer: allow to register using Rank enum directly
Prevent user to have to cast to a u32 manually.
2019-06-04 12:50:43 +03:00
Sebastian Dröge
2c31baaa0c gstreamer: Implement Add<u32> for gst::TypeFindProbability and fix comparison
While the enum is a signed integer, all operations inside GStreamer
(especially comparison) is based on unsigned integers.
2019-06-04 12:45:56 +03:00
Sebastian Dröge
620a9b2a95 gstreamer: Implement Add<u32> for gst::Rank and fix comparison
While the enum is a signed integer, all operations inside GStreamer
(especially comparison) is based on unsigned integers.
2019-06-04 12:45:56 +03:00
Sebastian Dröge
d44c293753 Use TryFrom/TryInto traits where it makes sense instead of our previous ad-hoc solutions 2019-06-03 18:42:34 +03:00
Sebastian Dröge
fdb95f0033 gstreamer/format: Implement formatted value arithmetic with overflow checks
We have a value to represent invalid/overflow anyway, so let's make sure
that all operations are actually not overflowing and if they do we
assigned that value to the result.
2019-06-03 08:25:43 +00:00
Sebastian Dröge
fbcdf90386 gstreamer/format: Add various other arithmetic operation impls for the different formatted values
This includes gst::ClockTime.
2019-06-03 08:25:43 +00:00
Sebastian Dröge
b2ffe98d59 gstreamer/fraction: Add impls for various other arithmetic operations on fractions
Any arithmetic operation on plain values or references in any order
should be possible now, and on fractions with i32.
2019-06-03 08:25:43 +00:00
Sebastian Dröge
37071c9d60 gstreamer: Fix build with serde feature enabled 2019-05-28 04:35:12 +02:00
Sebastian Dröge
004ce5d392 gstreamer: Re-export the paste crate for the gst_plugin_define! macro
And only depend on the paste crate if the subclass feature is requested.
2019-05-27 22:46:26 +02:00
Sebastian Dröge
faa6467d7a gstreamer: Export new 1.14+ plugin symbols if configured for 1.14+
This is also needed for static linking on Android to work correctly.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/154
2019-05-27 20:22:05 +00:00
Arun Raghavan
61b1822c95 gstreamer: Fix URIHander::set_uri annotation
We don't actually accept a NULL uri, so it doesn't need to be an Option,
and using &str instead of String is more efficient.
2019-05-25 19:12:42 +02:00
Vivia Nikolaidou
6461a3abaa buffer_pool: Add {get,set}_allocator bindings 2019-05-24 10:32:57 +00:00
Vivia Nikolaidou
32e1d68d36 allocator: Expose GstAllocator 2019-05-24 10:32:57 +00:00
Vivia Nikolaidou
922af1d606 Add GstMemory bindings
Part of https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/12
2019-05-24 10:32:57 +00:00
Vivia Nikolaidou
044d931d01 flags: Expose GstMemoryFlags 2019-05-24 10:32:57 +00:00
Sebastian Dröge
b5dcbe3897 gstreamer/proxypad: Move default functions to extension trait 2019-05-24 10:04:16 +00: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
6cef32a4dd Change various mini object references to references to the refcounted object
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/204
2019-05-24 10:04:16 +00:00
Sebastian Dröge
e6f65a5032 gstreamer/miniobject: ToOwned::to_owned() on references has to create a copy
Otherwise it's possible to create a new owned reference from a mutable
reference, and then there is a mutable and immutable reference to the
same data at the same time, which is simply not allowed.

https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/204
2019-05-24 10:04:16 +00:00
Sebastian Dröge
a986914bad Use Option<&T> instead of &Option<T> everywhere
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/203
2019-05-22 23:27:13 +03:00
Jan Alexander Steffens (heftig)
5398a80a73
gstreamer/pad: Add a probe test 2019-05-16 18:17:15 +02:00
Jan Alexander Steffens (heftig)
d470881ac2
gstreamer/pad: Handle PadProbeReturn::Handled more correctly
If the probe returns Handled and the data was a Buffer we need to ensure
it was consumed. Queries need to be returned. The behavior of Handled
for other probes is not clear.
2019-05-16 16:55:02 +02:00
Jan Alexander Steffens (heftig)
d5317cccdd
gstreamer/pad: Expose the flow_ret value in PadProbeInfo
This is present since GStreamer 1.5.90 so no feature flags needed.
2019-05-16 16:55:02 +02:00
Jan Alexander Steffens (heftig)
061683af7b
gstreamer/pad: Assert post-probe data did not become None
GStreamer does not allow the probe to consume the reference here.
2019-05-16 16:55:02 +02:00
Guillaume Desmottes
94d4c5b42d buffer: display metas in Debug
Fix #201
2019-05-16 14:45:55 +02:00
Vivia Nikolaidou
496fc61873 pipeline: Add to lib.rs 2019-05-12 16:41:18 +03:00
Sebastian Dröge
698120c620 Add tests for pad and element subclassing 2019-05-11 13:45:09 +00:00
Sebastian Dröge
c282f34c74 bus: Fix naming for filtered pop functions 2019-05-11 13:45:09 +00:00
Vivia Nikolaidou
1a65c674a9 Add unset_*_flags functions
Implemented for element, object, pad, and pipeline

https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/104
2019-05-11 15:51:33 +03:00
Vivia Nikolaidou
6403c06990 Add API for setting/getting object flags
Implemented for Object, Pipeline, Bin, Element, Plugin.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/104
2019-05-11 13:13:33 +03:00
Vivia Nikolaidou
9067b500c8 enums: Removed MessageType::Any 2019-05-11 11:45:12 +03:00
Vivia Nikolaidou
05d936fcee gstreamer: Add binding for GstMessageType and gst_bus_timed_pop_filtered
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/168
2019-05-10 19:35:13 +03:00
Guillaume Desmottes
05519219ef buffer_pool: use to_glib_none() to cast BufferPoolAcquireParams 2019-05-07 13:30:00 +05:30
Guillaume Desmottes
fca4441a72 buffer_pool: implement ToGlibPtr and ToGlibPtrMut for BufferPoolAcquireParams
I'll use them to bind
gst_video_decoder_allocate_output_frame_with_params()
2019-05-07 10:28:25 +05:30
Sebastian Dröge
5f1a50026d Update futures code to futures 0.3
Also clean it up a bit.
2019-05-02 21:35:12 +03:00
François Laignel
bf96e264c9 gstreamer: Fix test for toc serialization
Ron changed the way it outputs empty arrays with version `0.5`.
2019-04-24 19:04:40 +03:00
Sebastian Dröge
044e3985a3 Update dependencies 2019-04-24 09:45:56 +03:00
Sebastian Dröge
b2b8bfab52 Add manual implementations for various new 1.16 functions 2019-04-23 20:45:39 +03:00
Sebastian Dröge
54705f959a message: DeviceAdded/Removed getters are transfer full 2019-04-23 20:45:39 +03:00
Sebastian Dröge
88dcb82c8d Regenerate everything for 1.16.0 2019-04-23 19:15:53 +03:00
Sebastian Dröge
5c32a0d1d3 Update manual code and configuration for 1.16 2019-04-23 19:15:53 +03:00
Sebastian Dröge
e7898c1b24 Update manual code 2019-04-15 19:19:19 +03:00
Sebastian Dröge
24305a19e8 Regenerate everything with latest gir 2019-04-15 18:38:05 +03:00
Sebastian Dröge
5af54b8d94 Use the slice::windows() iterator instead of zipping twice for Element::link_many() and unlink_many()
Has the same effect but is easier to read and more efficient.
2019-04-10 16:30:26 +03:00
François Laignel
9a01bd6202 TagList: handle scope in serde
These changes break compatibility for the serde representations of
`TagList` and `Toc`. Previous representation for the `TagList` was
a sequence. We now have to rely on a struct representation in order
to add `scope`.
2019-03-20 13:58:28 +00:00
François Laignel
bec3d84627 TagList: add TagScope {get, set} 2019-03-20 13:58:28 +00:00
Sebastian Dröge
86a31b4139 Silence/fix various clippy warnings 2019-03-07 14:05:35 +02:00
Sebastian Dröge
8c39da4e5b Update to Rust 1.31 linter-specific attributes 2019-03-04 15:16:01 +02:00
Sebastian Dröge
631eee13da gstreamer/pad: Use the correct type for destroying the pad task closure data
It's a Box<RefCell<_>> and not a plain Box<_> like for the other pad
functions, and doing this wrong causes crashes at runtime.
2019-03-01 19:49:27 +02:00
Sebastian Dröge
490004d9c5 Remove empty lines from CHANGELOG.md as that breaks the GitLab rendering
... if it's between items in a list.
2019-02-22 17:50:59 +02:00
Sebastian Dröge
32e961d418 Update versions to 0.14.0 2019-02-22 13:04:56 +02:00
Sebastian Dröge
0f6850d6a9 Update CHANGELOG.md for 0.13.0 2019-02-22 11:55:16 +02:00
Sebastian Dröge
8754e4220e Regenerate everything with latest gir 2019-02-22 11:55:16 +02:00
Sebastian Dröge
95f6844702 Fix various minor clippy warnings 2019-02-21 19:56:23 +02:00
Sebastian Dröge
53c98db711 gstreamer: Don't implement ClockId's Ord/etc based on the compare function
It is only comparing the times, and two clock ids with the same time are
obviously not the same.
2019-02-21 18:48:57 +02:00
Sebastian Dröge
a5a016557f bus: add_watch() can fail as there can only be one watch at a time
Return an Option<SourceId> because of that.
2019-02-15 13:30:05 +02:00
François Laignel
fb99f1abad gstreamer: subclassing: move parent fn in dedicated trait (!231) 2019-02-13 11:53:14 +00:00
Sebastian Dröge
09ad177315 Add Bus::add_watch_local() without Send bound on the closure
This panics if not called from the thread that owns the main context.
2019-02-10 11:43:55 +02:00
François Laignel
fcb46ee5bf gstreamer: add parent_xxx impl for all vfunc 2019-02-03 08:41:20 +00:00
François Laignel
56c00d9250 gstreamer: fix parent vfunc invocations when needed
Fixes #180
2019-02-03 08:41:20 +00:00
Sebastian Dröge
354f9fbfe4 Fix compilation of tests without features="v1_14" 2019-01-30 13:02:41 +00:00
Sebastian Dröge
42a8b9e505 Get rid of double-boxing for some other closures 2019-01-30 13:02:41 +00:00
Sebastian Dröge
1adb063fbc Don't box closures twice for signal callback closures 2019-01-29 19:24:26 +02:00
Sebastian Dröge
49c5fa33ba Add tests for Element::foreach_pad() and Bus::set_sync_handler() 2019-01-29 16:45:35 +02:00
Sebastian Dröge
5625a75b1b Pad::new_from_static_pad_template_with_gtype() can return None 2019-01-29 16:28:51 +02:00
Sebastian Dröge
00cbd49923 Regenerate with latest gir 2019-01-29 16:28:51 +02:00
Sebastian Dröge
2b2c3bbade Make sure to initialize GStreamer in all Structure tests 2019-01-27 03:02:11 +02:00
François Laignel
a88918dd5f Use glib_result_from_gboolean! where applicable 2019-01-26 12:46:37 +01:00
François Laignel
f59e35d0a3 Use LoggableError in user defined functions and callbacks
`LoggableError` ensures an error in a user defined function is always
logged. This commit changes eligible function signatures accordingly.
2019-01-26 11:58:30 +01:00
François Laignel
c5f0bab614 Add LoggableError
... an auto-loggable `Error` return type, to make sure user errors
get logged.

To be used via the associated macros.

See discussion in #175.
2019-01-26 11:58:27 +01:00
Sebastian Dröge
ca791ae4fa Use an empty enum for the custom tag in the test
There's no point in allowing to have values of it, it's only a marker
type.
2019-01-23 16:11:52 +02:00
Sebastian Dröge
9d79280929 Add some more functions for generically handling tags 2019-01-23 15:54:00 +02:00
Sebastian Dröge
598e012568 Add bindings for gst::tags::register() 2019-01-23 15:52:51 +02:00
Sebastian Dröge
bd0cbe99b3 Add more Debug impls to everything possible 2019-01-22 17:46:08 +02:00