Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGStreamer plugin fails to get GL context #27013
Comments
|
@asajeffrey Feel free to just tell me the setup that you're using and I can replicate that. |
|
Oh that's annoying, I'll see if it's working at my end. Something might have regressed. |
|
OK, I'm getting the same behaviour at my end, fore some reason there's no GL context being returned by gst_gl_query_local_gl_context when the downstream node is a
this works for me on wayland, does it work at your end? |
|
The relevant bit of the log looks like:
|
|
As a workaround, if you pipe servo into both a
Does this work for you? |
|
Adding the glimagesink did allow it to make progress in finding the GL context! Than you. Now I'm getting greedy and attempting to swap out the wayland-specific code for x11. I'm stumbling a bit convincing multi::connection::Connection::Default(...) to accept an x11 Connection instead of the wayland one. I changed the glstreamer-gl-sys features to ["x11"] and can't find any other references to wayland (other than in in servowebsrc.rs) in port/gstplugin but I'll keep digging. There's some expectation for wayland that I haven't found, yet. |
|
Glad to hear you got it working! Any chance you could submit a PR that updates the README? Back when I wrote the plug-in, I could only get it to work with Wayland, but since then the x11 support in surfman has changed, so there's a better chance that it'll work. I'm glad to see you getting it up and running, it would be great to see people outside the team using Servo with gstreamer! |
|
@asajeffrey I intend to use Servo+GStreamer as the backend renderer for livestreams coming out of Transmutable Soundstage. The main idea is that small crews of ~12 people working from home can use the virtual soundstage to produce live talk shows. The crew use web browsers on laptops and tablets to run the cameras, sound board, lighting, teleprompters, etc. The cast and live audience come on-set via headsets with WebXR. |
…r=asajeffrey Document a GStreamer plugin workaround <!-- Please describe your changes on the following line: --> Based on conversation in Issue #27013 this documents a workaround in the gstreamer CLI for a failure of the GStreamer plugin to find usable a GL context without a downstream glimagesink --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because it's a document change <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
…r=asajeffrey Document a GStreamer plugin workaround <!-- Please describe your changes on the following line: --> Based on conversation in Issue #27013 this documents a workaround in the gstreamer CLI for a failure of the GStreamer plugin to find usable a GL context without a downstream glimagesink --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because it's a document change <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
…r=asajeffrey Document a GStreamer plugin workaround <!-- Please describe your changes on the following line: --> Based on conversation in Issue #27013 this documents a workaround in the gstreamer CLI for a failure of the GStreamer plugin to find usable a GL context without a downstream glimagesink --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because it's a document change <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
@TrevorFSmith cool project you got there! Maybe GstWPE could be an option as well ;) |
|
My attempt to fix this is https://github.com/asajeffrey/servo/tree/gstplugin-fallback-glcontext, which gets further but then fails to run a task on the GL thread. |
|
So it turns out the problem is that some GL sinks (e.g. gldownload) don't create their GL context until they're in the |
Delay initializing servo GL until as late as possible <!-- Please describe your changes on the following line: --> Initialize the GL state for the gstreamer plugin as late as possible. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #27013 - [x] These changes do not require tests because it's a gstreamer plugin issue <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Delay initializing servo GL until as late as possible <!-- Please describe your changes on the following line: --> Initialize the GL state for the gstreamer plugin as late as possible. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #27013 - [x] These changes do not require tests because it's a gstreamer plugin issue <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Delay initializing servo GL until as late as possible <!-- Please describe your changes on the following line: --> Initialize the GL state for the gstreamer plugin as late as possible. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #27013 - [x] These changes do not require tests because it's a gstreamer plugin issue <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Delay initializing servo GL until as late as possible <!-- Please describe your changes on the following line: --> Initialize the GL state for the gstreamer plugin as late as possible. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #27013 - [x] These changes do not require tests because it's a gstreamer plugin issue <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Delay initializing servo GL until as late as possible <!-- Please describe your changes on the following line: --> Initialize the GL state for the gstreamer plugin as late as possible. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #27013 - [x] These changes do not require tests because it's a gstreamer plugin issue <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
@TrevorFSmith hopefully this fixed the problem! |
I'm attempting to use the GStreamer plugin to record and stream Servo hosting a simple "hello world" page.
I successfully followed the instructions and ended up with a command like so:
The resulting output:
(the same behaviour occurs in wayland with a slightly different GLDisplay value, then hard crashes the display manager)
Here's the gst-inspect-1.0 output:
(the backtrace is empty regardless of whether I set RUST_BACKTRACE=1)
My dev environment:
OS: pop_os (64bit Ubuntu 20.04 TLS derivative)
CPU: AMD Ryzer 7 3700x
GPU: AMD Radeon RX 5700 XT
RAM: 64GB
GNOME: 3.66.2
Windowing system: X11 (the same error occurs on Wayland)
I'm wiling to dig in and do more debugging but figured I'd ask to see whether this is a known bug that my Issue diving couldn't turn up.