gstreamer_gl (rust) on Windows

Steven Fontaine sir.fon1103 at gmail.com
Mon Feb 7 22:46:34 UTC 2022


Thanks for all your help with this so far, Sebastian and Matt.

> Which inconsistencies are making things difficult for you?

In hindsight, it's more so my lack of knowledge of desktop gl bindings
(coming from a weak background of webgl, where things tend to work "out of
the box") and the gst/gst_gl libraries in general and their intricacies and
common workflows. In any case, I don't think it's a shortcoming of the
bindings themselves, I'm just not familiar enough with the libraries to
fully understand errors I get, common pitfalls, etc.

Regardless, following this:

> I think you need to make the glutin context "uncurrent" before these
> lines and make it current again afterwards:
>
>
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/8b09a84bf197a8516858ea46db74c5132ea59406/examples/src/glupload.rs#L408-416

fails at fill_info (
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/blob/8b09a84bf197a8516858ea46db74c5132ea59406/examples/src/glupload.rs#L416),
complaining that "glGetString not defined or returned invalid value".

I've been working on converting the glutin "sharing" example (
https://github.com/rust-windowing/glutin/blob/b9081d2b27af0cdd15895775fe6688847a041229/glutin_examples/examples/sharing.rs)
and have had quite a bit of success. Rather than sharing multiple
windowed/headless glutin contexts, as the glutin example does, I've
modified the code to share a single windowed (glutin) context and a single
gst context. Every time the glutin context is used, the gst context is
deactivated. Every time the gst context is needed, the glutin context is
deactivated. This almost works. The application doesn't crash, events are
handled properly, etc. The only problem is that nothing is rendered. The
window displays a black screen, rather than any videotestsrc pattern I try.
I'm creating the gst context exactly as described earlier in this thread,
so assuming that's the correct way to set that up, I'm a bit stuck again.

There are several differences between the gl setup in the glutin example
and the gst example, so I might be configuring something improperly. That
said, gl is pretty opaque, and hard to probe the state, so it's difficult
for me to debug. Does anyone have any ideas/suggestions here, or perhaps
know of some tools that could help me debug this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220207/5fbf4d04/attachment.htm>


More information about the gstreamer-devel mailing list