Commit 3a56ae50 authored by cehoyos's avatar cehoyos

Support demuxing teletext in DVB streams.

Original patch by Francesco Lavra, francescolavra interfree it 


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20414 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cca2177f
...@@ -331,6 +331,7 @@ enum CodecID { ...@@ -331,6 +331,7 @@ enum CodecID {
CODEC_ID_SSA, CODEC_ID_SSA,
CODEC_ID_MOV_TEXT, CODEC_ID_MOV_TEXT,
CODEC_ID_HDMV_PGS_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE,
CODEC_ID_DVB_TELETEXT,
/* other specific kind of codecs (generally used for attachments) */ /* other specific kind of codecs (generally used for attachments) */
CODEC_ID_TTF= 0x18000, CODEC_ID_TTF= 0x18000,
......
...@@ -535,6 +535,7 @@ static const StreamType DESC_types[] = { ...@@ -535,6 +535,7 @@ static const StreamType DESC_types[] = {
{ 0x6a, CODEC_TYPE_AUDIO, CODEC_ID_AC3 }, /* AC-3 descriptor */ { 0x6a, CODEC_TYPE_AUDIO, CODEC_ID_AC3 }, /* AC-3 descriptor */
{ 0x7a, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3 descriptor */ { 0x7a, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
{ 0x7b, CODEC_TYPE_AUDIO, CODEC_ID_DTS }, { 0x7b, CODEC_TYPE_AUDIO, CODEC_ID_DTS },
{ 0x56, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },
{ 0x59, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */ { 0x59, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
{ 0 }, { 0 },
}; };
...@@ -729,6 +730,13 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len ...@@ -729,6 +730,13 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
mpegts_find_stream_type(st, desc_tag, DESC_types); mpegts_find_stream_type(st, desc_tag, DESC_types);
switch(desc_tag) { switch(desc_tag) {
case 0x56: /* DVB teletext descriptor */
language[0] = get8(&p, desc_end);
language[1] = get8(&p, desc_end);
language[2] = get8(&p, desc_end);
language[3] = 0;
av_metadata_set(&st->metadata, "language", language);
break;
case 0x59: /* subtitling descriptor */ case 0x59: /* subtitling descriptor */
language[0] = get8(&p, desc_end); language[0] = get8(&p, desc_end);
language[1] = get8(&p, desc_end); language[1] = get8(&p, desc_end);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment