gstreamer-rs issueshttps://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues2024-03-27T11:07:32Zhttps://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/508ci: Make use of gitlab-clippy for clippy job2024-03-27T11:07:32ZSebastian Drögeci: Make use of gitlab-clippy for clippy jobhttps://crates.io/crates/gitlab_clippy
Same thing for gst-plugins-rs.
CC @alatierahttps://crates.io/crates/gitlab_clippy
Same thing for gst-plugins-rs.
CC @alatierahttps://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/375rtpheaderextension: Allows to get multiple mutable references to the extensio...2024-02-22T23:18:01ZSebastian Drögertpheaderextension: Allows to get multiple mutable references to the extension datahttps://gstreamer.pages.freedesktop.org/gstreamer-rs/git/docs/gstreamer_rtp/subclass/prelude/trait.RTPHeaderExtensionImpl.html#method.write
One is passed directly into the method, the other can be retrieved by mapping the `output` buffe...https://gstreamer.pages.freedesktop.org/gstreamer-rs/git/docs/gstreamer_rtp/subclass/prelude/trait.RTPHeaderExtensionImpl.html#method.write
One is passed directly into the method, the other can be retrieved by mapping the `output` buffer another time.
Unclear how to solve that.https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/507Use cargo-semver-checks?2024-02-05T09:37:38ZGuillaume DesmottesUse cargo-semver-checks?I attended [this very interesting talk at FOSDEM](https://fosdem.org/2024/schedule/event/fosdem-2024-2682-semver-in-the-rust-ecosystem-breakage-tooling-and-edge-cases/) (I recommend it, I suppose videos should be available soon), and the...I attended [this very interesting talk at FOSDEM](https://fosdem.org/2024/schedule/event/fosdem-2024-2682-semver-in-the-rust-ecosystem-breakage-tooling-and-edge-cases/) (I recommend it, I suppose videos should be available soon), and the speaker made a quite convincing case for using [cargo-semver-checks](https://crates.io/crates/cargo-semver-checks) as part of crates release process.
My plan is to use it through [Release-plz](https://release-plz.ieni.dev/) for `system-deps` but that's not an option for us here as it relies on Github actions.
- [ ] We should first figure out why `semver-checks` does not work, it cannot build `gstreamer-sys` for some reason:
```
The following warnings were emitted during compilation:
warning: gstreamer-sys@0.22.0:
error: failed to run custom build command for `gstreamer-sys v0.22.0 (/var/home/cassidy/dev/rust/gstreamer-rs/gstreamer/sys)`
Caused by:
process didn't exit successfully: `/var/home/cassidy/dev/rust/gstreamer-rs/target/semver-checks/local-gstreamer-0_22_0/target/semver-checks/target/debug/build/gstreamer-sys-c713f25a5f1f4a82/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=GSTREAMER_1.0_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:warning=
pkg-config exited with status code 1
> PKG_CONFIG_PATH=/var/home/cassidy/dev/gst/gstreamer/build/meson-uninstalled:/var/home/cassidy/dev/gst/gstreamer/prefix/lib/pkgconfig PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags gstreamer-1.0 gstreamer-1.0 >= 1.23
The system library `gstreamer-1.0` required by crate `gstreamer-sys` was not found.
The file `gstreamer-1.0.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
PKG_CONFIG_PATH contains the following:
- /var/home/cassidy/dev/gst/gstreamer/build/meson-uninstalled
- /var/home/cassidy/dev/gst/gstreamer/prefix/lib/pkgconfig
HINT: you may need to install a package such as gstreamer-1.0, gstreamer-1.0-dev or gstreamer-1.0-devel.
```
- [ ] How could it be integrated as part of our release process? Maybe it could be a manual job, or run only when pushing a `release` branch?https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/284Make GstClockTimeDiff a new type2024-01-16T12:55:59ZJan Alexander SteffensMake GstClockTimeDiff a new typeThe following discussion from !600 should be addressed:
- [ ] @slomo started a [discussion](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/600#note_649479): (+2 comments)
> There's not much API using `Clock...The following discussion from !600 should be addressed:
- [ ] @slomo started a [discussion](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/600#note_649479): (+2 comments)
> There's not much API using `ClockTimeDiff` but if you think that makes sense, go for it :)
>
> IMHO we should use it more often in C. Even something like `GST_BUFFER_DURATION()` is technically a `GstClockTimeDiff`: `GstClockTime` is an absolute point in time while `GstClockTimeDiff` is a duration.https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/504videoframe: Add row/column iterators2023-12-22T16:58:24ZSebastian Drögevideoframe: Add row/column iteratorsIdea would be here that they return structs, on which you then can iterate either the components or in case of the row also get a slice for the whole row / iterate over it in bytes.
Should be immutable and mutable iterators.Idea would be here that they return structs, on which you then can iterate either the components or in case of the row also get a slice for the whole row / iterate over it in bytes.
Should be immutable and mutable iterators.https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/493Memory leak when using Play?2023-12-18T08:00:20ZZerowalkerMemory leak when using Play?I noticed when using the Play example, each "Play::new" will cause a memory leak.
Not sure why but my guess is that all resources aren't properly released upon drop.I noticed when using the Play example, each "Play::new" will cause a memory leak.
Not sure why but my guess is that all resources aren't properly released upon drop.https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/503Make integer types used for sizes/width/height/stride/etc more consistent2023-12-17T09:48:28ZSebastian DrögeMake integer types used for sizes/width/height/stride/etc more consistentIn various places signed integers are used because that's what is used in C, but the values can never be negative (-> assertion needed, but also for the unsigned case!). Similarly, sometimes `u32` and sometimes `usize` is used.
This sho...In various places signed integers are used because that's what is used in C, but the values can never be negative (-> assertion needed, but also for the unsigned case!). Similarly, sometimes `u32` and sometimes `usize` is used.
This should be made more consistent.
The main question is what type to use. For stride at least, `usize` makes most sense because it's used for memory accesses. For others, `usize` might make code more convenient because fewer casts are needed, but maybe not.https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/389Add gstreamer-vulkan2023-12-14T09:53:31ZPhilippe RenonAdd gstreamer-vulkanWould it make sense to add `gstreamer-vulkan` ? There is a `gstreamer-gl` so, I guess, yes it would.
Anyways, I had a first try and hit a roadblock when generating `gstreamer-vulkan-sys` :
```
error[E0433]: failed to resolve: use of und...Would it make sense to add `gstreamer-vulkan` ? There is a `gstreamer-gl` so, I guess, yes it would.
Anyways, I had a first try and hit a roadblock when generating `gstreamer-vulkan-sys` :
```
error[E0433]: failed to resolve: use of undeclared crate or module `vulkan`
--> gstreamer-vulkan\sys\src\lib.rs:767:79
|
767 | unsafe extern "C" fn(*mut GstVulkanWindow, *mut *mut glib::GError) -> vulkan::VkSurfaceKHR,
| ^^^^^^ use of undeclared crate or module `vulkan`
```
The Vulkan objects are not generated.
The Vulkan gir file is quite terse: https://github.com/gtk-rs/gir-files/blob/master/Vulkan-1.0.gir.
I am missing something ?Marijn SuijtenMarijn Suijtenhttps://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/474event/message: provide mutable API2023-11-30T09:00:35ZGuillaume Desmottesevent/message: provide mutable APISee the following snippet changing caps from a pad probe:
```rust
if let Some(gst::PadProbeData::Event(ref mut event)) = &mut info.data {
if let gst::EventView::Caps(caps) = event.view() {
let mut updated_caps = caps.caps_owned();
...See the following snippet changing caps from a pad probe:
```rust
if let Some(gst::PadProbeData::Event(ref mut event)) = &mut info.data {
if let gst::EventView::Caps(caps) = event.view() {
let mut updated_caps = caps.caps_owned();
{
let caps = updated_caps.make_mut();
let s = caps.structure_mut(0).unwrap();
s.remove_field("framerate");
}
let updated_event = event.make_mut();
let event_s = updated_event.structure_mut();
event_s.set("caps", updated_caps);
}
}
```
It's not that easy to figure out, so we could provide better API to make it easier:
- `event.view_mut()` as we already have `QueryViewMut`
- provide setters on the event so we don't have to modify the `GstStructure`https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/499Add `maybe_field()` functions to `Caps` / `Structure` and other builds2023-11-30T08:59:23ZSebastian DrögeAdd `maybe_field()` functions to `Caps` / `Structure` and other buildsMakes usage more convenient if fields are to be added only under certain conditions.Makes usage more convenient if fields are to be added only under certain conditions.François LaignelFrançois Laignelhttps://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/391video output to Rust GUI library example2023-11-22T03:50:41ZBevideo output to Rust GUI library exampleAre there any examples of integrating GStreamer video output into a Rust GUI library such as Slint or egui? Maybe it could be done with one of the GStreamer OpenGL elements? The [tutorial](https://gitlab.freedesktop.org/gstreamer/gstream...Are there any examples of integrating GStreamer video output into a Rust GUI library such as Slint or egui? Maybe it could be done with one of the GStreamer OpenGL elements? The [tutorial](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/50f3eee8ebd85a1d71c83e317383e070201e8695/tutorials/Cargo.toml#L11) and [examples](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/50f3eee8ebd85a1d71c83e317383e070201e8695/examples/Cargo.toml#L28) in this repository use GTK3.
I found this [GTK4 example](https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/blob/main/video/gtk4/examples/gtksink.rs) though I'm unclear how I'd use it. Unless I'm missing something, it seems Fedora hasn't packaged gst-plugins-rs, and I suspect it is missing in other distros too. Could `gtk4paintablesink` be used in a Rust application by simply adding `gst-plugin-gtk4` to Cargo.toml to statically link the GStreamer plugin, or would there be more setup needed for GStreamer to detect the plugin?https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/485Adding Rust tutorial code to the docs website2023-10-03T12:07:56ZMichiel WesterbeekAdding Rust tutorial code to the docs websiteHi, I'm interested to help add Rust as a language in the current gstreamer documentation.
Most of the tutorials code is already ported to rust: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/main/tutorials/src/bin/basic-tut...Hi, I'm interested to help add Rust as a language in the current gstreamer documentation.
Most of the tutorials code is already ported to rust: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/main/tutorials/src/bin/basic-tutorial-1.rs
I think it would be a great experience if we could add that to the main documentation site (https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=python) since most (new) users will discover that first.
Reaching out to see if there is any interest from the maintainers to do that, and get any hints on how to get started.
I think we won't want to duplicate the tutorials code across gst-docs and gstreamer-rs, so we'd have to find a way to resolve that.
Interested to hear your thoughts!https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/481Can we have an alternative to the set_property that doesn't panic?2023-08-16T06:19:31ZJoão Antônio CardosoCan we have an alternative to the set_property that doesn't panic?Can we have an alternative to the set_property that doesn't panic? Maybe something like `try_set_property()` that returns a `Result<()>`, and a `property_if_available()` to the build pattern?
The pain is that there are gst versions in w...Can we have an alternative to the set_property that doesn't panic? Maybe something like `try_set_property()` that returns a `Result<()>`, and a `property_if_available()` to the build pattern?
The pain is that there are gst versions in which some properties are not available for a given component, like the `jpegdec`, which doesn't have `discard-corrupted-frames` on 1.16. I was using the build pattern and was not aware of that, resulting in a panic, which for a build pattern that returns a Result is not what I was expecting.https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/476StreamProducer silently modifies appsrc properties2023-08-08T09:31:01ZEdward HerveyStreamProducer silently modifies appsrc propertiesThis is documented nowhere afaics.
When you put add a consumer `appsrc` to a `StreamProducer`, the code will set a whole bunch of properties : https://gstreamer.pages.freedesktop.org/gstreamer-rs/stable/latest/docs/src/gstreamer_utils/s...This is documented nowhere afaics.
When you put add a consumer `appsrc` to a `StreamProducer`, the code will set a whole bunch of properties : https://gstreamer.pages.freedesktop.org/gstreamer-rs/stable/latest/docs/src/gstreamer_utils/streamproducer.rs.html#139
If you had set them previously to other values they will be overridden.https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/468event::Tag::tag vs message::Tag::tags2023-05-23T15:41:11ZJan Alexander Steffensevent::Tag::tag vs message::Tag::tagsWe currently have:
```rust
fn event::Tag::tag() -> &TagListRef
fn event::Tag::tag_owned() -> TagList
fn message::Tag::tags() -> TagList
```
Seems a little inconsistent. I think the singular vs plural should be fixed.We currently have:
```rust
fn event::Tag::tag() -> &TagListRef
fn event::Tag::tag_owned() -> TagList
fn message::Tag::tags() -> TagList
```
Seems a little inconsistent. I think the singular vs plural should be fixed.0.21.0https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/462No discoverable documentation on available crate features2023-04-18T09:18:21ZMart RaudseppNo discoverable documentation on available crate featuresThe generated binding documentation doesn't have any information on the available features in a nicely discoverable way. I only knew of the gst version ones from being mentioned elsewhere, but not e.g. `serde`.
Please consider adding a t...The generated binding documentation doesn't have any information on the available features in a nicely discoverable way. I only knew of the gst version ones from being mentioned elsewhere, but not e.g. `serde`.
Please consider adding a table of available features in the documentation of each crate like some other crates in the ecosystem do, or at least an automated list of available features like e.g. docs.rs generates for the top navbar.https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/452Add a means to log and create an ErrorMessage at once2023-02-27T11:41:52ZFrançois LaignelAdd a means to log and create an ErrorMessage at onceWhen creating an `ErrorMessage`, it is common to also log it, which either means duplicating the message or using something like:
```rust
const ERR: &str = "loop terminated unexpectedly";
gst::error!(CAT, imp: self, "{ERR}");
...When creating an `ErrorMessage`, it is common to also log it, which either means duplicating the message or using something like:
```rust
const ERR: &str = "loop terminated unexpectedly";
gst::error!(CAT, imp: self, "{ERR}");
return Err(gst::error_msg!(gst::LibraryError::Failed, ["{ERR}"]));
```
It would be convenient to use a single macro to perform both operation at once.https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/252Add additional crate for element bindings2023-02-24T07:55:28ZSebastian DrögeAdd additional crate for element bindingsFirst step would be to write a code generator for this (maybe based on the metadata used for generated docs by hotdoc?). The element bindings should cover (fallible) creation, properties (considering readability/writability), signals, ac...First step would be to write a code generator for this (maybe based on the metadata used for generated docs by hotdoc?). The element bindings should cover (fallible) creation, properties (considering readability/writability), signals, action signals, custom enums/flags.
Usage of the `glib_wrapper!` macro seems useful but unclear how well that would behave with a fallible `get_type` function.
Version information for any of the API should be handled like in the other bindings, stuff put behind feature flags.
Elements from gst-plugins-bad should be put behind an `unstable` feature flag, core/base/good/ugly handled normally.
Advantage would be that there wouldn't be any stringly-typed API anymore and errors like setting a non-existing property wouldn't have to be handled by the application.Sebastian DrögeSebastian Drögehttps://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/447utils: Make it possible to compile to a C library to allow usage of `StreamPr...2023-02-23T08:25:30ZSebastian Drögeutils: Make it possible to compile to a C library to allow usage of `StreamProducer` from C codeCC @feaneronCC @feaneronhttps://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/169Check for all manual bindings if they are listed in the Gir.toml for docs gen...2023-02-10T11:14:06ZSebastian DrögeCheck for all manual bindings if they are listed in the Gir.toml for docs generationSee https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/merge_requests/197See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/merge_requests/1970.21.0