François Laignel
333d71f92b
Update functions returning bool to use Result<(), glib::BoolError>
...
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/171
2019-01-17 23:13:44 +01:00
Sebastian Dröge
43ec33a1db
Remove some code that is nowadays generated by the glib_wrapper! macro
2019-01-16 15:23:53 +02:00
Sebastian Dröge
931c485150
Update manual code for glib API changes
2019-01-16 13:52:56 +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
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
6bba3d8518
Add 'static trait bound to all ExtManual traits and get rid of trait bounds for their impls
2018-12-08 14:58:14 +02:00
Víctor Manuel Jáquez Leal
ec8727c3ca
Make rustfmt in CI happy
2018-11-23 15:32:05 +01:00
Sebastian Dröge
ec2a0635ca
Port Pad subclassing
2018-11-21 16:14:06 +02:00
Arun Raghavan
f4685c4629
Use FlowError instead of FlowReturn as error part of Result
...
This prevents the possibility of a Result that is an Err(Ok), which
would not be meaningful.
2018-10-29 14:40:39 +00:00
Sebastian Dröge
eb0a804a50
Run everything through latest rustfmt
2018-10-08 15:02:23 +03:00
Sebastian Dröge
0d70950821
Implement Pad::sticky_events_foreach()
2018-08-13 19:58:30 +03:00
Sebastian Dröge
ccca8248c3
Add getter for the current pad mode
2018-08-01 19:28:57 +03:00
Sebastian Dröge
33a6aab6d7
Run everything through latest rustfmt
2018-07-27 13:36:40 +03:00
Sebastian Dröge
ec8b55ec30
Stream-line pad probe code
...
Don't take another reference of the data passed through the pad probes,
i.e. keeping buffers writable if they're writable.
2018-07-26 03:14:04 +03:00
Sebastian Dröge
694bcaa697
Fix all clippy warnings
...
Or silence the ones we don't care about.
2018-07-20 10:28:20 +03:00
Sebastian Dröge
e0972ae1e5
Get rid of manual usage of callback_guard!
2018-06-24 14:52:50 +03:00
JohanGoversTech
db3fe69415
Change return type of add_probe to support removing ( #116 )
...
* Change return type of add_probe to support 0 PadProbeId
* use from_glib for the conversion of the PadProbeId
2018-06-14 15:45:54 +03:00
Sebastian Dröge
2cefd9aea6
Re-run everything through rustfmt
2018-04-25 11:13:14 +03:00
Sebastian Dröge
492c3d656c
Run everything through rustfmt again
2018-04-01 11:57:58 +03:00
Sebastian Dröge
a3b294f0f2
Add back callback guards
2018-03-02 21:34:29 +02:00
Sebastian Dröge
f1426c82ba
Remove callback guards
...
Since Rust 1.24 it is safe to let panics go to the FFI boundary
2018-02-17 19:58:41 +02:00
Sebastian Dröge
ad219dd171
Remove PAD_PROBE_ID_INVALID and Default impls for PadProbeId and NotifyWatchId
...
These should never ever be 0, and passing 0 to any of the functions
using them will result in assertions.
2018-01-25 21:06:39 +02:00
Sebastian Dröge
e0dc84c10a
Run everything through rustfmt again
2017-12-20 19:30:14 +02:00
Sebastian Dröge
5065bc76ee
Rename FormattedValue::from_glib/to_glib to from_raw/to_raw_value
...
Otherwise we conflict with GLib translation traits, which causes some
annoyances.
2017-12-10 12:10:25 +02:00
Sebastian Dröge
c99928d030
Change FormatValue related API to be more convenient to use
...
FormatValue is now renamed to GenericFormattedValue and the API slightly
changed. In addition there is now a FormattedValue trait, and a
SpecificFormattedValue trait plus types for Bytes, Buffers and the
existing ClockTime.
This allows to create functions like
Pad::query_duration<F: SpecificFormattedValue>() -> Option<F>
and doesn't require the caller to unwrap the generic value anymore,
which is completely unneeded in these cases.
In addition, Segment became FormattedSegment<T> with API to
upcast/downcast between the specific formatted values and the generic
formatted value. This greatly simplifies usage of Segments.
2017-12-09 19:45:18 +02:00
Sebastian Dröge
411f54afed
Run everything to rustfmt again
2017-12-01 19:02:53 +02:00
Sebastian Dröge
94ba143c74
Allow anything that implements Into<Option<&str>> to be used for creating new pads
2017-11-21 16:16:56 +02:00
Sebastian Dröge
c39c0c7264
Implement ClockTime as ClockTime(Option<u64>)
...
And also implement a FormatValue type that holds a value together with
its format to make usage of the positions/durations/seek positions/etc
more convenient and safe.
Fixes https://github.com/sdroege/gstreamer-rs/issues/3
2017-11-11 11:57:29 +01:00
Sebastian Dröge
e1d134c4be
Run everything through latest rustfmt-nightly
2017-10-17 12:06:51 +03:00
Sebastian Dröge
9206ddba61
Add StaticCaps and StaticPadTemplate bindings
...
No way to create them though, just use lazy_static from Rust instead if
something like this is needed.
2017-10-15 11:08:56 +03:00
Sebastian Dröge
19e40a5e2c
Remove accidental leftover debug output
2017-09-18 20:44:59 +03:00
Sebastian Dröge
e026c2f652
Directly poke at GstPad struct for retrieving pad function data
...
glib-sys was just fixed: https://github.com/gtk-rs/sys/pull/62
2017-09-18 17:26:42 +03:00
Sebastian Dröge
f4958b71d7
Add test for pad tasks
2017-09-18 01:53:02 +03:00
Sebastian Dröge
c471a67e78
Add test for pad chain/event function and fix-up code
...
Need to handle NULL parents, and also work-around incomplete GstPad
struct definition in gstreamer-sys due to GHookList being incomplete.
2017-09-18 01:45:39 +03:00
Sebastian Dröge
dc6c7500df
Add bindings for remaining pad task functions
...
Especially Pad::start_task()
2017-09-18 00:32:29 +03:00
Sebastian Dröge
88f37b799c
Re-add Pad::iterate_internal_links()
...
It was accidentially dropped when making Iterator generic.
2017-09-18 00:24:36 +03:00
Sebastian Dröge
ce5c01a88e
Implement gst::Iterator as a generic type to not require using glib::Values everywhere
2017-09-17 18:45:38 +03:00
Sebastian Dröge
858b73a672
Add bindings for setting all the pad functions
2017-09-17 13:31:34 +03:00
Sebastian Dröge
b4cb81cd56
Run everything through latest rustfmt-nightly
2017-09-10 15:21:26 +03:00
Sebastian Dröge
85b335fd89
Fix/hide various clippy warnings in gstreamer
2017-09-10 15:21:26 +03:00
Sebastian Dröge
3b0e6843e2
Regenerate everything with latest GIR
2017-09-09 16:35:01 +03:00
Sebastian Dröge
8caf88810c
Don't implement Clone/Copy for PadProbeId
...
It's only possible to use it at most once.
2017-09-09 00:45:45 +03:00
Sebastian Dröge
f0935d7e1e
Add remaining gst_init() assertions
2017-08-30 14:39:09 +03:00
Sebastian Dröge
dc703cc6e9
Add push_list/chain_list functions to Pad
2017-08-14 22:24:54 +03:00
Sebastian Dröge
d6c032be7b
Add bindings for Pad::stream_lock()
2017-08-03 11:11:07 +03:00
Sebastian Dröge
09db28bbf5
Fix various clippy warnings
2017-08-02 19:40:31 +03:00
Sebastian Dröge
7c600bfce3
Fix unsafety of pad probes and sync bus handler
...
These can't be FnMut but must be Fn as they can be called from many
threads at the same time.
2017-08-01 15:28:36 +01:00
Sebastian Dröge
38496eca7d
Pass events by value instead of reference
2017-08-01 13:59:12 +01:00
Sebastian Dröge
03285a6311
Run everything through latest rustfmt-nightly
2017-07-31 12:16:42 +01:00
Sebastian Dröge
35160bedbc
Add support for Events in pad probes
2017-07-30 15:11:47 +01:00