Guillaume Desmottes
a954c03bc0
functions: rename constructors in manual API
...
The idiomatic way for Rust constructors is to be named from_XXX()
instead of new_from_XXX() and with_XXX() instead of new_with_XXX().
Fix #460
2020-06-11 12:33:52 +02:00
Sebastian Dröge
62c0f5ef42
Use mem::ManuallyDrop instead of mem::forget() everywhere
...
It makes the intentions clearer and potentially results in simpler
assembly, at least in debug builds.
2020-04-09 16:57:06 +03:00
Sebastian Dröge
8d0fa62275
Minor cleanup in various places
2020-03-09 12:55:14 +02:00
Sebastian Dröge
2ba5105b80
Implement Sync/Send for more types and don't implement Send for TypeFind
...
They can actually be shared with multiple threads at the same time
safely as all functions requiring an immutable reference are
thread-safe.
OTOH TypeFind can't be shared safely between different threads as not
all implementations of the TypeFind struct are thread-safe.
2019-12-18 18:37:44 +02:00
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
1c1533d076
check: Fix compilation with v1_16 feature enabled
2019-05-28 04:46:41 +02: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
e7898c1b24
Update manual code
2019-04-15 19:19:19 +03:00
Sebastian Dröge
95f6844702
Fix various minor clippy warnings
2019-02-21 19:56:23 +02:00
Sebastian Dröge
2471676aa4
check: Set harness caps in unit test before pushing buffers
...
Otherwise there will be warnings about data flow before stream-start
event as the harness is only sending the events once caps are set.
2019-02-21 13:08:54 +00: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
8924af36e0
harness: Work around floating references issues in GstHarness
...
See https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/31
2018-11-13 14:45:20 +02:00
Sebastian Dröge
9e9bc5122c
Fix accidential usage of Rust 1.30 feature
...
error[E0658]: access to extern crates through prelude is experimental (see issue #44660 )
--> gstreamer-check/src/harness.rs:180:76
|
180 | pub fn crank_multiple_clock_waits(&mut self, waits: u32) -> Result<(), glib::BoolError> {
| ^^^^
2018-11-04 18:39:28 +02:00
Sebastian Dröge
352f1c80d4
Run everything through rustfmt
2018-11-03 20:28:58 +02:00
Sebastian Dröge
0ccd8f186f
Use std::path to directly refer to path::Path
2018-11-02 16:05:57 +02:00
Sebastian Dröge
26a213bf9f
Add accessors for the GstHarness struct fields
2018-11-02 14:32:09 +02:00
Sebastian Dröge
1937294faf
Fix harness compilation with v1_16 feature
2018-11-02 13:58:51 +02:00
Sebastian Dröge
33295b758e
Add initial version of gstreamer-check
...
Covers GstHarness and GstTestClock
Fixes https://github.com/sdroege/gstreamer-rs/issues/148
2018-11-02 13:28:03 +02:00
Sebastian Dröge
5b75f11cd0
WIP initial version of harness/testclock bindings
2018-11-02 11:20:33 +02:00