GNOME Bugzilla – Bug 796812
d3dvideosink: SetRenderRectangle bug
Last modified: 2018-11-03 14:28:00 UTC
Created attachment 373057 [details] Gtk on Windows 10 It seems that there's a bug in d3dvideosink when setting render rectangle. I have modified https://github.com/GStreamer/gstreamer-sharp/blob/master/samples/BasicTutorial5.cs to set the render rectangle, like this: VideoOverlayAdapter adapter = new VideoOverlayAdapter(overlay.Handle); adapter.WindowHandle = windowHandle; adapter.SetRenderRectangle(50, 50, 427, 240); adapter.HandleEvents(true); I expected that the video will be rendered in the 427x240 rectangle, at the position 50,50, but there is a correct rectangle at the position, and video is moved to the 50,50 inside this rectangle. The same happens in the WinForms version of the sample. It looks OK when running on Linux Mint 19.
Created attachment 373058 [details] Gtk on Linux Mint
Created attachment 373059 [details] Modified BasicTutorial5.cs Sample is modified to use render rectangle and show a red background.
Yes that misbehaves on the d3d side. Something with the render_rect related code in here seems to not work completely right: https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/d3dvideosink/d3dhelpers.c, in d3d_stretch_and_copy(). The case at line 1809 does not even consider the x/y of the render rectangle.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/752.