Commit graph

43 commits

Author SHA1 Message Date
Rafael Caricio 69ea30dbda
gstreamer: meta: Allow to register custom meta without transform function 2022-09-29 14:05:35 +02:00
Guillaume Desmottes 2dcd5cf9eb as_ptr() and as_mut_ptr() accessors are safe
Nothing unsafe about getting a pointer, deferencing it is unsafe.
2022-08-12 08:29:49 +02:00
Guillaume Gomez c1d3ed5eac Use IntoGlibPtr trait instead of implementing into_ptr 2022-05-07 13:38:11 +02:00
Sebastian Dröge 4651c9db4d Update minimum supported version to 1.14
This is the version that is available in Ubuntu 18.04.
2022-04-07 12:45:47 +03:00
Sebastian Dröge a2e22416fe gstreamer: Don't try removing locked metas from buffers
And return success from the `remove()` function.
2021-11-16 13:08:23 +02:00
Sebastian Dröge df36a7c57a gstreamer: Add gst::MetaFlags and accessor on meta 2021-11-16 13:05:47 +02:00
Jan Alexander Steffens (heftig) c05d2e24af
gstreamer/clock_time: Format Debug like Display
This allows us to drop `.to_string()` from the custom Debug
implementations, which now also no longer print as strings.
2021-09-23 02:19:41 +02:00
Sebastian Dröge 538ce91987 gstreamer: Provide getter for meta type in addition to meta API type 2021-09-19 15:45:58 +03:00
Sebastian Dröge 7c5303c492 gstreamer: Add support for gst::CustomMeta 2021-09-19 15:45:58 +03:00
Sebastian Dröge 80ee1edec5 gstreamer: Clean up meta code a bit 2021-09-19 15:45:58 +03:00
François Laignel e31ce9d07b Manual ClockTime updates 2021-06-04 22:09:38 +02:00
François Laignel 90bb458e64 Rework ClockTime & FormattedValues 2021-06-04 22:09:38 +02:00
Guillaume Gomez 5ba79976a9 Generate missing doc aliases for newtypes 2021-06-01 15:15:59 +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
François Laignel 49583597ed manual code: fix-getters-def doc aliases 2021-05-03 20:46:57 +02:00
Bilal Elmoussaoui 890cd03632 manual renames of to_glib into into_glib 2021-04-27 19:44:41 +02:00
François Laignel 6ab9164dca fix-getters-calls 0.3.0 pass 2021-04-20 18:18:02 +02:00
François Laignel e80a29372a fix-getters-def 0.3.0 pass 2021-04-20 18:18:02 +02:00
François Laignel 53be8e5f58 fix-getters-{def,calls} pass 2021-04-13 17:54:40 +02:00
Sebastian Dröge a316d610eb gstreamer: Update for glib::Type API changes 2021-02-25 12:49: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
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 9d9522016b gstreamer: 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 6e404f1831 gstreamer/meta: Don't collect iterators just to check their length in the tests 2020-10-09 11:35:19 +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 ede4588e0c gstreamer: Add bindings for ProtectionMeta 2020-06-02 16:05:01 +03:00
Guillaume Gomez c07fe14191 gstreamer*: Add missing init checks 2020-04-12 17:25:54 +03:00
Sebastian Dröge 63a8afafa5 gstreamer: Use more accurate types for Seqnum, GroupId and MetaSeqnum
For the latter introduce an actual opaque type that allows using them
for comparison purposes but is not just a plain u64.

For the former represent them as opaque type around an NonZeroU32. 0 is
the invalid case and does not happen in the majority of functions. Where
it can happen, represent this case by using an Option<_> instead.

This makes it harder to mis-use these types.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/209
2020-01-25 00:07:36 +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 ae58a469d1 meta: Add support for ReferenceTimestampMeta 2019-07-14 22:32:10 +03: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 b2b8bfab52 Add manual implementations for various new 1.16 functions 2019-04-23 20:45:39 +03:00
Sebastian Dröge e7898c1b24 Update manual code 2019-04-15 19:19:19 +03:00
Sebastian Dröge 7189a6a7c1 Replace various transmutes in meta code with pointer casts 2018-10-11 11:58:01 +03:00
Sebastian Dröge e2950749e8 Remove some unneeded lifetime annotations 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 7270a837d1 Fix namespace error in previous commit 2018-09-29 12:19:47 +03:00
Sebastian Dröge cb23d20270 Implement support for buffer Metas
Fixes https://github.com/sdroege/gstreamer-rs/issues/103
2018-09-29 11:44:55 +03:00