Commit graph

3973 commits

Author SHA1 Message Date
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
Piotr Brzeziński
9bb441880d Remove unused imports in example/tutorial macOS code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1512>
2024-09-10 05:56:53 +00:00
Sebastian Dröge
c818778ad7 examples: Update to cocoa 0.26
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1512>
2024-09-10 05:56:53 +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
b9d34e1c21 ci: Update to Rust 1.81
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1515>
2024-09-05 21:36:38 +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
be7b3e3522 deny: Remove toml_edit override 2024-08-27 20:31:50 +03:00
Sebastian Dröge
2f9f70bd67 Update Cargo.lock 2024-08-27 20:31:33 +03:00
Jordan Petridis
78c490ef17 ci: Update the .cargo/config file
```
warning: `/builds/alatiera/gstreamer-rs/.cargo/config` is deprecated in favor of `config.toml`
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1504>
2024-08-21 16:54:22 +00:00
Jordan Petridis
e8797c95e7 ci: Add a default retry policy for jobs
Automatically retry if it's a system failure or similar

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1503>
2024-08-21 17:30:10 +03:00
Jordan Petridis
a8234a67d2 ci: Use gstreamer runners for jobs that recursively clone submodules
Seems like the placeholder runner is having issues with git-lfs atm.

```
Could not pull
Errors logged to '/builds/alatiera/gstreamer-rs/.git/modules/gir-files/lfs/logs/20240820T212811.645856902.log'.
Use `git lfs logs last` to view the log.
fatal: run_command returned non-zero status for gir-files
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1503>
2024-08-21 17:30:10 +03:00
Jordan Petridis
9b5b1d4650 ci: Avoid cloning the submodules when they are not needed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1503>
2024-08-21 17:30:10 +03:00
Jordan Petridis
4ee374e60c ci: Pin the windows jobs to gstreamer runners for now
There seem to be some seemingly random failures if the
jobs get scheduled on the hyper-v isolation runners,
and they need to be debugged further.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1503>
2024-08-21 17:30:10 +03:00
Nirbheek Chauhan
c5dfc87953 ci: Bump linux image tag, and make a separate tag for windows
It is fairly common to rebuild only the linux or windows image. This
avoids needless rebuilds and then (v slow) downloads into the docker
cache of runners.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1500>
2024-08-19 21:10:07 +05:30
Nirbheek Chauhan
57aa8e09ea ci: Use debian's gtk package instead of building our own
GTK 4.14 needs a newer glib, but we cannot build and use our own
because the system glib ends up taking precedence because cargo-c
doesn't set RPATHs for the plugins it builds.

The oldest GTK that supports glib 2.74 is GTK 4.10, and Debian 12
ships GTK 4.8, so let's just use the system GTK.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1500>
2024-08-19 21:09:54 +05:30
Nirbheek Chauhan
4cf22e91cf ci: Don't pip install tomli on Debian anymore
It ships Python 3.11 which ships with a toml module.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1500>
2024-08-19 20:48:07 +05:30
Sebastian Dröge
7959e37204 ci: Disable GTK Vulkan backend
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1499>
2024-08-19 13:17:30 +03:00
Nirbheek Chauhan
ebe7f5f663 ci: Force fallback for glib when building gstreamer
Also canonicalize some argument passing in install-gst.sh

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1499>
2024-08-19 13:16:20 +05:30
Sebastian Dröge
63935bb680 ci: Update image version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1499>
2024-08-19 10:05:42 +03:00
Sebastian Dröge
c463c07871 examples: glupload: Fix compilation with Rust < 1.72 on Windows
The event proxy on Windows is only `Sync` if the contained `Sender` is,
but until Rust 1.72 it was not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1499>
2024-08-19 10:02:36 +03:00
Sebastian Dröge
09bc0a2836 examples: d3d11videosink: Fix compiler warning about unused closure parameter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1499>
2024-08-19 09:58:16 +03:00
Nirbheek Chauhan
44479cf42a ci: Rely on the monorepo's gtk subproject support
The monorepo now ensures that the gtk subproject keeps building on
windows and macOS via its own CI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1499>
2024-08-17 16:03:54 +05:30
Jordan Petridis
ec66403c24 ci: Remove the manual trigger for the rust msrv windows job
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1499>
2024-08-16 20:09:23 +03:00