first of all thanks for creating GStreamer and obviously putting a lot of work into it!
I need your help with a seemly simple use case. I need my pipeline to render full-screen on Windows x64.
I’m very new to GStreamer and struggling with this now for several hours and probably miss something.
My complete use case is a continuous looped video that will be rotated by arbitrary angles and rendered full screen. The looping and rotation (gltransformation) I made work nicely.
Now I need to find a way to render full-screen. I looked into the below approaches:
extracting the the texture out of the glupload element and independently rendering that using native OpenGL commands. The rendering loop and and gliib main loop need to be integrated here
this gets really complex. I didn’t manage to make it full work yet. Also I think the time synchronization of the frames will get lost
How GstVideoOverlay can be used with a Windows HWND of a full screen window
I didn’t manage to find documentation here
do this directly using glimagesink?
My understanding is that this is not possible
Use GTK to make the full screen window
there are some examples how to use GstVideoOverlay with GTK. But it would require building GTK from source with VS2022, in turn requiring installation of special build systems
I wonder do I miss something obvious? What would be a good way forward here?
d3dvideosink is likely the best choice at the moment. Though, it had a bug in regard to maximize and full screen. A fix has been backported and will be part of the next stable release. Meanwhile, see:
If I read it correctly that would then mean that the rotation of the video by the arbitrary angle would need to happen using “rotate” which happens in the CPU (as opposed gltranslattion doing it in the GPU). Would that be fast enough on standard PC with FullHD resolution from experience to not loose frames?
(recommended) Write new d3d11 element for the transform
Get gstreamer rendered texture via appsink (e.g., … ! d3d11convert ! “video/x-raw(memory:D3D11Memory),format=RGBA” ! appsink) → rotate it in your app → render using appsrc and d3d11videosink (appsrc ! queue ! d3d11videosink). d3d11decoder-appsink.cpp and d3d11videosink-appsrc.cpp are related examples
Use present signal d3d11videosink. d3d11videosink-present.cpp is a related example but you need to copy the swapchain’s backbuffer into your own texture first for shader input. Then redraw rotated image to the swapchain’s backbuffer using your shader or other APIs such as d2d. you will need to carefully calculate viewport in this case.
Or if you can use main branch, d3d11overlay element is an option as well (see d3d11overlay.cpp). Perform rotation to your own render target and copyback to the original texture.