"long-name": "Line 21 CC Decoder",
"pad-templates": {
"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",
"presence": "always"
},
"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",
"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"
},
"line21encoder": {
"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",
#define DEFAULT_NTSC_ONLY FALSE
#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",
GST_PAD_SINK,
GST_DEBUG_CATEGORY_INIT (gst_line_21_decoder_debug, "line21decoder",
0, "Line 21 CC Decoder");
vbi_initialize_gst_debug ();
+
+ gst_type_mark_as_plugin_api (GST_TYPE_LINE_21_DECODER_MODE, 0);
}
static void
/* Scan the next frame from the first line */
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) {
GST_DEBUG_OBJECT (filter, "Only 720 pixel wide formats are supported");
self->compatible_format = FALSE;