[FFmpeg-devel] [PATCH 1/2] lavc: add CEA-708 codec id.

Nicolas George george at nsup.org
Mon Mar 10 11:56:46 CET 2014


Signed-off-by: Nicolas George <george at nsup.org>
---
 libavcodec/avcodec.h    | 1 +
 libavcodec/codec_desc.c | 6 ++++++
 2 files changed, 7 insertions(+)


I am not entirely sure about that, all these industrials standards are a
maze of twisted documents all alike. IIUC, the CEA-708 packets can
themselves contain either EIA-608 data or something else. The sample Anshul
provided shows examples of the former, I do not know a sample with the
latter.


diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 5df717c..3e0bd38 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -493,6 +493,7 @@ enum AVCodecID {
     AV_CODEC_ID_SRT,
     AV_CODEC_ID_MICRODVD   = MKBETAG('m','D','V','D'),
     AV_CODEC_ID_EIA_608    = MKBETAG('c','6','0','8'),
+    AV_CODEC_ID_CEA_708    = MKBETAG('c','7','0','8'),
     AV_CODEC_ID_JACOSUB    = MKBETAG('J','S','U','B'),
     AV_CODEC_ID_SAMI       = MKBETAG('S','A','M','I'),
     AV_CODEC_ID_REALTEXT   = MKBETAG('R','T','X','T'),
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index a217d35..126a710 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -2541,6 +2541,12 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .long_name = NULL_IF_CONFIG_SMALL("EIA-608 closed captions"),
     },
     {
+        .id        = AV_CODEC_ID_CEA_708,
+        .type      = AVMEDIA_TYPE_SUBTITLE,
+        .name      = "cea_708",
+        .long_name = NULL_IF_CONFIG_SMALL("CEA-708 closed captions"),
+    },
+    {
         .id        = AV_CODEC_ID_JACOSUB,
         .type      = AVMEDIA_TYPE_SUBTITLE,
         .name      = "jacosub",
-- 
1.9.0



More information about the ffmpeg-devel mailing list