Commit graph

25 commits

Author SHA1 Message Date
jerry73204 d373fcac84 appsink: Use FnMut instead of Fn for callbacks
They can only be called from a single thread at once.
2019-11-02 10:53:11 +01: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
Sebastian Dröge d460310ed1 appsink: Properly mark appsink callbacks as Send-only
They can only be called from a single thread at a time, unlike some of
the appsrc callbacks.

This change was partially done in 062403bdac
but a part was missing.
2019-04-24 15:44:55 +03:00
Sebastian Dröge e7898c1b24 Update manual code 2019-04-15 19:19:19 +03: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 95f6844702 Fix various minor clippy warnings 2019-02-21 19:56:23 +02: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 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
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
Sebastian Dröge 2cefd9aea6 Re-run everything through rustfmt 2018-04-25 11:13:14 +03:00
Sebastian Dröge 062403bdac appsrc need-data and all appsink callbacks can only be called from a single thread at a time
As such, make them FnMut and remove the Sync requirement from them. We
can only do this for the callbacks and not the signals, because the
signals can in theory be emitted from anybody (outside the object!)
at any time.
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 8a807c4265 Implement Send+Sync for AppSink/SrcCallbacks 2017-12-16 14:14:29 +02:00
Sebastian Dröge 396dae666f Make appsink/appsrc callbacks builder more consistent with other code
Move the constructor of the builder to the main type
2017-12-16 11:37:00 +02:00
Sebastian Dröge 49a6eb6a1f Replace AppSrcCallbacks/AppSinkCallbacks with a builder so that no empty closures have to be provided for unused callbacks 2017-12-10 15:19:44 +02:00
Sebastian Dröge c06c12dc87 Free memory of the correct type for the callback structs in appsink/appsrc 2017-11-11 16:38:54 +01:00
Sebastian Dröge 3b0e6843e2 Regenerate everything with latest GIR 2017-09-09 16:35:01 +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 d7baadee22 Fix various other compiler/clippy warnings 2017-08-02 20:09:00 +03:00
Sebastian Dröge 7ff8a5c460 Finish appsink bindings 2017-08-01 17:52:11 +03:00