Commit graph

3946 commits

Author SHA1 Message Date
Sebastian Dröge
cfa9ea2dc7 analytics: Remove unnecessarily mutable references
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Sebastian Dröge
cea71246dc base: Add new Aggregator::push_src_event() method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +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
db976c9476 Update 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
Sebastian Dröge
6e2fd14b79 Update gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Sebastian Dröge
6e7c2779c9 Update 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
fc3b322320 Update dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Sebastian Dröge
d18fcda6ec gstreamer-base: Fix new clippy warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Sebastian Dröge
e5a796ed2e examples: Remove unnecessary mutex
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Sebastian Dröge
153d1bba16 examples: Update to derive_more 1.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:45 +00:00
Sebastian Dröge
e85cd35df4 Update minimum supported Rust version to 1.80
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1563>
2024-10-20 17:48:44 +00:00
Thibault Saunier
0e4b03ada0 validate: Make use of rust more complex error types in action types
For sync action failures, instead of requiring users to report the error
through the Reporter interface, let it pass the detail of the failure into
the ActionError::Error directly and report it in the validate reporting
system automatically.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1265>
2024-10-20 13:44:45 +00:00
Thibault Saunier
45d4725de9 validate: Rework action implementation API to allow async action types
Instead of passing a ActionRef to the execute function of validate
action types, pass a borrowed Action. This is required for ASYNC actions
as you need to pass the one action structure around so it can be
`set_done` when the async action is done.

This implies that the action structure won't be mutable anymore, but
using the fact that it is "mutable" in C is not clean and in rust we can
just capture variables to achieve similar results anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1265>
2024-10-20 13:44:45 +00:00
Thibault Saunier
dfa39be86f validate: action: Bind the set_done action type
`gst_validate_action_set_done` is MT safe so we can simply call it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1265>
2024-10-20 13:44:45 +00:00
Thibault Saunier
bd79fcf058 validate: Mark Scenario as Send+Sync
Scenario are MT safe these days

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1265>
2024-10-20 13:44:45 +00:00
Thibault Saunier
3c8eeb6482 validate: Bind the gst_validate_get_action_type() function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1265>
2024-10-20 13:44:45 +00:00
Sebastian Dröge
682e1ade07 ci: Update to cargo-c 0.10.5
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1562>
2024-10-18 10:55:04 +00:00
Sebastian Dröge
c111edc46f ci: Update to meson 1.5.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1559>
2024-10-17 16:58:30 +00:00
Sebastian Dröge
3ddac44fef ci: Update to Rust 1.82
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1559>
2024-10-17 16:58:29 +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
François Laignel
10ca739f52 Add .helix to .gitignore
[helix] can use project specific configuration in the `.helix` directory under
the project root. For gst-rs development, this can be used to select a group of
features:

.helix/languages.toml:

```toml
[language-server.rust-analyzer.config]
cargo = { features = ["v1_26"] }
```

It can also be used to configure debugging targets, thought debugging experience
with helix is lacking currently.

[helix]: https://helix-editor.com/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1554>
2024-10-04 12:12:10 +00:00
Jordan Petridis
9b65cbece0 ci: Specify the number of build jobs on windows
Followup to 7b51a7c77b

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1502>
2024-10-03 00:17:50 +03:00
Jordan Petridis
ce13ac33fd ci: Use cargo nextest as the test runner and export junit reports
Close #519

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1502>
2024-10-03 00:17:50 +03:00
Sebastian Dröge
df52948b02 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1553>
2024-10-02 09:15:45 +03:00
Sebastian Dröge
6a04bad125 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1550>
2024-09-28 12:17:06 +03:00
Sebastian Dröge
192844c173 rtsp-server: media: Take pipeline by reference instead of value
And remove <1.18 workaround if building for 1.18 or newer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1548>
2024-09-23 13:00:45 +03:00
Daniel Stone
7b51a7c77b ci: Only use as many cores as we're supposed to
Instead of spawning 64 compiler instances on a 64-core machine that's
being shared with 7 other jobs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1545>
2024-09-20 14:40:27 +03: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
Sebastian Dröge
ce92502d61 video: Add #[must_use] attribute to VideoTimeCode::add_interval()
It doesn't change the original value but returns the new result.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1529>
2024-09-16 11:24:54 +03: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
6a87d4a66a ci: Update CI image with current gstreamer commits
This is needed so that the fix from
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7493
can be used while testing recent changes to the pad probe API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1528>
2024-09-12 10:27:17 -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
L. E. Segovia
7eaf47d7b5 Add workaround for linking against macOS SDK's relocatable dylibs
See https://github.com/rust-lang/cargo/issues/5077#issuecomment-1284482987
and https://github.com/rust-lang/rust/issues/127100

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1516>
2024-09-10 16:48:29 +00:00
Sebastian Dröge
5c39500308 ci: Ignore derive_more 1.0 update until MSRV can be updated to 1.75+
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1512>
2024-09-10 05:56:53 +00:00
Sebastian Dröge
299601f7e3 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1512>
2024-09-10 05:56:53 +00:00