From 1d2a311c1d79c6c983e6adba48a1a5b1a93f3af1 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 12 Mar 2018 10:53:05 +0100 Subject: [PATCH] playback: Add support for CEA 608/708 CC overlay elements https://bugzilla.gnome.org/show_bug.cgi?id=794901 --- gst/playback/gstparsebin.c | 3 ++- gst/playback/gstrawcaps.h | 4 +++- gst/playback/gstsubtitleoverlay.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gst/playback/gstparsebin.c b/gst/playback/gstparsebin.c index 0cfd5ca..4c5bfc1 100644 --- a/gst/playback/gstparsebin.c +++ b/gst/playback/gstparsebin.c @@ -3905,7 +3905,8 @@ guess_stream_type_from_caps (GstCaps * caps) if (g_str_has_prefix (name, "audio/")) return GST_STREAM_TYPE_AUDIO; if (g_str_has_prefix (name, "text/") || - g_str_has_prefix (name, "subpicture/")) + g_str_has_prefix (name, "subpicture/") || + g_str_has_prefix (name, "closedcaption/")) return GST_STREAM_TYPE_TEXT; return GST_STREAM_TYPE_UNKNOWN; diff --git a/gst/playback/gstrawcaps.h b/gst/playback/gstrawcaps.h index 2a827f5..1fc1d7d 100644 --- a/gst/playback/gstrawcaps.h +++ b/gst/playback/gstrawcaps.h @@ -32,7 +32,9 @@ G_BEGIN_DECLS "subpicture/x-dvd; " \ "subpicture/x-dvb; " \ "subpicture/x-xsub; " \ - "subpicture/x-pgs" + "subpicture/x-pgs; " \ + "closedcaption/x-cea-608; " \ + "closedcaption/x-cea-708" G_END_DECLS diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index 6134330..6ae64c7 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -232,7 +232,7 @@ _is_parser (GstElementFactory * factory) static const gchar *const _sub_pad_names[] = { "subpicture", "subpicture_sink", "text", "text_sink", - "subtitle_sink", "subtitle" + "subtitle_sink", "subtitle", "cc_sink" }; static gboolean -- 2.7.4