Commit graph

25 commits

Author SHA1 Message Date
Guillaume Desmottes 8b9ef8b109 video: add alignment API to VideoMeta 2020-12-03 16:39:40 +01:00
Guillaume Desmottes 6fbe7a1739 video: add VideoMeta::get_plane_{height,size}
Fix #299
2020-12-03 12:15:51 +01:00
Guillaume Gomez 8f9d76bb8c Revert "Remove unnecessary dox feature"
This reverts commit 9dd8bd9095.
2020-11-27 14:37:49 +01:00
Guillaume Gomez 9dd8bd9095 Remove unnecessary dox feature 2020-11-25 15:54:02 +01:00
Sebastian Dröge d31badf9ac gstreamer-video: Update manual code to 2018 edition 2020-11-22 19:15:20 +02:00
Marijn Suijten bd75778fcb Add doc(cfg()) on all manual files 2020-11-19 16:39:31 +01:00
Sebastian Dröge a6c8fe0c8a Use repr(transparent) where it is more correct and get rid of some unneeded repr(C) 2020-10-24 17:09:10 +00:00
Sebastian Dröge 911bb34dc2 Don't generate LAST/NONE variants of flags types
Those are automatically provided already.
2020-06-30 11:35:49 +03:00
Sebastian Dröge 947ac8db5c Name functions returning a builder builder(), not new()
And also make the video event API more consistent with the normal event
API.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/269
2020-06-25 19:42:33 +03:00
Sebastian Dröge 30d51f0ca6 video: Don't panic when passing an invalid video info to VideoMeta::add()
Instead return an error that can be handled by the caller.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/259
2020-06-07 18:58:54 +03:00
Sebastian Dröge 9236ace284 video: Add VideoAffineTransformationMeta, CropMeta and RegionOfInterestMeta
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/218
2020-06-02 16:05:01 +03:00
Sebastian Dröge 1be8ec691e gstreamer-video: Add support for the AFD and Bar metas 2020-05-03 16:48:35 +03:00
Sebastian Dröge 47cc80b1ef video: Assert if caption data passed when adding caption metas is empty
It will cause a critical warning otherwise.
2020-04-22 21:42:39 +03:00
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