Commit graph

12 commits

Author SHA1 Message Date
Guillaume Gomez c07fe14191 gstreamer*: Add missing init checks 2020-04-12 17:25:54 +03: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
Philippe Normand 80e01dbe3c video: Simplify VideoMeta::add_full()
The n_planes value can be infered from the offset and stride slices size, which
both need to match.

Fixes #224
2019-11-18 18:15:03 +00:00
Sebastian Dröge 6cef32a4dd Change various mini object references to references to the refcounted object
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/204
2019-05-24 10:04:16 +00:00
Sebastian Dröge 6071c68ab6 video: Add support for VideoCaptionMeta 2019-05-16 00:35:19 +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 e7b4bafa60 Ignore false clippy warning about casting and pointer alignment in videometa
error: casting from `*mut ffi::GstVideoOverlayComposition` to a more-strictly-aligned pointer (`*mut gst_ffi::GstMiniObject`)
   --> gstreamer-video/src/video_meta.rs:158:44
    |
158 |             gst_ffi::gst_mini_object_unref(self.0.overlay as *mut _);
    |                                            ^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: #[deny(clippy::cast_ptr_alignment)] on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment

error: casting from `*mut ffi::GstVideoOverlayComposition` to a more-strictly-aligned pointer (`*mut gst_ffi::GstMiniObject`)
   --> gstreamer-video/src/video_meta.rs:159:59
    |
159 |             self.0.overlay = gst_ffi::gst_mini_object_ref(overlay.as_mut_ptr() as *mut _) as *mut _;
    |                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment
2018-12-04 10:51:50 +02:00
Sebastian Dröge e4ecc88825 Remove some unneeded lifetime annotations from video meta code and pass more parameters by reference 2018-10-11 11:58:01 +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 62074ba1ed Add bindings for VideoMeta and VideoOverlayCompositionMeta 2018-09-29 12:01:26 +03:00