Skip to content

d3d11videosink: Add support for GstVideoOverlay::set_render_rectangle

Inspired by an MR !2382 (closed)

The idea is that we can make use of MoveWindow() in WIN32 d3d11window implementation safely because WIN32 d3d11window implementation creates internal HWND even when external HWND is set and then subclassing is used to draw on internal HWND in any case. So the coordinates passed to MoveWindow() will be relative to parent HWND. So, it meets well to the concept of set_render_rectangle().

On MoveWindow() event, WM_SIZE event will be generated by OS and then GstD3D11WindowWin32 implementation will update render area including swapchain correspondingly, as if it's normal window move/resize case.

But in case of UWP (CoreWindow or SwapChainPanel), we need more research to meet expected behavior of set_render_rectangle()

Fixes: #1416 (closed)

Merge request reports

Loading