Commit graph

1742 commits

Author SHA1 Message Date
Sebastian Dröge
a9b33a465c Update CHANGELOG.md for 0.23.3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1582>
2024-11-12 11:50:00 +02:00
Sebastian Dröge
854c2e692a Update CHANGELOG.md for 0.23.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1549>
2024-11-12 11:50:00 +02:00
François Laignel
5df7df303c gst: Element::foreach*_pad: return ControlFlow instead of bool in callback
Same as for BufferList::foreach*.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1584>
2024-11-07 10:04:43 +01:00
François Laignel
ce77a67382 gir: regenerate
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1584>
2024-11-07 10:04:41 +01:00
François Laignel
d8573d86a8 gir: Element::foreach*_pad: return ControlFlow instead of bool in callback
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1584>
2024-11-07 10:03:56 +01:00
François Laignel
3f969485b7 gst: BufferList::foreach{_mut} discard bool result
If we really wanted to return a value, we would use `ControlFlow`. In Rust, if
we need to inform the caller that processing has stopped, we'd rather do this by
updating a variable from within the `func`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1584>
2024-11-07 10:03:54 +01:00
François Laignel
33781c5e65 all: fix userdata mutability for FnMut callbacks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1585>
2024-11-07 09:44:29 +01:00
François Laignel
2a1473d69d regenerate
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1585>
2024-11-07 09:44:27 +01:00
Sebastian Dröge
a38ad3451f Update to thiserror 2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1583>
2024-11-06 10:44:51 +02:00
Sebastian Dröge
2251b842b2 Regenerate with latest gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1569>
2024-10-22 11:31:19 +00:00
Sebastian Dröge
048f3e1be5 Remove once_cell dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1567>
2024-10-21 17:53:15 +00:00
Sebastian Dröge
38aeec4ec5 iterator: Add a few more constructors for convenience
And implement `Vec` version more generically.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1566>
2024-10-21 17:13:38 +00:00
Sebastian Dröge
973f843353 Regenerate with latest GStreamer gir files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Sebastian Dröge
6bd487739b Update Gir.tomls
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Sebastian Dröge
445a4122d5 Remove unnecessary sealing of ImplExt traits and enforce type hierarchy more strictly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Sebastian Dröge
abbc85c3d0 Remove unnecessary trait sealing
For all these traits only the implementation that already exists is possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Sebastian Dröge
887bffbb2c Regenerate with latest gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Viktor Chvatal
526074ea78 gstreamer: Fix binding to wrong C function in PadExtManual::proxy_query_caps
Fixes #533

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1556>
2024-10-17 11:56:31 +00:00
eri
b5bf829876 genrate gir without link attribute
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1514>
2024-09-19 11:46:18 +00:00
Jan Alexander Steffens (heftig)
90f9406377 gst: Fix range in Percent::ppm doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1533>
2024-09-18 17:49:05 +02:00
François Laignel
73544718b4 gst: fix typo in format doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1532>
2024-09-18 11:52:37 +02:00
Arun Raghavan
bd37999166 gstreamer: Add tests for pad probes taking and dropping data
This is quite similar to the HANDLED case, so reuse that code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1528>
2024-09-12 12:36:52 -04:00
Arun Raghavan
6849e4b4c3 gstreamer: Use new pad probe take_*() API in tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1448>
2024-09-12 13:02:32 +00:00
Arun Raghavan
f14efbd70c gstreamer: Set data to null if it's consumed
When the probe has HANDLED the data, we're expecting the caller to no
longer access it. Let's explicitly protect against that by setting the
data to NULL on return.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1448>
2024-09-12 13:02:32 +00:00
Arun Raghavan
224215a844 gstreamer: Add some setters for Message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1448>
2024-09-12 13:02:32 +00:00
Arun Raghavan
700004b8ce gstreamer: Add some setters for Event
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1448>
2024-09-12 13:02:32 +00:00
Arun Raghavan
6035bffbab gstreamer: Add a MessageViewMut for mutable message access
This isn't very generally useful, but there are special cases where
accessing the structure, or adding details is handy.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/474
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1448>
2024-09-12 13:02:32 +00:00
Arun Raghavan
d16b28fc2f gstreamer: Add an EventViewMut accessor
Should make mutable access to events less verbose.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/474
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1448>
2024-09-12 13:02:32 +00:00
Arun Raghavan
f62c8658e4 gstreamer: Add API to take an event and buffers in a pad probe
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1448>
2024-09-12 13:02:32 +00:00
François Laignel
88a52d9ea1 gst: anticipate GQuark to GstIdStr lifetime changes
GStreamer fixes a memory leak due to GQuarks by switching to GstIdStr.
The consequence is that strings previously backed by a GQuark returned by a
function will now get their lifetime bound to that of its owner, while the
GQuark version ensured static lifetime.

