mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
line21dec: relax caps requirements
Instead of requiring interlaced video, simply skip CC detection when the input is progressive. This allows placing line21decoder unconditionally in pipelines, without having to worry about whether the input stream will be interlaced, or even worse interlacing just in case! + update doc cache Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1885>
This commit is contained in:
parent
42586dd536
commit
ff3cce38b6
2 changed files with 57 additions and 4 deletions
|
@ -3451,17 +3451,42 @@
|
||||||
"long-name": "Line 21 CC Decoder",
|
"long-name": "Line 21 CC Decoder",
|
||||||
"pad-templates": {
|
"pad-templates": {
|
||||||
"sink": {
|
"sink": {
|
||||||
"caps": "video/x-raw:\n format: { I420, YUY2, YVYU, UYVY, VYUY, v210 }\n interlace-mode: interleaved\n",
|
"caps": "video/x-raw:\n format: { I420, YUY2, YVYU, UYVY, VYUY, v210 }\n",
|
||||||
"direction": "sink",
|
"direction": "sink",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
},
|
},
|
||||||
"src": {
|
"src": {
|
||||||
"caps": "video/x-raw:\n format: { I420, YUY2, YVYU, UYVY, VYUY, v210 }\n interlace-mode: interleaved\n",
|
"caps": "video/x-raw:\n format: { I420, YUY2, YVYU, UYVY, VYUY, v210 }\n",
|
||||||
"direction": "src",
|
"direction": "src",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"properties": {},
|
"properties": {
|
||||||
|
"mode": {
|
||||||
|
"blurb": "Control whether and how detected CC meta should be inserted in the list of existing CC meta on a frame (if any).",
|
||||||
|
"conditionally-available": false,
|
||||||
|
"construct": false,
|
||||||
|
"construct-only": false,
|
||||||
|
"controllable": false,
|
||||||
|
"default": "add (0)",
|
||||||
|
"mutable": "null",
|
||||||
|
"readable": true,
|
||||||
|
"type": "GstLine21DecoderMode",
|
||||||
|
"writable": true
|
||||||
|
},
|
||||||
|
"ntsc-only": {
|
||||||
|
"blurb": "Whether line 21 decoding should only be attempted when the input resolution matches NTSC",
|
||||||
|
"conditionally-available": false,
|
||||||
|
"construct": false,
|
||||||
|
"construct-only": false,
|
||||||
|
"controllable": false,
|
||||||
|
"default": "false",
|
||||||
|
"mutable": "null",
|
||||||
|
"readable": true,
|
||||||
|
"type": "gboolean",
|
||||||
|
"writable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"rank": "none"
|
"rank": "none"
|
||||||
},
|
},
|
||||||
"line21encoder": {
|
"line21encoder": {
|
||||||
|
@ -3554,6 +3579,26 @@
|
||||||
"value": "3"
|
"value": "3"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"GstLine21DecoderMode": {
|
||||||
|
"kind": "enum",
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"desc": "add new CC meta on top of other CC meta, if any",
|
||||||
|
"name": "add",
|
||||||
|
"value": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc": "ignore CC if a CC meta was already present",
|
||||||
|
"name": "drop",
|
||||||
|
"value": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc": "replace existing CC meta",
|
||||||
|
"name": "replace",
|
||||||
|
"value": "2"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"package": "GStreamer Bad Plug-ins",
|
"package": "GStreamer Bad Plug-ins",
|
||||||
|
|
|
@ -56,7 +56,7 @@ enum
|
||||||
#define DEFAULT_NTSC_ONLY FALSE
|
#define DEFAULT_NTSC_ONLY FALSE
|
||||||
#define DEFAULT_MODE GST_LINE_21_DECODER_MODE_ADD
|
#define DEFAULT_MODE GST_LINE_21_DECODER_MODE_ADD
|
||||||
|
|
||||||
#define CAPS "video/x-raw, format={ I420, YUY2, YVYU, UYVY, VYUY, v210 }, interlace-mode=interleaved"
|
#define CAPS "video/x-raw, format={ I420, YUY2, YVYU, UYVY, VYUY, v210 }"
|
||||||
|
|
||||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
|
@ -216,6 +216,8 @@ gst_line_21_decoder_class_init (GstLine21DecoderClass * klass)
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_line_21_decoder_debug, "line21decoder",
|
GST_DEBUG_CATEGORY_INIT (gst_line_21_decoder_debug, "line21decoder",
|
||||||
0, "Line 21 CC Decoder");
|
0, "Line 21 CC Decoder");
|
||||||
vbi_initialize_gst_debug ();
|
vbi_initialize_gst_debug ();
|
||||||
|
|
||||||
|
gst_type_mark_as_plugin_api (GST_TYPE_LINE_21_DECODER_MODE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -288,6 +290,12 @@ gst_line_21_decoder_set_info (GstVideoFilter * filter,
|
||||||
/* Scan the next frame from the first line */
|
/* Scan the next frame from the first line */
|
||||||
self->line21_offset = -1;
|
self->line21_offset = -1;
|
||||||
|
|
||||||
|
if (!GST_VIDEO_INFO_IS_INTERLACED (in_info)) {
|
||||||
|
GST_DEBUG_OBJECT (filter, "Only interlaced formats are supported");
|
||||||
|
self->compatible_format = FALSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (GST_VIDEO_INFO_WIDTH (in_info) != 720) {
|
if (GST_VIDEO_INFO_WIDTH (in_info) != 720) {
|
||||||
GST_DEBUG_OBJECT (filter, "Only 720 pixel wide formats are supported");
|
GST_DEBUG_OBJECT (filter, "Only 720 pixel wide formats are supported");
|
||||||
self->compatible_format = FALSE;
|
self->compatible_format = FALSE;
|
||||||
|
|
Loading…
Reference in a new issue