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
François Laignel
a254a8ed29
Declare Gst defined Debug Categories and add one for Rust binding
2019-01-16 17:07:57 +01:00
Sebastian Dröge
bfcdec782e
Switch to stable rustfmt and add skip annotations for the generated code to the lib.rs
2019-01-16 17:10:01 +02: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
58ccf666a6
Change some const raw pointers to mutable
...
We cast them to a mutable pointer of another type right afterwards
anyway.
2019-01-16 13:52:56 +02:00
Sebastian Dröge
931c485150
Update manual code for glib API changes
2019-01-16 13:52:56 +02:00
Sebastian Dröge
6da0a9d169
Regenerate everything with latest gir
2019-01-16 13:32:39 +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
François Laignel
3200574d31
Update to latest gir
...
See https://github.com/gtk-rs/gir/pull/687
2019-01-04 16:02:40 +01:00
Philippe Normand
9534416760
Regenerate and fix manual bindings for GString support
2019-01-03 22:01:41 +00:00
Sami Jaktholm
6f867443c9
tags: fix album tag definition
...
The Album tag should be defined using the GST_TAG_ALBUM constant instead
of GST_TAG_ARTIST_SORTNAME.
2018-12-28 19:51:28 +02: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
Sebastian Dröge
005f436631
Buffer::from_slice() / from_mut_slice() can't possibly return None
2018-12-26 12:13:23 +01:00
Bastian Köcher
d257ece388
Make Value
serialize/deserialize Buffer
s
2018-12-25 01:40:17 +01:00
Sebastian Dröge
93d1349d78
Use new GLib API for generically implementing GObject interfaces
2018-12-19 13:15:20 +02:00
Sebastian Dröge
d780b92f21
Use an extension trait instead of a custom type for the GStreamer param specs
...
This way they can simply be created via glib::ParamSpec::fraction() for
example.
2018-12-11 12:37:15 +02:00
Sebastian Dröge
36bcb5630a
Remove various unused use statements
2018-12-08 14:58:14 +02: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
Sebastian Dröge
5c93e134a7
Regenerate everything with new version of gir
2018-12-08 14:58:14 +02:00
Sebastian Dröge
fa988fe73d
Make gst_define_mini_object_wrapper! macro work stand-alone without requiring specific names in scope
2018-12-08 12:53:10 +02:00
François Laignel
8c3df63b95
URIHandler: rename get_type
...
Avoid a conflict with the `get_type` function declared by the
`glib_object_subclass!` macro.
2018-12-03 20:47:58 +01:00
Sebastian Dröge
1515707655
Add bindings for the array/fraction param spec constructors
2018-11-29 19:18:45 +00:00
Sebastian Dröge
3febc42628
Update for glib-rs API changes
2018-11-28 21:55:21 +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
d2b911a629
Port GhostPad subclassing
2018-11-21 16:14:06 +02:00
Sebastian Dröge
ec2a0635ca
Port Pad subclassing
2018-11-21 16:14:06 +02:00
Sebastian Dröge
97211e869b
Port Pipeline subclassing
2018-11-21 16:14:06 +02:00
Sebastian Dröge
55dac7eeb4
Port Bin subclassing
2018-11-21 16:14:06 +02:00
Sebastian Dröge
0a8d34bc23
Port ChildProxy subclassing
2018-11-21 16:14:06 +02:00
Sebastian Dröge
a0d2f0e98f
Port URIHandler subclassing
2018-11-21 16:14:06 +02:00
Sebastian Dröge
d2f00ca1e0
Allow passing normal strings to gst_plugin_define!() without explicit \0 at the end
...
See https://gitlab.freedesktop.org/gstreamer/gst-plugin-rs/issues/38
2018-11-21 16:14:06 +02:00
Sebastian Dröge
9ff906eb8e
Declare correct major/minor plugin versions based on bindings configuration
...
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugin-rs/issues/37
2018-11-21 16:14:06 +02:00
Sebastian Dröge
56319f9294
Move subclassing infrastructure into the main bindings
...
And port Element bindings to the new infrastructure.
2018-11-21 16:14:06 +02:00
Sebastian Dröge
d6ce094cfd
Check for successful typefind registration in typefind unit test
2018-11-20 11:15:03 +02:00
Sebastian Dröge
d7157a4279
Add the to-dot-file functions to the gst::Bin trait
...
This allows directly calling them on bins instead of using a global
function.
2018-11-11 10:14:43 +02:00
Sebastian Dröge
f31827f194
Regenerate with latest gir
...
Gets rid of some unneeded property notification functions in GES
2018-11-05 11:18:31 +02:00
Thijs Vermeir
25e0baf483
update autogenerated files
2018-11-04 19:14:35 +01:00
Thijs Vermeir
ba22a36cdb
use BoolError for {Element,TypeFind,DeviceProvider}::register
2018-11-04 19:14:35 +01:00
Sebastian Dröge
fb0178a4f2
Call gst::init() in message::test_other_fields() test at the beginning
2018-11-03 20:15:27 +02:00
Víctor Manuel Jáquez Leal
60c9cdfda1
Update autogenerated code with latest gir
2018-10-31 17:33:15 +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
Arun Raghavan
a4f25df045
enums: Implement the From trait for error/success
...
This implements the From trait for all *Error/*Success enums to the
corresponding *Return enum.
2018-10-28 18:41:27 +00:00
Sebastian Dröge
6325e0fcce
Fix build with ser_de feature enabled
2018-10-28 17:48:42 +00:00
Sebastian Dröge
9f8ec3b35b
Rename TagList::iter_tag_list() to TagList::iter_generic() and ::iter_tag_list_simple() to ::iter()
...
It's the generic iterator for going over values, and the simple one is
the one you usually want.
Also rename iterator types, but those are internal anyway.
2018-10-28 17:30:25 +00:00
Sebastian Dröge
8a6bcbcedb
Run through rustfmt once again
2018-10-28 13:47:02 +00:00
Sebastian Dröge
54d8065dd3
Add TagList::iter_tag_list_simple() for getting a single value per tag
2018-10-28 13:46:28 +00:00
Sebastian Dröge
0947c8f087
Rename gst::Bin traits from BinExt to GstBinExt to prevent conflicts with gtk::Bin
2018-10-28 11:30:41 +00:00
Sebastian Dröge
7189a6a7c1
Replace various transmutes in meta code with pointer casts
2018-10-11 11:58:01 +03:00
Sebastian Dröge
e2950749e8
Remove some unneeded lifetime annotations
2018-10-11 11:58:01 +03:00
Sebastian Dröge
d19c70694a
Use ? operator instead of explictly propagating None
2018-10-11 11:58:01 +03:00
Sebastian Dröge
fa29872863
Fix various clippy warnings in the serde code
2018-10-11 11:58:01 +03:00
Sebastian Dröge
5d9a3b4272
Use ptr::add(i) instead of ptr::offset(i as isize)
2018-10-11 11:58:01 +03:00
Sebastian Dröge
eb0a804a50
Run everything through latest rustfmt
2018-10-08 15:02:23 +03:00
Sebastian Dröge
c56e9ddfea
Also implement copy() returning the wrapper miniobject on the reference type
...
This way CapsRef::copy() will return a Caps, and not a GstRc<CapsRef>.
2018-10-05 16:36:15 +03:00
Sebastian Dröge
30b9527112
Implement ::copy() directly on miniobject wrapper types
...
This provides the additional wrapping as the one via get via deref will
only give back a GstRc<T> without the additional wrapping.
2018-10-03 16:54:00 +03:00
Sebastian Dröge
8f71a81cb5
Regenerate with latest gir to get rid of unneeded notify signal connectors for construct-only properties
2018-10-03 13:57:07 +03:00
Sebastian Dröge
0f704646f6
Add more complete bindings for allocation query
...
Everything apart from allocators are covered now.
2018-10-01 22:56:32 +03:00
Sebastian Dröge
6d5bded7b3
Get rid of lifetime for the Meta structs
...
The structs themselves don't reference the buffer, the reference to
these structs is borrowed from the buffer.
2018-09-30 01:17:12 +03:00
Sebastian Dröge
7270a837d1
Fix namespace error in previous commit
2018-09-29 12:19:47 +03:00
Sebastian Dröge
cb23d20270
Implement support for buffer Metas
...
Fixes https://github.com/sdroege/gstreamer-rs/issues/103
2018-09-29 11:44:55 +03:00
Sebastian Dröge
ad62d08d65
Implement Display for Caps and TagList
2018-09-28 19:14:35 +03:00
Sebastian Dröge
6fd0ed4cb3
Move all minobjects to newtype wrapper types
...
For consistency with external crates and to help rustdoc, which gets
confused on impl blocks for type aliases.
2018-09-28 18:11:46 +03:00
Sebastian Dröge
26ee546d1a
Always derive Clone for miniobject wrappers
2018-09-28 17:42:52 +03:00
Sebastian Dröge
74024447fe
Add macro to define newtype wrappers around MiniObjects
...
To allow implementing them in a meaningful way in external crates.
2018-09-28 17:37:27 +03:00
Sebastian Dröge
a43c78f2c5
Run everything through rustfmt
2018-09-28 13:15:18 +03:00
Sebastian Dröge
564f9faf84
Add support for CapsFeatures
...
Fixes https://github.com/sdroege/gstreamer-rs/issues/13
2018-09-28 13:15:18 +03:00
Sebastian Dröge
857ed8609c
Structure is Sync, and StructureRef is Send+Sync
2018-09-22 11:00:17 +03:00
Sebastian Dröge
3c900e6102
Regenerate with latest gir
2018-08-18 00:25:12 +03:00
Sebastian Dröge
a6d9fe4b0a
Remove std::iter::Iterator impl from gst::Iterator
...
It does not work well with possibly errors during iteration and
requiring to possibly resync.
2018-08-13 20:35:28 +03:00
Sebastian Dröge
0d70950821
Implement Pad::sticky_events_foreach()
2018-08-13 19:58:30 +03:00
Sebastian Dröge
999c84f0a0
Implement ValueExt::compare() around std::cmp::Ordering and implement an eq() function
...
No need for a custom enum
2018-08-10 14:22:15 +03:00
Sebastian Dröge
dba110e8ad
Fix build with two-phase-borrows/NLL
2018-08-08 09:16:18 +02:00
Sebastian Dröge
cf9e875878
Implement Ord/PartialOrd on Seqnum
2018-08-06 11:25:44 +03:00
Philippe Normand
58741b7ea2
gstreamer: Implement deinit() function
...
This function is especially usefull when using the leaks tracer. It was removed
in commit e7a0543c
.
2018-08-04 18:39:53 +03:00
Sebastian Dröge
ccca8248c3
Add getter for the current pad mode
2018-08-01 19:28:57 +03:00
François Laignel
0eb6bcf0c0
serde: restrain unneeded visibilities
2018-07-30 23:18:30 +03:00
François Laignel
68263ffc7d
Buffer: serde: add a TODO for a future better design attempt
...
Serialization and deserialization are asymetrical: ser uses string literals
and de uses a dedicated `struct`, leading to possible inconsistencies.
The idea is to rely on a single `struct` for both ser and de. The only
problem is that, in order to avoid unneeded copies, `buffer` requires an owned
`ByteBuf` for de and a borrowed `Bytes` for ser. `Either` could help adapting
to both situations.
2018-07-30 23:18:30 +03:00
François Laignel
3ed7257da9
DateTime: serde: use an enum
2018-07-30 23:18:30 +03:00
François Laignel
9fd5392a16
value: serde: use stringify
for types
2018-07-30 23:18:30 +03:00
François Laignel
6bda3ef174
serde: add roundtrip tests
...
This allows making sure serialization and deserialization are in sync for
types with asymetrical implementations.
2018-07-30 23:18:30 +03:00
François Laignel
64ea419839
Caps: serde as an enum
...
`Caps` can be `any`, `empty` or matching a list of `Structures`.
2018-07-30 23:18:30 +03:00
François Laignel
9f2f684188
format: serde: avoid redundant ()
for some types
2018-07-30 23:18:30 +03:00
François Laignel
dfc961679f
segment: serde FormattedSegment
s too
...
... and use the same `struct` for serialization and deserialization so
that fields mapping consistency is ensured at compilation time.
2018-07-30 23:18:30 +03:00
François Laignel
ab9cd29bd6
serde: fmt pass
...
Note: clippy didn't raise any warning
2018-07-30 23:18:30 +03:00
François Laignel
d4fb10ef4c
Toc: serde: rename loop_
to loop
2018-07-30 23:18:30 +03:00
François Laignel
0aac055727
Caps: serde: use a placeholder for CapsFeature
...
`CapsFeature` is not available in `gstreamer-rs` yet. Use a placeholder
with a `None` value for now.
2018-07-30 23:18:30 +03:00
François Laignel
fd0c3f4464
Structure: de: pass the new Structure
to the Visitor
...
Use a `DeserializeSeed` to pass the newly created and named `Structure`.
2018-07-30 23:18:30 +03:00
François Laignel
23307a4795
Tags: ser/de: gather tags with the same name together
2018-07-30 23:18:30 +03:00
François Laignel
d856fedf06
Buffer: ser: don't panick if not readable
2018-07-30 23:18:30 +03:00
François Laignel
693121bc55
Buffer: fix instanstiation during deserialization
2018-07-30 23:18:30 +03:00
François Laignel
90b046fbcf
serde: separate serde impl and tests from base module
...
+ fix erroneous `datetime` instead of `buffer` in `BufferRef::serialize`
+ remove ser/de for `Value`s with types `ULong` & `ILong`
2018-07-30 23:18:30 +03:00
François Laignel
3f0cd6fb87
Toc: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
20834e475b
Tags: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
4f948e2cce
Sample: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
5e6f80cc32
Segment: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
a2c4e78f70
GenericFormattedValue: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
0f1d3bea89
BufferList: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
862afe5cc7
Buffer: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
138a0fb18c
ClockTime: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
49d3ee29e9
Caps: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
1ef83c24b8
Structure: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
778e11742f
value: serde impl
2018-07-30 23:18:30 +03:00
François Laignel
0d65b7f1ed
DateTime: serde impl
2018-07-30 23:18:30 +03:00
Sebastian Dröge
2240ef109f
Regenerate with latest GIR and update for the glib::Quark changes
2018-07-30 11:46:40 +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
632d5f4c57
Change some empty structs to empty enums
...
These should only really exist at the type-level.
2018-07-25 10:07:20 +03:00
Sebastian Dröge
af5470a8b0
Unref the message in sync bus handlers if Drop is returned
2018-07-24 15:35:26 +03:00
Sebastian Dröge
93b32882ee
tags: Use to_glib_none() to convert &str to a C string instead of as_ptr()
...
The latter does not necessarily give us a NUL-terminated string.
Fixes https://github.com/sdroege/gstreamer-rs/issues/122
2018-07-23 10:17:38 +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
François Laignel
02a8e9faa0
Tags: more and better getters/adder factorizations
2018-07-12 07:22:39 +02:00
François Laignel
7ca54cf1c5
Tags: factorize get_index
unsafe code
2018-07-12 07:22:39 +02:00
François Laignel
0b9edee8d7
Tags: use SendValue
for generic getters and iterator
2018-07-12 07:22:39 +02:00
François Laignel
be9ef0d152
Tags: implement generic iterators
...
This is the continuation of PR #107 by @ystreet
2018-07-12 07:22:39 +02:00
Matthew Waters
2e1f1eadac
tags: add dynamic tag retrieval based on string's and Value's
...
The rust compiler won't complain if you use the wrong types with the
dynamic getter/adder however GStreamer itself does.
2018-07-12 07:22:39 +02:00
Matthew Waters
fa054fe3b0
gst/tags: combine the static tag references into the impl_tag macro
...
There's no real reason to have them separate when there's already a
macro making types for different tags.
2018-07-12 07:22:39 +02:00
Sebastian Dröge
73a5b26638
Use ParamSpec for the deep-notify signal callback instead of just the name
...
And allow filtering by property-name via the signal details
2018-07-09 19:47:15 +02:00
Sebastian Dröge
dc32d338ef
Let various Caps operations take &CapsRef instead of &Caps
2018-07-06 17:58:54 +02:00
Sebastian Dröge
480d373fbc
Caps::subtract() does not take ownership of the arguments and can be implemented for CapsRef
2018-07-06 17:56:55 +02:00
Sebastian Dröge
8c268ecd06
Gracefully return None in Caps::get_structure() if the index is too high
2018-07-06 10:36:00 +02:00
Sebastian Dröge
75acd7ea95
Fix typefind test if typefind factories without caps are available
2018-07-06 10:35:57 +02:00
Sebastian Dröge
e88017f914
Ensure that miniobjects are writable before creating a mutable borrow
2018-07-06 10:29:09 +02:00
Sebastian Dröge
e0972ae1e5
Get rid of manual usage of callback_guard!
2018-06-24 14:52:50 +03:00
Sebastian Dröge
2085d170be
Get rid of callback_guard! as unwinding through FFI is defined behaviour now and aborts
2018-06-24 14:42:11 +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
François Laignel
f4d57a6652
Fix memory issue building a Sample
with an info
Structure
...
The following code in a `[test]`:
``` rust
let info = Structure::builder("sample.info")
.field("f3", &123i32)
.build();
let sample = Sample:🆕 :<GenericFormattedValue>(
None,
None,
None,
Some(info.as_ref())
);
```
generates one of the followings executing `cargo test`:
```
- segmentation fault
- signal: 6, SIGABRT: process abort signal
- signal: 11, SIGSEGV: invalid memory reference
```
This is due to `ffi::gst_sample_new` expecting to take ownership of the `info`
`Structure`.
2018-06-12 00:23:10 +03:00
Sebastian Dröge
1192a027b4
Regenerated with latest GIR and GIR files
2018-05-21 11:55:19 +03:00
Sebastian Dröge
4692806b00
Add Bus::remove_watch()
...
It was accidentially ignored before
2018-05-19 10:37:09 +03:00
Sebastian Dröge
da6b04abfd
Bus::create_watch() can't return None, change it to return no Option
2018-05-19 10:36:15 +03:00
Thibault Saunier
2962f186f7
Print pointer value when formatting debug strings
2018-05-14 09:22:25 +03:00
Sebastian Dröge
c31921e093
Further work-arounds for floating reference handling changes between 1.12 and 1.14
...
This fixes various memory-safety issues caused by broken reference
counting. We have to handle pre-1.14 and post-1.14 differently in
constructors.
See https://bugzilla.gnome.org/show_bug.cgi?id=743062#c30
2018-05-09 12:20:59 +03:00
Sebastian Dröge
2cefd9aea6
Re-run everything through rustfmt
2018-04-25 11:13:14 +03:00
Sebastian Dröge
46d27e3e75
Regenerate everything with latest GIR
2018-04-23 20:45:15 +03:00
Sebastian Dröge
a276c226fd
Port BusStream to futures 0.2
2018-04-23 20:27:17 +03:00
Sebastian Dröge
03055f4e84
Change Structure/StructureRef to_string() to the minimal required fix
...
And add a comment to why we need it. No other struct with a to_string()
function is affected.
https://github.com/sdroege/gstreamer-rs/issues/101
2018-04-07 13:37:44 +03:00
Sebastian Dröge
ce9b98f338
Add Display impl for StructureRef too
2018-04-06 13:22:08 +03:00
Sebastian Dröge
f346d57b4f
Fix infinite recursion in Structure::to_string()
...
Instead of StructureRef's to_string(), we were calling
ToString::to_string() in the Display impl. Which then called into itself
again.
Fixes https://github.com/sdroege/gstreamer-rs/issues/101
2018-04-06 13:22:08 +03:00
Guillaume Desmottes
c5617f6a47
WIP: test Structure string conversions
2018-04-06 13:22:08 +03:00
Sebastian Dröge
9a3ef2e9f1
Regenerate with latest GIR and update for the non-bitflags flags in -sys now
2018-04-04 10:47:12 +03:00
Sebastian Dröge
492c3d656c
Run everything through rustfmt again
2018-04-01 11:57:58 +03:00
Sebastian Dröge
fca0287dec
Use ptr::NonNull in various places
2018-04-01 11:29:55 +03:00
Sebastian Dröge
a33fd41d02
Regenerate everything with latest gir
2018-03-20 11:52:29 +02:00
François Laignel
cd56d60352
Bus::get_pollfd generate doc for both unix & windows
...
There are different implementations and signatures for `get_pollfd` depending
on whether the target platform is unix or windows. When generating the doc,
we need both implementations to appear regardless of the target platform. This
commit is inspired by the way Rust `std` library deals with `process::Command`
OS dependent variants
(https://doc.rust-lang.org/std/process/struct.Command.html#impl-CommandExt ).
Documentation can't be accurate though as we can't use the`std::os::windows`
on `unix` and vice versa. As a workaround a fake fd class matching the other
platform is declared.
This could be further enhanced once `#[doc(cfg(...))]` is stabilized
(https://github.com/rust-lang/rust/issues/43781 ) by declaring `#[doc(cfg(unix))]`
or `#[doc(cfg(windows))]` instead of the hard coded comments `This is supported
on **Windows/Unix** only`. Unfortunately, these comments disappear when
generating will `--all-features` because they are not part of the documentation
in the gir file.
2018-03-19 13:48:59 +02:00
François Laignel
406eb119d3
message: add test_other_fields
...
Fixes https://github.com/sdroege/gstreamer-rs/pull/93
2018-03-19 10:32:07 +02:00
Sebastian Dröge
3a755219f4
Add Promise bindings
2018-03-19 10:32:07 +02:00
Sebastian Dröge
0112d22804
Various manual 1.14 API additions and remove deprecated functions
2018-03-19 10:32:07 +02:00
Sebastian Dröge
4864a1e089
Fix build
2018-03-19 10:32:07 +02:00
Sebastian Dröge
1abe9cbeb9
Update gstreamer
2018-03-19 10:32:07 +02:00
François Laignel
93442e94dd
element: add feature gate for test_call_async
...
Fixes https://github.com/sdroege/gstreamer-rs/pull/92
2018-03-16 17:51:56 +02:00
Sebastian Dröge
11c974a55e
Fix some unused import compiler warnings if using < v1_10
2018-03-16 12:28:20 +02:00
Sebastian Dröge
fc7cda4522
Directly dereference DebugCategory struct to read the threshold and #[inline]
...
This should improve logging performance if the threshold is not high
enough.
2018-03-16 12:27:36 +02:00
Sebastian Dröge
c38af51bf0
Add Element::call_async() bindings
2018-03-14 15:42:17 +02:00
Sebastian Dröge
de8f4694f5
Add initial BufferPool bindings
2018-03-07 11:08:21 +02:00
Sebastian Dröge
a3b294f0f2
Add back callback guards
2018-03-02 21:34:29 +02:00
Sebastian Dröge
808ff293ec
Regenerate everything with latest gir
2018-03-02 21:34:29 +02:00
Sebastian Dröge
4117c01ff2
Run everything through latest rustfmt-nightly
2018-02-22 11:18:37 +01:00
François Laignel
84e4546f72
Toc: implement Debug trait
2018-02-20 19:29:26 +01: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
François Laignel
c971727193
Query: allow concrete query instantiation
...
Allow instantiating and dereferencing concrete queries. The motivation
for this proposal is to allow the following usability enhancements:
- Concrete queries mutability guaranteed by the borrow checker,
including for generic functions:
``` rust
let mut p = Query::new_position(::Format::Time);
p.get_mut_structure().set("check_mut", &true);
```
- Concrete queries functions available in place:
``` rust
let mut q = gst::Query::new_duration(gst::Format::Time);
let duration = if pipeline.query(&mut q) {
Some(q.get_result())
} else {
None
};
```
2018-02-16 10:33:40 +02:00
Sebastian Dröge
6d0d7a3df8
Regenerate everything with latest GIR
2018-02-06 16:42:34 +02:00
François Laignel
ac31688fbd
Value: use new union for GValue_data
2018-02-05 05:28:09 +01:00
fengalin
da924e5d4d
Event & Message: factorize common attributes in generic builders
...
Concrete events and messages share common attributes which can be factorized in generic builder `struct`s. This reduces noise in the concrete implementations.
2018-01-29 17:33:49 +02:00
fengalin
2d1218e6d6
Event, Message & Query: allow dereferencing concrete types to access generic type methods
...
Implement `deref` for concrete derivatives of `Event`, `Message` and `Query`. This allows accessing generic methods such as `is_sticky` for events, `get_seqnum` for messages or `is_serialized` for queries and `get_structure` for all.
2018-01-29 17:33:49 +02:00
fengalin
86812c1a53
MessageBuilder: comment out other_fields related methods until GStreamer v1.14 is released
...
These methods are commented out in order to maintain consistency between messages with and without arguments. It will be restored and conditioned to feature "v1_14" when GStreamer v1.14 is released.
2018-01-29 10:07:42 +02:00
fengalin
3c65a50076
Fix building argument-less messages
...
Building an argument-less message such as eos yields an assertion failure due to the inner structure being null. The short term solution consists in checking that the inner `structure` is not `null` before attempting to insert `other_fields`. The consequence is that `others_fields` defined for argument-less messages will be ignored. A correction will be applied when GStreamer 1.14 is released thank to the introduction of `gst_message_writable_structure` (see https://bugzilla.gnome.org/show_bug.cgi?id=792928 ). Due to the dependency on GStreamer 1.14, the correction will be only available under the activation of a feature "v1_14".
Events are not affected as the build method the availability of `gst_event_writable_structure` and this function "will never return NULL". However, we can avoid a `structure` allocation for argument-less messages without `other_fields`.
2018-01-29 10:07:42 +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
65468c1fc8
Add Sample::get_info() and deprecate get_structure()
...
For consistency with the C API naming.
2017-12-30 12:03:03 +02:00
Sebastian Dröge
4a9cb50670
Add Sample::with_buffer_list() constructor
2017-12-30 12:02:48 +02:00
Sebastian Dröge
f47b30b8d1
Add Debug impl for Sample
2017-12-30 12:02:33 +02:00
Sebastian Dröge
755982bb38
Correctly mark Stream and StreamType as requiring version 1.10 at least
...
Should fix https://github.com/sdroege/gstreamer-rs/issues/68
2017-12-26 18:13:15 +01:00
Sebastian Dröge
c56251d673
Don't require a mutable self for TagSetterExtManual::add()
...
Like all GObjects, mutation works through interior mutability.
2017-12-23 11:43:09 +02:00
Sebastian Dröge
9b6efb2339
Fix various clippy warnings
2017-12-20 21:46:58 +02:00
Sebastian Dröge
15ea81e473
Derive Clone on ErrorMessage
2017-12-20 20:08:00 +02:00
Sebastian Dröge
9066cf0634
Add ErrorMessage type
...
This can be used to propagate an element error via a Result until the
place where it can be actually posted on an element.
2017-12-20 20:00:05 +02:00
Sebastian Dröge
e0dc84c10a
Run everything through rustfmt again
2017-12-20 19:30:14 +02:00
Sebastian Dröge
f439f14ec3
SystemClock::set_default() can accept None
2017-12-20 18:57:16 +02:00
Sebastian Dröge
95c9f92549
Add StreamCollection::iter()
2017-12-20 18:54:56 +02:00
Sebastian Dröge
67a46b3bf5
Most Preset functions that return a bool signal an error with this, use a Result
2017-12-20 18:47:04 +02:00
Sebastian Dröge
f2729fb730
Preset::set_app_dir() returning false is an error, make it a Result
2017-12-20 18:44:57 +02:00
Sebastian Dröge
d182584c25
Object::set_name() should not accept NULL
2017-12-20 18:35:41 +02:00
Sebastian Dröge
55c8cf69f3
update_registry() returning false is not an error
...
It means that there were no changes.
2017-12-20 18:22:30 +02:00
Sebastian Dröge
e34212d517
parse_bin_from_description() return value is not nullable, except for errors
2017-12-20 18:22:30 +02:00
Sebastian Dröge
210119d9aa
Element::set_clock() allows None for the clock parameter
2017-12-20 18:22:30 +02:00
Sebastian Dröge
6d7acd200d
Element::set_bus() allows None for the bus parameter
2017-12-20 18:10:50 +02:00
Sebastian Dröge
241bb823d5
Element::link_pads_full() should return a Result instead of a bool
2017-12-20 18:07:55 +02:00
Sebastian Dröge
e2970db84c
Failure to post a message is an error, so return a Result instead of a bool
2017-12-20 18:07:28 +02:00
Sebastian Dröge
6d8cfa5de0
Add support for TypeFind and implement Ord on Rank and TypeFindProbability
...
Fixes https://github.com/sdroege/gstreamer-rs/issues/11
2017-12-19 19:14:12 +02:00
Sebastian Dröge
12ee7358e3
Add bindings for TypeFindFactory
2017-12-18 09:53:08 +02:00
Sebastian Dröge
5dd89d01e2
DeviceMonitor/Provider::start() should return a Result
2017-12-18 09:49:15 +02:00
Sebastian Dröge
48958d381e
Implement Sync for DateTime
...
It's immutable.
2017-12-18 09:42:27 +02:00
Sebastian Dröge
9223386750
Remove clock parameter from Clock::(un)adjust_with_calibration()
...
It's useless and not used.
2017-12-18 09:39:37 +02:00
Sebastian Dröge
9a7ede1dcc
Bus::add_signal_watch_full() should take a Priority, not u32 for the priority
2017-12-18 09:39:14 +02:00
Sebastian Dröge
49627b8de7
Various nullability fixes everywhere and hide enum->string functions
2017-12-17 18:29:22 +02:00
Sebastian Dröge
5108c941ed
Various nullability fixes to plugin bindings, and add add_dependency() API
...
Also fix structure ownership for the cache data API
2017-12-17 14:26:17 +02:00
Sebastian Dröge
4b2fd0e593
Require SendValue for value::Array and value::List
2017-12-17 14:06:22 +02:00
Sebastian Dröge
2035bba437
Make value of Bitmask public
2017-12-17 11:57:37 +02:00
Sebastian Dröge
1f6fd3def7
Structure intersection can return None
2017-12-17 11:52:52 +02:00
Sebastian Dröge
dfdae187a3
Filter in caps queries can be None, and there could be no resulting caps
2017-12-17 11:32:01 +02:00
Sebastian Dröge
ffb5869dd1
Use the correct pad type for the proxy/ghost pad default pad functions
2017-12-17 11:24:03 +02:00
Sebastian Dröge
62058ab1c3
Use &ToSendValue for the stream-status stream_object in the builder
2017-12-16 18:39:50 +02:00
Sebastian Dröge
ccf6c1a632
Owner of structure-change and stream-status messages is mandatory
2017-12-16 18:39:33 +02:00
Sebastian Dröge
bcf6b34c1b
Code/text of progress messages is mandatory
2017-12-16 18:38:53 +02:00
Sebastian Dröge
974e681a5d
Move optional taglist/entry_struct fields into the Redirect builder from the constructor
2017-12-16 18:13:25 +02:00
Sebastian Dröge
7bc1fce97d
Move value for PropertyNotification message into the builder instead of constructor
2017-12-16 18:10:10 +02:00
Sebastian Dröge
c2f075ed8d
Description of debug categories is optional
...
Also add a getter for the description of a debug category
2017-12-16 17:56:23 +02:00
Sebastian Dröge
f7c971874d
Implement Display and Error for IteratorError
2017-12-16 17:48:38 +02:00
Sebastian Dröge
7065d1d884
Add constants for COPY_ALL and COPY_METADATA buffer copy flags
2017-12-16 17:40:47 +02:00
Sebastian Dröge
fa05ee7b08
Various fixes for nullability in the event bindings
...
The origin in protection events is optional, the stream id in
stream-start events is not.
Also return a segment reference instead of a segment copy when parsing a
segment event.
2017-12-16 17:30:50 +02:00
Sebastian Dröge
9608ef52ec
Mark Segment as #[repr(C)]
2017-12-16 17:30:37 +02:00
Sebastian Dröge
b9c4e4cd6e
Allow no value for the PropertyNotify message
...
It can contain no value.
Also use &ToSendValue instead of an actual value for building the
message.
2017-12-16 15:37:06 +02:00
Sebastian Dröge
52ca97e7e6
Let ChildProxy::set_child_property() take a &ToValue instead of an actual Value
2017-12-16 15:24:18 +02:00
Sebastian Dröge
3de73d89f2
Add Buffer::copy_into() and add flags parameter to ::copy_region()
...
Also ::copy_deep() can fail, return an Option<_>
2017-12-16 15:15:42 +02:00
Sebastian Dröge
18f99073c1
Use from_glib_none/full directly on potential NULL pointers if Option<_> is returned
...
The implementation for Option<_> is doing exactly what we did manually
here.
2017-12-16 15:07:26 +02:00
Sebastian Dröge
8a2c6a3246
Implement AsRef<[u8]>, AsMut, Deref, DerefMut, PartialEq, Eq and Debug for BufferMap too
2017-12-13 11:00:29 +02:00
Sebastian Dröge
e37c3d684c
Fix PartialEq for MappedBuffer
...
No need to map the buffer again, we can just compare the slice directly.
2017-12-13 11:00:02 +02:00
Sebastian Dröge
5dff6026be
Also implement Deref/DerefMut for MappedBuffer for &[u8]
2017-12-13 10:55:26 +02:00
Sebastian Dröge
85fdc8bf13
Implement AsRef<[u8]>, AsMut, Debug, PartialEq and Eq for MappedBuffer
2017-12-13 09:58:41 +02:00
Sebastian Dröge
298cb754c9
Fix precision handling in ClockTime Display impl
2017-12-10 12:31:41 +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
520a9bb879
Use downcast_unchecked() for sender in deep-notify signal handler
...
This is guaranteed to be of the correct type.
2017-12-09 18:08:57 +02:00
Sebastian Dröge
963557b79f
Query::get_structure() can also return NULL
2017-12-06 13:43:37 +02:00
Sebastian Dröge
1f80df493a
Let the glib::Value destructor clean up our values instead of doing so manually
2017-12-06 11:17:59 +02:00
Sebastian Dröge
ad7b21ba55
Use unwrap_or_else() for the default value in the DateTime Display impl
2017-12-05 23:20:10 +02:00
Sebastian Dröge
05c51dd778
Change all values in Segment to FormatValue
2017-12-05 23:16:12 +02:00
Sebastian Dröge
e6da3554ee
Use ClockTime for the Duration tag
...
And implement the Value traits for ClockTime
2017-12-05 22:54:03 +02:00
Sebastian Dröge
f1c6c4fd06
Change various integers to FormatValue and ClockTime in events/queries/messages
2017-12-05 22:43:37 +02:00
Sebastian Dröge
801a7ed43c
Use ClockTime instead of u64 for the Gap event
2017-12-05 21:36:56 +02:00
Sebastian Dröge
55f044dd83
Add newtype wrappers and INVALID constants for event/message GroupId and Seqnum
2017-12-05 21:33:04 +02:00
Sebastian Dröge
97b786a0c7
Regenerate element bindings for gst_element_remove_pad() annotation fix
2017-12-04 18:12:55 +02:00
Sebastian Dröge
88ff4289d1
Add Event::set_running_time_offset()
2017-12-03 17:13:46 +02:00
Sebastian Dröge
e5bbf93670
Registry::scan_path() returning false is not an error
2017-12-03 14:54:52 +02:00
Sebastian Dröge
6015e74f0e
Regenerate with gir filename/utf8 fixes
2017-12-03 14:51:16 +02:00
Sebastian Dröge
49e1fe1c3f
Add bindings for Registry and PluginFeature
2017-12-03 14:40:38 +02:00
Sebastian Dröge
c6c7693550
Add Buffer::get_dts_or_pts()
2017-12-02 12:15:07 +02:00
Sebastian Dröge
411f54afed
Run everything to rustfmt again
2017-12-01 19:02:53 +02:00
Sebastian Dröge
0920008869
Print clock times as actual time in Segment/Buffer/BufferList debug output
2017-12-01 19:02:29 +02:00
Sebastian Dröge
fccb1eca5e
Implement fmt::Debug more consistently for miniobjects and various other types
2017-12-01 11:34:01 +02:00
Sebastian Dröge
c57d5523d2
Implement ToOwned for Message/Event/QueryRef
2017-12-01 11:34:01 +02:00
Sebastian Dröge
1576ff6c32
Event/Message::get_structure() can return None
2017-12-01 11:33:21 +02:00
Sebastian Dröge
7342a0fb98
Implement some functions on EventType and implement PartialOrd for serialized events
2017-11-29 18:55:56 +02:00
Sebastian Dröge
8a2e78e586
Regenerate with latest GIR to fix various issues with property getters
...
Get rid of unneeded transmutes and actually initialize flags/enum
GValues with the correct type instead of using integers.
2017-11-27 19:16:34 +02:00
Sebastian Dröge
b198ee21da
Let Sample::new(), TagList::add(), Structure::set() and others take more values by reference instead of by value
2017-11-27 14:34:02 +02:00
Sebastian Dröge
2508f432f4
Remove some unneeded lifetime annotations
2017-11-27 14:03:33 +02:00
Sebastian Dröge
52d13c010a
Add TagListRef::merge() and ::insert()
2017-11-27 14:03:33 +02:00
Sebastian Dröge
029527a6d4
Toc::merge() doesn't take ownership of the taglist
2017-11-27 14:03:33 +02:00
Sebastian Dröge
8c697b3a27
Use Arc::clone(&val) instead of val.clone() to make it more explicit that only the Arc cloned here
2017-11-27 14:03:33 +02:00
Sebastian Dröge
34f70ee0d7
Derive more useful traits for various enums
2017-11-27 14:03:30 +02:00
Sebastian Dröge
eee82fd402
Export FlowError/Success, ClockError/Success, PadLinkError/Success too
2017-11-26 20:40:05 +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
1dbc63dcb3
Message::get_src() can return None
...
The src is optional
2017-11-16 13:58:42 +02:00
Sebastian Dröge
d430467ed5
Don't require Send for Structure::get()
...
Otherwise we won't be able to get references here.
2017-11-16 13:39:01 +02:00
Sebastian Dröge
9085474e37
Fix error/warning/info message macros that use format strings
2017-11-16 13:37:52 +02:00
Sebastian Dröge
7eb8429046
Run everything through latest rustfmt-nightly again
2017-11-15 22:33:51 +02:00
Sebastian Dröge
0629a0283e
Use SendValue instead of Value for all our GValue usage
...
We require types that can be sent between threads.
2017-11-15 20:32:52 +02:00
Sebastian Dröge
9734ec29cc
Implement macros for Element::message_full_with_details()
...
Allows attaching arbitrary structures to error/warning/info messages
2017-11-15 17:03:19 +02:00
Sebastian Dröge
d4bd1c2d76
Add dox feature to everything as needed
2017-11-12 13:33:02 +01:00
Sebastian Dröge
d857fbd349
Add helper macros for generating error/warning/info messages
2017-11-11 16:43:29 +01:00
Sebastian Dröge
5494e5b827
Use u32 instead of i32 for Element::message_full() line numbers
2017-11-11 16:38:54 +01:00
Sebastian Dröge
126159c762
Run everything through rustfmt once again
2017-11-11 13:31:01 +01:00
Sebastian Dröge
2fc3470fa1
Add a Builder for caps and structures
2017-11-11 13:18:50 +01:00
Sebastian Dröge
f823ef9cf7
Add constants for SECONDS, etc in u64
2017-11-11 13:00:50 +01:00
Sebastian Dröge
d5b2f5900c
Add API for converting ClockTime to/from mseconds, useconds, nseconds
2017-11-11 12:44:58 +01:00
Sebastian Dröge
246a54368d
Clean up Query API a bit
...
There's now get_result() instead of get(), and separate getters for only
getting the constructor arguments of each query (otherwise query
handlers will get useless values when trying to answer a query).
2017-11-11 12:27:30 +01: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
f6ffa6919f
Run latest commit through rustfmt
2017-11-10 18:24:44 +01:00
Philippe Normand
93a1b3929c
Implement Error trait for error enums.
2017-11-10 17:51:06 +01:00
Sebastian Dröge
5d266bf31b
Regenerate with latest GIR
...
Which gives us mappings between instance and class struct for now.
2017-11-09 13:33:40 +02:00
Sebastian Dröge
95204c2294
Add Success/Error variants of #[must_use] enums
...
And implement basically the Try trait for them. This will be replaced by
the Try trait once it is stable.
Fixes https://github.com/sdroege/gstreamer-rs/issues/44
2017-11-06 11:43:54 +02:00
Sebastian Dröge
e8638c1630
Mark various enums that can signal errors as #[must_use]
...
See https://github.com/sdroege/gstreamer-rs/issues/44
2017-11-05 19:16:50 +02:00
Sebastian Dröge
3179806f01
Regenerate everything with latest GIR
...
And fix-up manual code
2017-11-05 19:08:39 +02:00
Sebastian Dröge
99a60e921d
Ignore property notify functions
...
They're manually implemented now.
2017-11-04 12:12:07 +02:00
Sebastian Dröge
b58f4cd1ed
Add Object::connect_deep_notify() and test
2017-10-27 23:03:45 +02:00
Sebastian Dröge
ec6dde855a
Replace ulong for the property notify watches with a custom NotifyWatchId type
2017-10-27 17:55:48 +02:00
Sebastian Dröge
a1a841afc8
Require Send+'static for Buffer::from_*slice()
2017-10-26 14:02:36 +02:00
Sebastian Dröge
f08f0f6f15
Add tests for Bin::get_children() and Element::get_*pads()
2017-10-26 13:29:37 +02:00
Sebastian Dröge
95317267ec
Add BinExtManual::get_children() that returns a Vec<Element>
...
This is sometimes more convenient than using the iterator.
2017-10-25 12:58:22 +02:00
Sebastian Dröge
20729497a2
Add ElementExtManual::get_{,src,sink}pads() functions
...
These can sometimes be more usable than the iterator based approach
2017-10-25 12:58:22 +02:00
Sebastian Dröge
f30121ec53
Add private utils module with a MutexGuard around GMutex
2017-10-25 12:58:16 +02:00
Sebastian Dröge
342d89dd44
Allow creating buffers from AsRef<[u8]> and AsMut<[u8]>
...
Not just from Vec<u8>.
2017-10-20 18:37:38 +02:00
Sebastian Dröge
e1d134c4be
Run everything through latest rustfmt-nightly
2017-10-17 12:06:51 +03:00
Sebastian Dröge
9a6713b901
Store pointers for static caps and pad templates
...
We don't own them, we don't want to copy them. They're *statically*
allocated things in C.
2017-10-15 11:27:08 +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
1f16a39ca4
Move gst_mini_object_copy() from GstRc<T> to MiniObject directly
...
It can also be called on the shallow references.
2017-10-12 17:58:46 +03:00
Sebastian Dröge
b773c0b46a
Fix compilation again now that GstRc::get_mut() requires &mut self again
2017-10-11 15:39:27 +03:00
Sebastian Dröge
5589d5221f
Revert "Don't require &mut self for GstRc::get_mut()"
...
This reverts commit 4b77c18b5b
.
It unfortunately allows to get multiple mutable references to the same
underlying data, which is not allowed.
2017-10-11 15:30:55 +03:00
Sebastian Dröge
d85be4fe03
Don't make variable mutable if not needed
2017-10-09 16:38:13 +03:00
Sebastian Dröge
4b77c18b5b
Don't require &mut self for GstRc::get_mut()
2017-10-05 14:48:33 +03:00
Sebastian Dröge
19c5556239
Regenerate with latest GIR
2017-10-01 15:52:15 +02: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
fengalin
7a108ddd0d
Set version (1.12) for StackTraceFlags
...
Fixes https://github.com/sdroege/gstreamer-rs/pull/36
2017-09-17 18:58:10 +03:00
Sebastian Dröge
5881dc7d53
Also export IteratorImpl trait
2017-09-17 18:51:45 +03:00
Sebastian Dröge
191b90b1df
Add copyright/license header to iterator.rs
2017-09-17 18:50:35 +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
8085c4ce8e
Add gst::Iterator example with Resync handling
2017-09-17 14:59:01 +03:00
Sebastian Dröge
f7bce553cd
Implement std::iter::Iterator<Item=Result<glib::Value, IteratorError> for gst::Iterator
2017-09-17 14:43:33 +03:00
Sebastian Dröge
8306e5cf72
Add more complete gst::Iterator bindings
...
filter(), foreach(), find(), fold() are implemented now and we can
create our own iterators from a Vec<_> or by implementing a new trait.
2017-09-17 13:31:34 +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
cc9780520c
Implement StaticType for BufferRef, not Buffer
2017-09-16 19:27:46 +03:00
Sebastian Dröge
3cb5b591ca
Add bindings for Element::message_full() and _full_with_details()
2017-09-15 19:00:51 +03:00
Sebastian Dröge
de10335167
Allow creating Error/Warning/Info messages only from specific kinds of glib::Error domains
2017-09-15 18:35:54 +03:00
Sebastian Dröge
499ca3eff3
Also implement Sync+Send for Event and Message
2017-09-14 15:52:40 +03:00
fengalin
bb1b3cb1b4
Implement Sync and Send for Query
...
Fixes https://github.com/sdroege/gstreamer-rs/pull/35
2017-09-14 15:52:34 +03:00
Sebastian Dröge
608279c6d4
Fix various clippy warnings
2017-09-13 23:54:22 +03:00
Sebastian Dröge
17cce1a3d7
Add support for setting custom fields in message/events during construction
2017-09-13 22:38:19 +03:00
Sebastian Dröge
60e6bd8604
Require passing an object reference directly to the GStreamer logging macros
2017-09-11 14:18:32 +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
ca6c597fad
Add bindings for the GStreamer logging system
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
380fb319ba
Don't return &'static references from functions but give them a generic lifetime
...
https://github.com/rust-lang/rust/pull/42417#issue-233404573
2017-09-01 11:40:32 +03:00
Sebastian Dröge
0454a9cb95
Ignore some now generated functions for which we have manual implementations
2017-08-31 12:13:44 +03:00
Sebastian Dröge
dae1a51764
Work around rustdoc bug with impls on type aliases
...
https://github.com/rust-lang/rust/issues/44182
2017-08-30 15:12:11 +03:00
Sebastian Dröge
52c013b834
Regenerate everything with latest GIR
2017-08-30 14:45:25 +03:00
Sebastian Dröge
f0935d7e1e
Add remaining gst_init() assertions
2017-08-30 14:39:09 +03:00
Sebastian Dröge
f05df73088
Add various gst_init() assertions to video/app bindings
...
audio and core should come next.
Also print something more meaningful than using assert_eq!().
2017-08-30 12:48:01 +03:00
Sebastian Dröge
8013169e09
Add constants for SECOND, MSECOND, USECOND, NSECOND
...
And use them in the examples.
2017-08-29 11:07:59 +03:00
Sebastian Dröge
342d5ab935
Add signal connectors for property notifications
...
Have to hide some properties again at a later time, which have actual
getter/setter functions already. We only need the notification signals
for those.
Depends on the GIR patch in https://github.com/gtk-rs/gir/pull/441
2017-08-18 17:43:55 +03:00
Sebastian Dröge
337f00a85c
Implement SetValueOptional for Structure
2017-08-18 16:28:08 +03:00
Sebastian Dröge
14adb331ec
Implement StaticType on the actual MiniObjects, not the GstRc wrapper
2017-08-18 16:21:49 +03:00
Sebastian Dröge
6c4ee55f27
Implement SetValueOptional for GstRc<T>
2017-08-18 15:38:51 +03:00
Sebastian Dröge
f751afc0fb
Add prelude modules to all cratest that only re-export the traits
...
And use those in the examples instead of blanket * imports
2017-08-17 18:02:25 +03:00
Sebastian Dröge
767bd0537e
Only re-export traits once
2017-08-17 16:32:17 +03:00
Sebastian Dröge
50a1535771
Add ParseContext bindings and corresponding functions
...
And use it in the launch example to print more useful error information,
like which elements are missing.
2017-08-17 16:17:02 +03:00
Sebastian Dröge
e7a0543c73
Clean up global functions
2017-08-17 15:31:00 +03:00
Sebastian Dröge
33fb38efd9
Remove traits for things that are not subclassed
2017-08-17 14:50:25 +03:00
Sebastian Dröge
165d85646f
Move futures based BusStream from examples to the bindings
...
And hide behind the "futures" feature.
Fixes https://github.com/sdroege/gstreamer-rs/issues/26
2017-08-17 13:07:59 +03:00
Sebastian Dröge
08e2f6d917
Add Element::get_metadata(), get_pad_template(), get_pad_template_list() and DeviceProvider::get_metadata()
...
As wrapper around the C class functions.
Fixes https://github.com/sdroege/gstreamer-rs/issues/28
2017-08-17 12:49:58 +03:00
Sebastian Dröge
7991b4d8eb
Don't export tag name strings directly
...
They can be accessed via the Tag trait impls instead
2017-08-17 12:49:58 +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
de98b8039e
Add GstPadLinkCheck
2017-08-14 22:19:47 +03:00
Sebastian Dröge
97bca10484
Add GstRank
2017-08-14 22:18:34 +03:00
Sebastian Dröge
474749598e
Add GstElementFlags and suppressed_flags API of GstBin
2017-08-14 22:15:37 +03:00
Sebastian Dröge
77cb4da32a
Add ClockId and related waiting API, and SystemClock
...
Fixes https://github.com/sdroege/gstreamer-rs/issues/23
2017-08-14 01:41:37 +03:00
Philippe Normand
d654252e65
gstreamer: disable calculate_linear_regression
...
It's not binding friendly.
2017-08-11 15:42:28 +03:00
Philippe Normand
8badc33df9
gstreamer: expose version functions
2017-08-11 15:41:20 +03:00
Sebastian Dröge
93cc21112c
Don't re-export everything from the tags module
...
All the tags are supposed to be used via gst::tags::Title, etc to
prevent conflicts.
2017-08-11 15:32:28 +03:00
Sebastian Dröge
1a3b556fb6
Make Buffer map bindings more simple and consistent
2017-08-11 15:20:43 +03:00
Sebastian Dröge
e1538b6ca5
Add bindings for various audio channel position functions
2017-08-10 14:39:57 +03:00
Sebastian Dröge
009bb7f39b
Add getters/setters for all the segment fields
2017-08-10 01:25:19 +03:00
Sebastian Dröge
2452f7f6a9
Allow usage of Structures in GValues
2017-08-10 01:13:28 +03:00
Sebastian Dröge
a10d081c22
Fix FromValueOptional impl for Segment
...
Should be from_glib_none(), not from_glib_full()
2017-08-10 01:09:42 +03:00
Sebastian Dröge
c8910aae08
Initial gstreamer-audio bindings
...
Only wrapping AudioInfo and AudioFormatInfo and related for now.
https://github.com/sdroege/gstreamer-rs/issues/4
2017-08-09 20:33:45 +03:00
Sebastian Dröge
146b3092aa
Minor miniobject code cleanup
2017-08-09 20:08:02 +03:00
Sebastian Dröge
f00af84105
Properly implement Eq/PartialEq/Debug for miniobjects
2017-08-09 20:08:02 +03:00
Sebastian Dröge
31b65e572c
Add bindings for Bitmask values
2017-08-09 20:08:02 +03:00
fengalin
04f09ebc86
Add bindings for GstToc/TocSetter
...
https://github.com/sdroege/gstreamer-rs/pull/22
Fixes https://github.com/sdroege/gstreamer-rs/issues/10
2017-08-09 19:38:39 +03:00
Sebastian Dröge
f1ac59a400
Autogenerate GstObject bindings again now that gir has support for renaming the trait
2017-08-07 10:24:43 +03:00
Sebastian Dröge
88f4fe5ea3
The message signal of Bus only has to require Send for the closure
2017-08-04 23:04:42 +03:00
Sebastian Dröge
3395203a53
Make miniobject ToOwned impls actually safe
...
Previously it was possible to create a new reference from a mutable
reference, which is not good. Now a copy is always created to prevent
that.
2017-08-04 18:51:27 +03:00
Sebastian Dröge
86fc001e35
Regenerate code with new GIR and suppress various clippy warnings in generated code
...
Now only a few are left in the manually written code.
2017-08-03 21:56:39 +03:00
Sebastian Dröge
d6c032be7b
Add bindings for Pad::stream_lock()
2017-08-03 11:11:07 +03:00
Sebastian Dröge
ed90fcbd10
Add bufferlist support to Sample
2017-08-03 10:15:20 +03:00
Sebastian Dröge
a0c6db70e0
Add Context support for messages/queries
2017-08-02 20:58:33 +03:00
Sebastian Dröge
bf0f472014
Add autogenerated GstContext functions
2017-08-02 20:46:39 +03:00
Sebastian Dröge
0720b9f6f1
Add missing array translation trait impls to GstRc<T>
2017-08-02 20:46:22 +03:00
Sebastian Dröge
3fdc4cf5fc
Add GstContext bindings
2017-08-02 20:34:37 +03:00
Sebastian Dröge
d7baadee22
Fix various other compiler/clippy warnings
2017-08-02 20:09:00 +03:00
Sebastian Dröge
32c5218e7d
Fix indentation
2017-08-02 19:41:33 +03:00
Sebastian Dröge
09db28bbf5
Fix various clippy warnings
2017-08-02 19:40:31 +03:00
Sebastian Dröge
c4c8e738fd
Enable Date tag and GDataTime support for GstDateTime
2017-08-02 11:39:37 +03:00
Sebastian Dröge
23ef3c1f08
Add a function to unset the Bus' current sync handler
...
And use it in the Tokio example to unset the handler once the BusStream
is dropped.
2017-08-01 20:52:29 +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
e55c7d4088
Rename ObjectExt trait to GstObjectExt
...
This works around a bug in the compiler with multiple traits having the
same name, but being re-exported with a different one.
https://github.com/gtk-rs/glib/issues/211
2017-08-01 14:04:42 +01:00
Sebastian Dröge
38496eca7d
Pass events by value instead of reference
2017-08-01 13:59:12 +01:00
Sebastian Dröge
eb567a5048
Rename ChildProxy::set/get_property() to set/get_child_property() to prevent conflict with glib::ObjectExt
2017-07-31 17:14:00 +01:00
Sebastian Dröge
03285a6311
Run everything through latest rustfmt-nightly
2017-07-31 12:16:42 +01:00
Sebastian Dröge
ff12c054e3
Add all tags from core
2017-07-31 11:33:05 +01:00
Sebastian Dröge
7e24bae7c0
Improve Segment bindings to directly store the segment instead of a pointer to it
2017-07-31 10:54:22 +01:00
Sebastian Dröge
0a0b82d1b2
Get tag names from gstreamer-sys
2017-07-30 23:11:57 +01:00
fengalin
61cc1aaea7
Add more tags Album covers can be found in image
as a Sample
Some containers (e.g. mkv) may use album-artist
instead of artist
2017-07-30 22:59:48 +01:00
Sebastian Dröge
f06bc0d6ef
Add event example and clean-up event/message constructor API
2017-07-30 15:49:25 +01:00
Sebastian Dröge
70a98cdc59
Fix compilation of 1.10 API
2017-07-30 15:15:34 +01:00
Sebastian Dröge
35160bedbc
Add support for Events in pad probes
2017-07-30 15:11:47 +01:00
Sebastian Dröge
421e648a27
Enable functions working on Events
2017-07-30 15:09:51 +01:00
Sebastian Dröge
2c949a9a05
Add Event bindings
...
And make Message bindings more consistent
2017-07-30 15:06:44 +01:00
Sebastian Dröge
2915bfa299
Add support for queries in pad probes
2017-07-29 16:09:14 +01:00
Sebastian Dröge
5fa961f5b9
Add TagSetter and Preset bindings
2017-07-29 15:21:25 +01:00
Sebastian Dröge
33ccfc7225
Add GDateTime bindings
2017-07-29 15:14:02 +01:00
Sebastian Dröge
9d35eff8d5
Add ChildProxy bindings
2017-07-29 15:10:10 +01:00
Sebastian Dröge
02a4c8c14d
Add new() functions for all messages
2017-07-29 14:56:34 +01:00
Sebastian Dröge
4730500662
Add Iterator bindings
2017-07-29 14:37:06 +01:00
Sebastian Dröge
21888daab6
Add GhostPad bindings
2017-07-29 14:19:15 +01:00
Sebastian Dröge
52dbf03d4f
Add functions using queries
2017-07-29 14:04:34 +01:00
Sebastian Dröge
5afa1858ed
Fix handling of pad probe info data for real
...
The miniobjects passed are never going to be writeable due to the
additional reference, but can safely be replaced.
2017-07-29 13:52:46 +01:00
Sebastian Dröge
69e1fdd529
Add Query bindings
2017-07-29 13:52:31 +01:00
Sebastian Dröge
29d4e3a56d
Handle bufferlists in pad probes
...
And fix replacing of the previous buffer/bufferlist
2017-07-28 19:18:08 +01:00
Sebastian Dröge
a76c51ac5c
Add bufferlist bindings
2017-07-28 18:20:11 +01:00
Sebastian Dröge
210d641091
Implement Sample bindings
2017-07-28 18:04:15 +01:00
Sebastian Dröge
e3c9965eee
Add getters/setters for all the segment fields
2017-07-28 17:47:23 +01:00
Sebastian Dröge
7926257c3c
Add auto-generated Segment bindings
2017-07-28 17:38:52 +01:00
Sebastian Dröge
b5d8b44725
Renable caps value-array unit test
2017-07-28 17:01:53 +01:00
Sebastian Dröge
3bc0687025
Implement all remaining GstValue API
2017-07-28 16:47:00 +01:00
Sebastian Dröge
ad03e1e5a1
Implement Int/Fraction ranges and Array/Lists for GstValue
2017-07-28 14:52:35 +01:00
Sebastian Dröge
e75d2c224e
Add GValue support to GstRc/MiniObject
2017-07-28 11:09:34 +01:00
Sebastian Dröge
27d191f854
Use &ToValue instead of &Value for simple structure/caps setters/constructors
2017-07-27 23:36:44 +01:00
Sebastian Dröge
3dac0c8b30
Add constants for GST_BUFFER_OFFSET_NONE and GST_CLOCK_TIME_NONE
2017-07-25 15:31:45 +03:00
Sebastian Dröge
29f20ebe13
Remove various property bindings for properties that have getters/setters
2017-07-25 15:28:09 +03:00
Sebastian Dröge
80265967f7
Add some more bindings related to buffers and taglists
2017-07-25 15:21:03 +03:00
Sebastian Dröge
e73f57cd31
Add support for Buffers in pad probes
...
Including replacing of the buffer with another one
2017-07-25 15:10:31 +03:00
Sebastian Dröge
acd0fc7874
Add Buffer bindings from gst-plugin-rs
2017-07-25 15:01:24 +03:00
Sebastian Dröge
28f665502b
Implement all caps/structure operations
...
Except for anything related to caps features
2017-07-25 02:03:18 +03:00
Sebastian Dröge
d1cf7d609f
Implement Caps::iter_mut()
2017-07-25 01:33:14 +03:00
Sebastian Dröge
9fdf422e9b
Random cleanup
2017-07-25 01:17:50 +03:00
Sebastian Dröge
ab4aa57a86
Fix indentation in a few places and remove unused imports
2017-07-24 11:52:28 +03:00
Sebastian Dröge
e87c459099
Add bindings for pad probes
...
Missing for this to be actually useful: Buffer, BufferList, Event, Query bindings
2017-07-24 11:52:21 +03:00
Sebastian Dröge
c750b62e98
Regenerate with latest gir and update everything
2017-07-21 15:14:58 +03:00
Sebastian Dröge
ce33439465
Add GObjectExtManual trait and implement set_property_from_string() there
2017-07-20 11:39:44 +03:00
Sebastian Dröge
91649b259a
Regenerate with latest gir
2017-07-19 21:41:25 +03:00
Sebastian Dröge
5e58998c76
Implement FromStr for Caps and Structure
2017-07-13 14:57:02 +03:00
Sebastian Dröge
a94d4d583d
Re-export gst::ObjectExt as gst::GstObjectExt to prevent conflict with glib::ObjectExt
2017-07-13 10:36:38 +03:00
Sebastian Dröge
9c357abf1a
Add support for Fractions
2017-07-12 13:25:11 +03:00
Sebastian Dröge
8421cec1ee
Implement message types that use tag lists / structures
2017-07-12 11:06:21 +03:00
Sebastian Dröge
49ea4e45fa
Re-enable iterator test for Structure
2017-07-12 10:38:34 +03:00
Sebastian Dröge
b44c815696
Re-enable Caps tests
2017-07-12 10:32:39 +03:00
Sebastian Dröge
64f8b8c015
Add missing manual Bus bindings
2017-07-12 10:28:42 +03:00
Sebastian Dröge
796e37b4b6
Initial tag support
2017-07-12 10:27:43 +03:00
Sebastian Dröge
9cfb83d6a2
Add Source support to GstBus, and the sync message handler
2017-07-11 19:29:16 +03:00
Sebastian Dröge
71c0885575
Remove some unused "use"s
2017-07-11 00:36:38 +03:00
Sebastian Dröge
4c5aa49fa2
Run manual code through rustfmt
2017-07-11 00:33:24 +03:00
Sebastian Dröge
abe4248a96
Some more Caps cleanup
2017-07-11 00:31:53 +03:00
Sebastian Dröge
4964495b03
Implement some more missing API now that we have Structure
2017-07-11 00:26:27 +03:00
Sebastian Dröge
8f49779329
For borrowing Structures, StructureRef has to be used
...
Otherwise DerefMut would have to go away.
2017-07-11 00:11:55 +03:00
Sebastian Dröge
c0707bed94
Add initial caps bindings
2017-07-11 00:11:55 +03:00
Sebastian Dröge
944c71f953
Implement StaticType for Structure
2017-07-10 17:13:49 +03:00
Sebastian Dröge
1264f2f5c0
Rename MessageImpl to MessageRef
...
These will show up as (possibly mutable) references later in API from
which we explicitly borrow references instead of getting a new one.
2017-07-10 17:12:24 +03:00
Sebastian Dröge
e43bf21ded
Add initialization safety assertions
...
Ensure that GStreamer is initialized before allowing to call any
functions
2017-07-10 17:12:14 +03:00
Sebastian Dröge
992105b49f
Implement basic GstStructure bindings
2017-07-10 17:10:15 +03:00
Sebastian Dröge
decf5da6d0
Add copyright notices
2017-07-07 14:47:28 +03:00
Sebastian Dröge
4808865371
Implement Builder for all Messages
2017-07-07 14:39:22 +03:00
Sebastian Dröge
291f329fc3
Add Element::add_many(), ::remove_many(), Bin::link_many(), ::unlink_many()
2017-07-05 11:11:45 +03:00
Sebastian Dröge
e3902bbbf6
Add decodebin example and add some missing API for it
2017-07-05 10:40:02 +03:00
Sebastian Dröge
9b91024221
Implement all message parsing API
2017-07-05 01:47:33 +03:00
Sebastian Dröge
cb26c0aaed
Remove some useless message code
2017-07-03 18:45:59 +03:00
Sebastian Dröge
9a364c26c6
Remove EOS message constructor for now
...
These should probably all use the builder pattern
2017-07-03 18:11:26 +03:00
Sebastian Dröge
fc8046b9bd
Implement simple example application and clean up API
2017-07-03 18:08:43 +03:00
Sebastian Dröge
7a110ace10
Export parse_launch / parse_bin_from_description at the crate level
2017-07-03 17:57:57 +03:00
Sebastian Dröge
eeea572c96
Implement further parts of the Message machinery
2017-07-03 17:52:10 +03:00
Sebastian Dröge
602c3f257f
Generate Bus/ElementFactory without traits, generate Plugin
2017-07-03 14:06:08 +03:00
Sebastian Dröge
aa3581cee9
Add initial Message/MiniObject bindings
2017-07-03 14:01:08 +03:00
Sebastian Dröge
2546045593
Implement init() around gst_init_check()
2017-07-03 12:26:40 +03:00
Sebastian Dröge
b14f0278c1
Regenerate everything with latest gir
2017-06-29 09:02:08 +03:00
Sebastian Dröge
771b5c8094
Add previously forgotten functions module
2017-06-25 11:26:16 +03:00
Sebastian Dröge
f777258564
Update .gir files to 1.12.1
2017-06-25 11:17:06 +03:00
Sebastian Dröge
b792f4b5da
Regenerate with latest gir and configure default concurrency to send+sync
2017-06-25 11:04:37 +03:00
Sebastian Dröge
e41fb76d2d
Use new bool_return_is_error configuration for various functions
...
And ignore some wrong bindings.
2017-06-24 12:02:24 +03:00
Sebastian Dröge
6b4e3e9bd4
Switch to GIT versions of crates and regenerate with latest GIR
2017-06-24 11:55:28 +03:00
Sebastian Dröge
d92f865f36
Update Gst-1.0.gir with floating reference fixups from GIT master
...
And regenerate everything.
2017-05-17 15:59:16 +03:00
Sebastian Dröge
15b08a4293
Initial commit
...
Requires
https://github.com/gtk-rs/gir/pull/365
https://github.com/gtk-rs/gir/pull/364
to be merged for autogeneration of the bindings.
Requires
https://github.com/gtk-rs/gir/issues/367
for fixing memory leaks.
2017-05-12 14:24:03 +02:00