Because some functions return a string with the assumption that they are static
and because we can't alter the API for existing versions of the bindings, this
MR temporarily forces affected strings as GQuarks, thus gaining static lifetime
regardless of the GStreamer version actually being used.

For newer versions of the bindings, the API will be fixed and GQuarks will be
removed in favor a leakless solution.

See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7432
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1519>
2024-09-11 09:19:35 +00:00
François Laignel
96ec17b1e9 structure: fix doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1519>
2024-09-11 09:19:35 +00:00
François Laignel
1b578b6113 tags: fix index() lifetime bind
The signature for `TagListRef::index` didn't bind the lifetime of the returned
`TagValue` to `&self`. This causes the following code to compile:

```rust
 1 let title = {
 2     let mut tags = TagList::new();
 3     {
 4         let tags = tags.get_mut().unwrap();
 5         tags.add::<Title>(&"some title", TagMergeMode::Append);
 6     }
 7
 8     let title = tags.index::<Title>(0).unwrap();
 9     assert_eq!(title.get(), "some title");
10
11     title
12 };
13
14 assert_eq!(title.get(), "some title");
```

... but it panics at runtime on the last `title.get()`:

```
Invalid tag type: WrongValueType(ValueTypeMismatchError
    { actual: <invalid>, requested: gchararray })
```

Indeed, the `title` `TagValue` is freed with the `tags` on line 12.

This commit fixes the function signature so the returned `TagValue` can't
outlive its `TagListRef`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1518>
2024-09-10 19:40:33 +00:00
Sebastian Dröge
628f040e2d Fix new 1.81 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1515>
2024-09-05 21:52:35 +03:00
Sebastian Dröge
ed6aac91bd Remove deprecated API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1513>
2024-08-28 09:44:55 +03:00
Sebastian Dröge
497f15acd3 Update CHANGELOG.md for 0.23.1 2024-08-27 20:42:18 +03:00
Sebastian Dröge
a145ce6ab1 Ignore a new 1.80 clippy warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1491>
2024-08-13 15:41:44 +03:00
Sebastian Dröge
bc96a99576 Regenerate with latest gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1496>
2024-08-07 18:16:07 +03:00
Sebastian Dröge
73d9793f5b Fix new 1.80 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1496>
2024-08-07 18:16:07 +03:00
Piotr Brzeziński
7be6a9fef4 gstreamer: bufferlist: Fix remove() range end being off by one
The end index was being calculated the same way as the start one, which is incorrect.
It should be +1'd when range is inclusive and left as-is if it's exclusive, not the other way around.
Fixed and added a simple test to verify correctness.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1490>
2024-07-30 14:19:42 +02:00
Guillaume Desmottes
2ae1e4a511 gstreamer: format: Percent: add getters
We had constructor from the percent/ppm/ratio values but not getters
to get those values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1488>
2024-07-26 09:30:18 +02:00
Sebastian Dröge
658b8c2231 gstreamer: meta: Pass an empty tag array instead of NULL to gst_meta_register_custom()
NULL gives a critical warning but an empty, NULL-terminated array gives
the desired result.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/516

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1483>
2024-07-18 13:04:42 +03:00
Sebastian Dröge
0f5c0e935c Update CHANGELOG.md for 0.23.0 release
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1482>
2024-07-17 16:52:53 +03:00
Sebastian Dröge
0ed46425f6 Regenerate with latest gir-files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1481>
2024-07-11 17:48:59 +03:00
Sebastian Dröge
9b76ef35cf Regenerate with latest gir / gir files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1480>
2024-07-08 09:37:34 +03:00
Sebastian Dröge
94313e67c5 gstreamer: Unconditionally use gst_parse_context_copy()
It's available since 1.12.1 and the minimum supported version for the
bindings is 1.14 nowadays.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1478>
2024-07-06 11:21:31 +00:00
Sebastian Dröge
a871f71515 gstreamer: Use obj = x instead of obj: x in debug log macros
And deprecate the old usage. This gives better tooling support, and
especially allows rustfmt to format the macro body correctly.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/513

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1477>
2024-07-06 14:08:03 +03:00
Sebastian Dröge
adf3e9236a gstreamer: childproxy: Include child property name in error message when lookup fails
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1472>
2024-06-28 12:20:47 +03:00
Sebastian Dröge
7a5096b1e4 gstreamer: clock: Manually implement bindings for calibration related function
The rate is using two clock times in C but this is really just a u64.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1470>
2024-06-21 16:34:27 +03:00
Sebastian Dröge
f3d7e18bcd Update to system-deps 7
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1469>
2024-06-20 20:58:27 +03:00
Sebastian Dröge
53ede03b3b Update CHANGELOG.md for 0.22.6
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1467>
2024-06-19 20:51:31 +03:00