10 Commits

Author SHA1 Message Date
Seungha Yang
32e6b47b07 examples: Add d3d12fisheyedewarp test example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9441>
2025-07-27 01:22:28 +09:00
Seungha Yang
4f932ee081 d3d12swapchainsink: Add last-rendered-sample action signal
Add a new action signal to allow applications to capture
the most recently rendered frame directly from the swapchain
back buffer.

Unlike the existing "last-sample" property, which exposes
the raw input sample before any sink-side processing, this
signal captures the final displayed image after any internal
image processing (e.g., UV remap, color balance, overlay) has been
applied.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9423>
2025-07-22 12:02:15 +00:00
Seungha Yang
0d1cd40097 d3d12swapchainsink: Update uv-remap signal to support background color
Allow per viewport background color setting

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9393>
2025-07-17 12:55:11 +00:00
Seungha Yang
66880012c5 examples: d3d12swapchainsink: Add support for force-aspect-ratio change
Adding keyboard control for "force-aspect-ratio" property change

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9392>
2025-07-14 17:07:35 +00:00
Seungha Yang
26227042c3 examples: d3d12swapchainsink: Add uv-remap/redraw example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9209>
2025-06-17 22:18:32 +00:00
Seungha Yang
80d9214747 examples: Add d3d12remap example
Adding a fisheye image transform example using d3d12remap element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8887>
2025-05-02 22:11:04 +09:00
Seungha Yang
4bb3854772 d3d12: Add d3d12swapchainsink element
Adding a new videosink element for Windows composition API based
applications. Unlike d3d12videosink, this element will create only
DXGI swapchain by using IDXGIFactory2::CreateSwapChainForComposition()
without actual window handle, so that video scene can be composed
via Windows native composition API, such as DirectComposition.
Note that this videosink does not support GstVideoOverlay interface
because of the design.

The swapchain created by this element can be used with
* DirectComposition's IDCompositionVisual in Win32 app
* WinRT and WinUI3's UI.Composition in Win32/UWP app
* UWP and WinUI3 XAML's SwapChainPanel

See also examples in this commit which show usage of the videosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7287>
2024-08-19 11:07:17 +09:00
Seungha Yang
37e1847464 d3d12videosink: Add support for window handle update
A large refactoring commit for adding features and improve performance

* Reuse internal converter and overlay compositor:
  Converter can be reused as long as input and display formats are not
  changed. Also overlay compositor reconstruction is required only if
  display format is changed

* Don't wait for full GPU flush on resize or close:
  D3D12 swapchain requires GPU idle in order to resize backbuffer.
  Thus CPU side waiting is required for swapchain related commands
  to be finished. However, don't need to wait for full GPU flushing.

* Support multiple sink on a single external window
  Keep installed subclass window procedure even if there's no associated
  our internal HWND. This will make window procedure hooking less racy.
  Then parent HWND's message will be transferred to our internal HWNDs
  if needed.

* Adding support for window handle update
  Application can change target HWND even when videosink is playing or
  paused state. So, users can call gst_video_overlay_set_window_handle()
  against d3d12videosink anytime. The videosink will be able to update
  internal state and setup resource upon requested.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7013>
2024-06-17 16:05:00 +00:00
Seungha Yang
84aecab150 d3d12videosink: Add overlay signal to support d3d12/d3d11/d2d overlay
Conceptually identical to the present signal of d3d11videosink.
This signal will be emitted with current render target
(i.e., swapchain backbuffer) and command queue. Signal handler
can record GPU commands for an overlay image or to blend
an image to the render target.

In addition to d3d12 resources, videosink will send
d3d11 and d2d resources depending on "overlay-mode"
property, so that signal handler can render by using
preferred/required DirectX API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6838>
2024-05-24 15:55:17 +00:00
Seungha Yang
4e1bf149d0 d3d12: Add H.264 video encoder
Adding video encoder element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5808>
2024-01-19 12:47:35 +00:00