Sebastian Dröge
eed648831d
video: Add various VideoFormatInfo/VideoInfo/VideoFrame helper API
2022-04-04 15:50:09 +03:00
Sebastian Dröge
215cdfd548
video: Allow converting a VideoFrame
into an FFI GstVideoFrame
2022-03-22 19:00:32 +02:00
Sebastian Dröge
0173b73170
Handle empty slices correctly
...
Passing `NULL` to `slice::from_raw_parts` is invalid.
2022-02-07 12:50:37 +02:00
Marijn Suijten
540062b97c
Add missing doc aliases to manual code
...
Using the same script as [1], called with:
python3 add_doc_alias.py gstreamer*/**/src
[1]: https://github.com/gtk-rs/gtk-rs-core/pull/83
2021-05-19 22:36:18 +02:00
Sebastian Dröge
255c0ff95e
video: Don't return glib::Borrowed from VideoFrameRef::from_glib_borrow_mut()
...
For it to be usable we need a mutable reference, which Borrowed does not
provide. This should be handled via Pin at a later time, see
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/324
2021-05-09 19:15:47 +03:00
François Laignel
49583597ed
manual code: fix-getters-def doc aliases
2021-05-03 20:46:57 +02:00
Marijn Suijten
28cf8434d0
video: Fix all clippy::use_self warnings
2021-04-30 10:58:35 +02:00
François Laignel
53be8e5f58
fix-getters-{def,calls} pass
2021-04-13 17:54:40 +02:00
Sebastian Dröge
ce1148b474
Update everything for glib macro renamings
2020-12-18 00:56:47 +02:00
Guillaume Gomez
ff5a36561a
Fix license header situation
2020-12-15 11:53:31 +01:00
Guillaume Gomez
fb56af8d84
Update from_glib calls and put them in unsafe blocks
2020-12-08 15:50:15 +01:00
Sebastian Dröge
d31badf9ac
gstreamer-video: Update manual code to 2018 edition
2020-11-22 19:15:20 +02:00
Sebastian Dröge
febb0dfd16
video/video_frame: Allow getting an owned buffer from readable video frames
...
In all other variations this is not possible as it would allow to
circumvent the mini object writability rules.
2020-08-11 13:35:39 +03:00
Sebastian Dröge
af01f1bc67
gstreamer: Simplify MiniObject bindings by removing one layer of abstraction
...
And instead directly implementing this via the macro on the target
types.
2020-06-30 11:06:02 +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
926ed2f53d
video: Don't unmap VideoFrameRef created from a VideoFrame
...
Otherwise we're going to unmap it twice. Also add a test for the
different interactions.
2020-06-07 15:22:33 +00:00
Sebastian Dröge
4f5aceaa5a
video: Check that the passed in video info is valid when creating a VideoFrame
2020-06-07 15:22:33 +00:00
Sebastian Dröge
019afd54f9
Update for new from_glib_borrow signature
...
See https://github.com/gtk-rs/glib/pull/605
2020-04-05 18:48:48 +03:00
Sebastian Dröge
0b16556d9b
video/video-frame: Implement immutable frame functions more generically
2020-01-30 23:11:12 +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
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
e3282c27f1
video: Generate VideoBufferFlags and add a extension trait for setting/getting them on buffers
2019-07-16 11:51:23 +03:00
Sebastian Dröge
424a87efbf
Use MaybeUninit::zeroed() everywhere possible instead of mem::zeroed()
2019-07-11 17:56:50 +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
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
43f5a10f9c
Add API for mapping GL buffers as VideoFrameRef in addition to a full VideoFrame
2018-12-08 18:59:14 +00:00
Sebastian Dröge
aea6f79ef9
Implement Send/Sync for VideoFrame
...
Closes #153
2018-11-26 11:13:13 +01:00
Víctor Manuel Jáquez Leal
284992d83a
Add VideoFrame::from_glib_full() constructor
...
Thus it would be possible to instantiate gst_video::VideoFrame from
FFI's VideoFrame created outside of gstreamer_video's crate.
Fixes #152
2018-11-16 11:45:38 +01:00
Sebastian Dröge
bc8da095c3
Add functions to get the FFI pointer behind a VideoFrame/VideoFrameRef
2018-09-28 17:35:48 +03:00
Sebastian Dröge
33a6aab6d7
Run everything through latest rustfmt
2018-07-27 13:36:40 +03:00
Sebastian Dröge
632d5f4c57
Change some empty structs to empty enums
...
These should only really exist at the type-level.
2018-07-25 10:07:20 +03: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
9a3ef2e9f1
Regenerate with latest GIR and update for the non-bitflags flags in -sys now
2018-04-04 10:47:12 +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
fc4ad81777
Change VideoFrameRef::copy_to() and ::copy_plane() to take VideoFrameRefs instead of VideoFrames
...
VideoFrames can always be converted to a VideoFrameRef if needed.
2018-01-16 18:59:04 +02:00
Sebastian Dröge
899be5e2c3
Add VideoFrameRef API
...
This is like VideoFrame, but can work on gst::BufferRefs and borrows
from it. VideoFrames can be converted into this by borrowing.
2018-01-01 13:47:07 +02:00
Sebastian Dröge
e0dc84c10a
Run everything through rustfmt again
2017-12-20 19:30:14 +02:00
Sebastian Dröge
70688fd6a9
Clean-up VideoFrame API
...
There's a buffer() for immutable references on all types now, and a
buffer_mut() for getting a mutable reference on the writable videoframe
Also some minor other cleanup
2017-12-16 11:41:48 +02:00
Sebastian Dröge
e1d134c4be
Run everything through latest rustfmt-nightly
2017-10-17 12:06:51 +03:00
Sebastian Dröge
19c5556239
Regenerate with latest GIR
2017-10-01 15:52:15 +02:00
Sebastian Dröge
f0935d7e1e
Add remaining gst_init() assertions
2017-08-30 14:39:09 +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
59af28e508
Simplify VideoFrame impl
2017-08-11 15:20:56 +03:00
Sebastian Dröge
cb8ca2c00e
Add VideoFrame bindings
2017-08-11 14:55:31 +03:00