decklink: Fixed caps-building for output devices

When iterating through output devices, video_input_caps was being
updated instead of video_output_caps.

As a result, video output devices were being created with an empty caps object
and `gst-device-monitor-1.0 Video/Sink` would produce no decklink devices.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8298>
This commit is contained in:
Jordan Yelloz 2024-12-20 13:28:38 -07:00 committed by GStreamer Marge Bot
parent c6ed0c33a0
commit 806bdc7c4b

View file

@ -2021,16 +2021,16 @@ init_devices (gpointer data)
GstStructure *s = gst_structure_copy (generic);
gst_structure_set (s, "colorimetry", G_TYPE_STRING, "bt601",
NULL);
video_input_caps =
gst_caps_merge_structure (video_input_caps, s);
video_output_caps =
gst_caps_merge_structure (video_output_caps, s);
}
if (mode->mode_flags & flags & bmdDisplayModeColorspaceRec709) {
GstStructure *s = gst_structure_copy (generic);
gst_structure_set (s, "colorimetry", G_TYPE_STRING, "bt709",
NULL);
video_input_caps =
gst_caps_merge_structure (video_input_caps, s);
video_output_caps =
gst_caps_merge_structure (video_output_caps, s);
}
if ((supported & SUPPORT_COLORSPACE) &&
@ -2038,23 +2038,23 @@ init_devices (gpointer data)
GstStructure *s = gst_structure_copy (generic);
gst_structure_set (s, "colorimetry", G_TYPE_STRING, "bt2020",
NULL);
video_input_caps =
gst_caps_merge_structure (video_input_caps, s);
video_output_caps =
gst_caps_merge_structure (video_output_caps, s);
if (dynamic_range & bmdDynamicRangeHDRStaticPQ) {
GstStructure *s = gst_structure_copy (generic);
gst_structure_set (s, "colorimetry", G_TYPE_STRING, "bt2100-pq",
NULL);
video_input_caps =
gst_caps_merge_structure (video_input_caps, s);
video_output_caps =
gst_caps_merge_structure (video_output_caps, s);
}
if (dynamic_range & bmdDynamicRangeHDRStaticHLG) {
GstStructure *s = gst_structure_copy (generic);
gst_structure_set (s, "colorimetry", G_TYPE_STRING, "bt2100-hlg",
NULL);
video_input_caps =
gst_caps_merge_structure (video_input_caps, s);
video_output_caps =
gst_caps_merge_structure (video_output_caps, s);
}
}