Sebastian Dröge
8e038572cb
gstreamer/caps: Assert on ANY caps in fixate() and work around bug in handling EMPTY caps
...
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/388
2020-03-09 13:02:20 +02:00
Sebastian Dröge
9d5ae8ed14
gstreamer: Don't take mini objects by value for append() and similar operations
...
Compared to
let foo = Foo::bar(foo);
the new form is easier to follow
foo.bar();
2020-03-07 00:31:30 +02:00
Sebastian Dröge
d3c77f400d
Don't derive Debug impls for generic types where the type parameters don't have to impl Debug themselves
...
This allows to use MappedBuffer and similar types to be properly
debug-printed.
Also change VideoFrame/VideoFrameRef/RTPBuffer from a tuple struct to a
struct with proper field names to make the code easier to understand.
2020-01-22 19:10:04 +02:00
Guillaume Desmottes
1f79bf3e02
gstreamer: caps: Builder: prevent re-adding features
...
Rework the API to statically prevent users re-adding features or
adding features if any_features() has been previously called.
2020-01-10 15:09:06 +05:30
Guillaume Desmottes
fe5ebd82cc
gstreamer: caps: BuilderFull: prevent adding features if using any
...
Rework the API to statically prevent users adding extra features if the
builder has been created with builder_full_with_any_features(). It
doesn't make sense to add extra features if all are already included.
2020-01-10 14:21:23 +05:30
Guillaume Desmottes
38db96859b
gstreamer: add Caps::builder_full()
...
API to create a caps containing multiple structures.
Fix #231
2020-01-09 15:01:18 +05:30
Sebastian Dröge
be3c378f28
Use Results instead of Options where they signal an error instead of just a missing value
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/216
2019-12-17 22:21:28 +02:00
Sebastian Dröge
06cfcd57fc
Move to_string() methods into the Display trait or rename to to_str(), move from_string() into the FromStr trait
...
Fixes clippy warnings, prevents confusing errors and is more consistent.
The Display trait provides a to_string() method by itself and FromStr
provides from_str().
2019-10-04 11:01:55 +03:00
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
d1e562b9f6
Explicitly add dyn
keyword to trait objects
...
Trait objects without are deprecated with the latest nightly and this
makes it more clear that we're doing dynamic dispatch anyway.
2019-06-06 09:09:34 +03:00
Sebastian Dröge
b2b8bfab52
Add manual implementations for various new 1.16 functions
2019-04-23 20:45:39 +03:00
Sebastian Dröge
e7898c1b24
Update manual code
2019-04-15 19:19:19 +03:00
Sebastian Dröge
bd0cbe99b3
Add more Debug impls to everything possible
2019-01-22 17:46:08 +02:00
Sebastian Dröge
36bcb5630a
Remove various unused use statements
2018-12-08 14:58:14 +02:00
Sebastian Dröge
8a6bcbcedb
Run through rustfmt once again
2018-10-28 13:47:02 +00:00
Sebastian Dröge
d19c70694a
Use ? operator instead of explictly propagating None
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
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
564f9faf84
Add support for CapsFeatures
...
Fixes https://github.com/sdroege/gstreamer-rs/issues/13
2018-09-28 13:15:18 +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
49d3ee29e9
Caps: serde impl
2018-07-30 23:18:30 +03:00
Sebastian Dröge
33a6aab6d7
Run everything through latest rustfmt
2018-07-27 13:36:40 +03: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
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
4117c01ff2
Run everything through latest rustfmt-nightly
2018-02-22 11:18:37 +01: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
411f54afed
Run everything to rustfmt again
2017-12-01 19:02:53 +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
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
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
2fc3470fa1
Add a Builder for caps and structures
2017-11-11 13:18:50 +01:00
Sebastian Dröge
e1d134c4be
Run everything through latest rustfmt-nightly
2017-10-17 12:06:51 +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
d85be4fe03
Don't make variable mutable if not needed
2017-10-09 16:38:13 +03:00
Sebastian Dröge
f0935d7e1e
Add remaining gst_init() assertions
2017-08-30 14:39:09 +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
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
09db28bbf5
Fix various clippy warnings
2017-08-02 19:40:31 +03:00
Sebastian Dröge
03285a6311
Run everything through latest rustfmt-nightly
2017-07-31 12:16:42 +01:00
Sebastian Dröge
b5d8b44725
Renable caps value-array unit test
2017-07-28 17:01:53 +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
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
ab4aa57a86
Fix indentation in a few places and remove unused imports
2017-07-24 11:52:28 +03:00
Sebastian Dröge
5e58998c76
Implement FromStr for Caps and Structure
2017-07-13 14:57:02 +03:00
Sebastian Dröge
9c357abf1a
Add support for Fractions
2017-07-12 13:25:11 +03:00