Commit graph

34 commits

Author SHA1 Message Date
Sebastian Dröge f235dc987d Inline various trivial functions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1177>
2023-01-11 11:33:54 +02:00
Sebastian Dröge 567ce0a3bf Group and merge imports in all manual code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182>
2023-01-04 13:25:17 +02:00
Sebastian Dröge e3ad1918dc Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1164>
2022-12-13 11:29:45 +02:00
Sebastian Dröge f9690817ad Fix nullability handling in some functions in manual code 2022-10-18 18:15:01 +03: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
Mathieu Duponchelle d83faa044e rtp_buffer: buffer() does not need to return an Option
When a RTP buffer is mapped, its buffer field always holds a
non-null pointer.
2022-05-05 14:36:43 +02:00
Mathieu Duponchelle 7fa0b4e84d rtpbuffer: bind length calculation API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1014>
2022-04-23 01:12:16 +00:00
Mathieu Duponchelle f095b6f0ba rtp_buffer: bind buffer getters
* Expose the buffer field, useful to look up flags and meta

* Expose the payload_buffer API, useful to avoid copies, for instance
  when storing in an adapter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1008>
2022-04-14 13:31:28 +00:00
Mathieu Duponchelle af89799e06 rtp: add bindings for RTPBaseDepayload
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1008>
2022-04-14 13:31:28 +00: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
Tomasz Andrzejak e448a762ca gstreamer-rtp: Add payload_mut function to RTPBuffer 2021-12-15 21:06:45 +00:00
Santiago Carot-Nemesio 668a9bbf58 rtp_buffer: Add methods to manipulate padding
Open Rust APIs for:
  * gst_rtp_buffer_get_padding
  * gst_rtp_buffer_set_padding
2021-12-03 11:53:17 +01:00
Sebastian Dröge a1c4a58180 Bind various new API 2021-09-19 13:12:58 +00:00
Sebastian Dröge a3a7f85f7f rtp/rtpbuffer: Work on &BufferRef / &mut BufferRef instead of &Buffer / &mut Buffer
The buffer, in the writable case, needs to be actually writable (i.e.
refcount 1) and this was previously not ensured.

Also it caused some API mismatch when trying to use it e.g. as part of
basetransform's `transform_ip()` virtual method.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/162
2021-09-08 09:29:05 +03:00
Sebastian Dröge a94d84e780 Silence/fix various clippy warnings 2021-06-20 10:59:49 +03: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 aa3cc48756 Fix new 1.52 clippy warnings 2021-05-05 12:02:03 +03: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 99616ec0b4 post fix-getters manual updates 2021-04-13 17:54:40 +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
Sebastian Dröge db8b8be2dd gstreamer-rtp: Update manual code to 2018 edition 2020-11-22 19:15:21 +02:00
Jacob Teplitsky 4648cf1b34 rtp/rtp_buffer: Wrap set_marker() and get_marker() methods 2020-07-28 15:49:32 +00: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
Thiago Sousa Santos 4a2cb80c06 rtp_buffer: wrap more methods
* extension data
* onebyte/twobytes extension
* ssrc
* csrc
* get_payload
2020-06-06 07:03:29 +00:00
Guillaume Gomez c07fe14191 gstreamer*: Add missing init checks 2020-04-12 17:25:54 +03: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
Mathieu Duponchelle 6d3cf44573 gstreamer-rtp: initial RTPBuffer bindings 2019-08-14 18:01:00 +00:00