d3d11screencapturesrc: Specify PAR 1/1 to template caps

... otherwise PAR can be wrongly signalled during the negotiation

Fixing below pipeline when desktop resolution is not 640x480
gst-launch-1.0.exe \
  d3d11screencapturesrc ! videoscale !
  video/x-raw,width=640,height=480,pixel-aspect-ratio=1/1 ! d3d11videosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3360>
This commit is contained in:
Seungha Yang 2022-11-08 19:26:39 +09:00 committed by GStreamer Marge Bot
parent 7f4f11503c
commit 99b83f33f7
2 changed files with 4 additions and 4 deletions

View file

@ -39,8 +39,8 @@ GST_DEBUG_CATEGORY_EXTERN (gst_d3d11_screen_capture_device_debug);
static GstStaticCaps template_caps =
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
(GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ";"
GST_VIDEO_CAPS_MAKE ("BGRA"));
(GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ", pixel-aspect-ratio = 1/1;"
GST_VIDEO_CAPS_MAKE ("BGRA") ", pixel-aspect-ratio = 1/1");
enum
{

View file

@ -119,8 +119,8 @@ gst_d3d11_screen_capture_api_get_type (void)
static GstStaticCaps template_caps =
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
(GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ";"
GST_VIDEO_CAPS_MAKE ("BGRA"));
(GST_CAPS_FEATURE_MEMORY_D3D11_MEMORY, "BGRA") ", pixel-aspect-ratio = 1/1;"
GST_VIDEO_CAPS_MAKE ("BGRA") ", pixel-aspect-ratio = 1/1");
struct _GstD3D11ScreenCaptureSrc
{