interlace: Specify interlace-modes in the sink pad template

Especially specify the field-order in the interleaved mode. Otherwise it
might cause the negotiation to fail, because
GST_PAD_SET_ACCEPT_INTERSECT is not set on the sinkpad, and the
field-order is missing in the sink template but can be present in the
outside caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>
This commit is contained in:
Vivia Nikolaidou 2021-03-08 16:16:25 +02:00
parent 9da6da20e7
commit cb55d30b3c
2 changed files with 9 additions and 3 deletions

View file

@ -26630,7 +26630,7 @@
"long-name": "Interlace filter",
"pad-templates": {
"sink": {
"caps": "video/x-raw:\n format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw:\n format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n interlace-mode: progressive\nvideo/x-raw:\n format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n interlace-mode: interleaved\n field-order: { (string)top-field-first, (string)bottom-field-first }\nvideo/x-raw:\n format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n interlace-mode: mixed\n\nvideo/x-raw(format:Interlaced):\n format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n interlace-mode: alternate\n",
"direction": "sink",
"presence": "always"
},

View file

@ -211,10 +211,16 @@ static GstStaticPadTemplate gst_interlace_src_template =
);
static GstStaticPadTemplate gst_interlace_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (VIDEO_FORMATS))
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (VIDEO_FORMATS)
",interlace-mode=progressive ;" GST_VIDEO_CAPS_MAKE (VIDEO_FORMATS)
",interlace-mode=interleaved,field-order={top-field-first,bottom-field-first}; "
GST_VIDEO_CAPS_MAKE (VIDEO_FORMATS) ",interlace-mode=mixed ;"
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_FORMAT_INTERLACED,
VIDEO_FORMATS)
",interlace-mode=alternate")
);
GType gst_interlace_get_type (void);