Commit graph

3193 commits

Author SHA1 Message Date
François Laignel
8a08557ce4 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/1526>
2024-09-11 18:00:38 +02:00
Sebastian Dröge
b9307ca258 gstreamer: memory: Fix assertions for copy_range/resize/share functions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1392>
2024-02-12 15:56:52 +02:00
Sebastian Dröge
8cceb92d5f Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1341>
2023-11-10 09:42:41 +02:00
Guillaume Desmottes
1915957409 gst-utils: prevent dead lock when requesting key unit
Sending the UpstreamForceKeyUnitEvent using gst_element_send_event()
internally takes the state lock. If appsink is pre-rolling we are also
holding the preroll lock.

This may result in a dead lock with the thread doing the state change as
this one takes the state lock and then the pre-roll lock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1341>
2023-11-10 09:29:52 +02:00
Sebastian Dröge
ae76c83ddf Update various dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1291>
2023-07-05 12:10:33 +03:00
Sebastian Dröge
313116e60c basetransform: Don't leak any output buffer if prepare_output_buffer fails
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1291>
2023-07-05 11:54:45 +03:00
Sebastian Dröge
8f0b85df0b basetransform: Fix memory leak when dropping buffers from the transform function
Also add a basic test for a basetransform subclass.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1291>
2023-07-05 11:54:45 +03:00
Sebastian Dröge
b439d90391 examples: Reduce dependencies of the thumbnail example
Instead of depending on libraries for every possible image format,
depend only on the JPEG and PNG libraries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1291>
2023-07-05 11:52:47 +03:00
Sebastian Dröge
36a92bf0fc rtsp-server: Work around GstRTSPClientClass ABI breakage in 1.18
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/455

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1291>
2023-07-05 11:48:04 +03:00
Sebastian Dröge
bdf502c632 Update CHANGELOG.md for 0.19.8 2023-02-09 21:30:01 +02:00
Sebastian Dröge
350662e140 Update Cargo.lock 2023-02-09 21:27:43 +02:00
Sebastian Dröge
cc4c814095 Update versions to 0.19.8 2023-02-09 21:27:26 +02:00
Christian Meissl
0714c2ceb0 gstreamer-allocators: allow to subclass fd memory allocators
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1215>
2023-02-09 20:45:25 +02:00
Sebastian Dröge
b708208408 gstreamer: Add bindings for Message::structure_mut()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1215>
2023-02-09 20:43:09 +02:00
Sebastian Dröge
b54746cf62 gstreamer: Use obj() instead of instance() in the remaining places
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1202>
2023-01-24 16:08:45 +02:00
Sebastian Dröge
7ca1834cd6 Add 1.22 to extra_versions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1202>
2023-01-24 16:07:51 +02:00
Sebastian Dröge
4f6f7028b9 gstreamer: Mark MessageType enum as non-exhaustive
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1202>
2023-01-24 16:07:51 +02:00
Sebastian Dröge
99021c6c07 ci: Update gtk4 to 4.8.3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1202>
2023-01-24 16:07:25 +02:00
Sebastian Dröge
37409be8bc ci: Update to meson 1.0.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1202>
2023-01-24 16:07:22 +02:00
Sebastian Dröge
7baa69563a ci: Rebuild image for 1.22.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1202>
2023-01-24 16:07:12 +02:00
Sebastian Dröge
57052b9417 Regenerate with latest gir files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1202>
2023-01-24 16:06:56 +02:00
Sebastian Dröge
94f7041d29 Update GStreamer gir files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1202>
2023-01-24 16:06:06 +02:00
Sebastian Dröge
d4e63494dd Update gir-files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1202>
2023-01-24 16:05:44 +02:00
Sebastian Dröge
f27a717ceb Get README.md in sync again
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/437
2023-01-23 12:01:31 +02:00
Sebastian Dröge
fb894d4490 Update Cargo.lock 2023-01-19 19:03:44 +02:00
Sebastian Dröge
455fef0734 Update CHANGELOG.md for 0.19.7 2023-01-19 19:03:29 +02:00
Sebastian Dröge
fd28a25948 Update versions to 0.19.7 2023-01-19 19:02:09 +02:00
Sebastian Dröge
ee2505388b gstreamer: Handle NULL caps when parsing the allocation query
With the next release this will be handled explicitly and setting no
caps will also be possible when creating allocation queries.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1194

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1195>
2023-01-19 16:25:15 +02:00
Sebastian Dröge
24f8b74f21 Fix version links in CHANGELOG.md 2023-01-18 16:50:50 +02:00
Sebastian Dröge
27700b86de Update Cargo.lock 2023-01-18 16:47:56 +02:00
Sebastian Dröge
085108f4a2 Update versions to 0.19.6 2023-01-18 16:47:43 +02:00
Sebastian Dröge
f50ddc134b Update CHANGELOG.md for 0.19.6 release 2023-01-18 16:47:23 +02:00
Sebastian Dröge
47a8d27a04 gstreamer: Fix memory leak in buffer pool subclassing test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1193>
2023-01-18 16:34:46 +02:00
Sebastian Dröge
a78177aacb gstreamer: Add missing doc alias
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1193>
2023-01-18 16:34:46 +02:00
Sebastian Dröge
b7a52b0da0 gstreamer-app: Assert that GStreamer is initialized before creating instances
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1193>
2023-01-18 16:34:46 +02:00
Sebastian Dröge
80fba8f1e0 Update Cargo.lock 2022-12-27 12:52:56 +02:00
Sebastian Dröge
8ff2416988 Update CHANGELOG.md for 0.19.5 2022-12-27 12:49:55 +02:00
Sebastian Dröge
aadbeac8c1 Update versions to 0.19.5 2022-12-27 12:47:10 +02:00
Sebastian Dröge
74f4948db5 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:34:50 +02:00
Sebastian Dröge
251dc5c576 Regenerate with latest GStreamer gir files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:31:03 +02:00
Jordan Petridis
096f39d7b3 ci/windows: Update base image
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:29:39 +02:00
Jordan Petridis
095b174ded ci: Avoid building examples with --all-features
--all-features ends up enabling the windows and trying to compile
the d3d example, which can't be built on linux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:29:08 +02:00
Jordan Petridis
01ab46a483 ci: move tests scripts to individual files
Instead of inling bash scripts in yaml

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:29:02 +02:00
Sebastian Dröge
58ea85c52c gstreamer: Allow returning Handled from BufferList pad probes
This is handled exactly the same way as buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:28:09 +02:00
Sebastian Dröge
709c01ed65 gl: Reset video frame size/stride/offset to 0 for GL mapped frames
The memory pointers are actually the GL texture IDs, and accessing them
like raw video memory will read random memory areas.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:28:01 +02:00
Sebastian Dröge
c5672f12e1 ci: Rebuild CI images another time to get latest GStreamer version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:27:48 +02:00
Jordan Petridis
40315be230 ci/install-{gst,gtk}.sh: run ldconfig after meson install
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:27:43 +02:00
Jordan Petridis
3fb604e653 ci/install-{gst, gtk}: update meson command usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:27:36 +02:00
Jordan Petridis
2bcc1884cb ci/install-{gst, rust}.sh: add shebangs to the scripts
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:27:31 +02:00
Jordan Petridis
29fb694f10 ci/install-{gst, gtk}.sh: reformat to make it more readable
Split commands and strings to multiple lines

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1176>
2022-12-27 12:27:23 +02:00