diff options
author | Mathieu Duponchelle <mathieu@centricular.com> | 2021-01-22 23:54:50 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-04-03 00:42:15 +0000 |
commit | ff3cce38b6ac54feb19bb93d36ed0337c7c15442 (patch) | |
tree | 4f0e7e0231a8132e463a6eadcf1553563e0f82eb /ext/closedcaption/gstline21dec.c | |
parent | 42586dd53666fc600795a04c394c4d0d4ce68747 (diff) | |
download | gstreamer-plugins-bad-ff3cce38b6ac54feb19bb93d36ed0337c7c15442.tar.gz |
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>
Diffstat (limited to 'ext/closedcaption/gstline21dec.c')
-rw-r--r-- | ext/closedcaption/gstline21dec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/closedcaption/gstline21dec.c b/ext/closedcaption/gstline21dec.c index 489bd0098..4e5b7702c 100644 --- a/ext/closedcaption/gstline21dec.c +++ b/ext/closedcaption/gstline21dec.c @@ -56,7 +56,7 @@ enum #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, @@ -216,6 +216,8 @@ gst_line_21_decoder_class_init (GstLine21DecoderClass * klass) 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 @@ -288,6 +290,12 @@ gst_line_21_decoder_set_info (GstVideoFilter * filter, /* 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; |