Hello!
First post here, so I’m not really sure if this is the appropriate place to do so? But I see questions about glib/gstreamer asked here, so I guess I’m good !
So, I am trying to create a GTK4 rust app which process a video through gstreamer and play it. I know the ecosystem is still quite young and unstable, but I like danger !
Since GTK4 introduced gtk::Video
, and it takes a gio::InputStream
, I figured out that the best way to display that video would be using the giostreamsink
which create a gio::OutputStream
and is available in gstreamer-good.
The problem is, I have trouble getting that OutputStream
… Indeed, this fails:
let output = sink.get_property("stream")?
.get::<gio::OutputStream>()?
.unwrap();
error[E0277]: the trait bound `OutputStream: gstreamer::glib::value::FromValueOptional<'_>` is not satisfied
--> src/backend/video.rs:68:14
|
68 | .get::<gio::OutputStream>()?
| ^^^ the trait `gstreamer::glib::value::FromValueOptional<'_>` is not implemented for `OutputStream`
So, I head to the documentation, and, indeed, FromValueOptional
is not implemented for OutputStream
. But neither is gtk::Widget
? Yet, I see other projects, like glide, using that without issue? So what’s the issue in my code? How might I do that anyway?
Maybe is there a use statement missing? But neither gio::prelude::*
nor glib::prelude::*
work…