Browse Source

Support detecting and demuxing EIA-608 subtitles in mov.

The format is slightly proprietary.
DVDs use a format of
code byte (0x00, 0x01, 0xfe or 0xff), two data bytes
MOV uses instead
cdat/cdt2 atom, two data bytes
Auto-detecting and supporting both in one decoder is trivial,
so a single codec ID is used.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
tags/n0.11
Reimar Döffinger 13 years ago
parent
commit
5012c07336
4 changed files with 6 additions and 2 deletions
  1. +1
    -0
      libavcodec/avcodec.h
  2. +1
    -1
      libavcodec/version.h
  3. +1
    -0
      libavformat/isom.c
  4. +3
    -1
      libavformat/mov.c

+ 1
- 0
libavcodec/avcodec.h View File

@@ -414,6 +414,7 @@ enum CodecID {
CODEC_ID_DVB_TELETEXT,
CODEC_ID_SRT,
CODEC_ID_MICRODVD = MKBETAG('m','D','V','D'),
CODEC_ID_EIA_608 = MKBETAG('c','6','0','8'),

/* other specific kind of codecs (generally used for attachments) */
CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.


+ 1
- 1
libavcodec/version.h View File

@@ -21,7 +21,7 @@
#define AVCODEC_VERSION_H

#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 13
#define LIBAVCODEC_VERSION_MINOR 14
#define LIBAVCODEC_VERSION_MICRO 100

#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \


+ 1
- 0
libavformat/isom.c View File

@@ -287,6 +287,7 @@ const AVCodecTag ff_codec_movaudio_tags[] = {
const AVCodecTag ff_codec_movsubtitle_tags[] = {
{ CODEC_ID_MOV_TEXT, MKTAG('t', 'e', 'x', 't') },
{ CODEC_ID_MOV_TEXT, MKTAG('t', 'x', '3', 'g') },
{ CODEC_ID_EIA_608, MKTAG('c', '6', '0', '8') },
{ CODEC_ID_NONE, 0 },
};



+ 3
- 1
libavformat/mov.c View File

@@ -1222,7 +1222,9 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
id = ff_codec_get_id(ff_codec_bmp_tags, format);
if (id > 0)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
else if (st->codec->codec_type == AVMEDIA_TYPE_DATA){
else if (st->codec->codec_type == AVMEDIA_TYPE_DATA ||
(st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE &&
st->codec->codec_id == CODEC_ID_NONE)){
id = ff_codec_get_id(ff_codec_movsubtitle_tags, format);
if (id > 0)
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;


Loading…
Cancel
Save