From patchwork Sat Sep 17 17:08:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Theisen X-Patchwork-Id: 37986 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp304653pzh; Sat, 17 Sep 2022 10:09:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM63sGjrwLety6eB/IVIyRao3Y/qzckD5VA8wkBLWorU6g6JxbJVxh0HYO0M79chRQmhpkg0 X-Received: by 2002:a05:6402:1910:b0:450:fb10:fddf with SMTP id e16-20020a056402191000b00450fb10fddfmr8448677edz.321.1663434551800; Sat, 17 Sep 2022 10:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663434551; cv=none; d=google.com; s=arc-20160816; b=jdrkULMFH9i8x3GcvrC7SfspEEtMhl5FV7sTvurRUNAfVR/LMcGI1KOq8svP/HAnuV 3SnY3miw7s2gNo3hn82y4ZiWTwp8ecOPbJi+jlm4rnFaIDFW1iouRKo8YWFHICMQgVJu PV/822Kny1waKyOJvSxg9TmnCD7jKBTOdf6vvY3ahLPjVw4qxY3TgUW6vCij0gtxafFg SpbA00Ue6kdWX4nZWY8mQAkCEaOmWBqPQD6jE1Ef3u5IBL8yoBBLJdAZngTSCTGKWUjR Wal9zkP0gRse5dukBEt6EZ4Nh3ms7b9L7bN1KOt4xM1UYIUQ3y0Gan35qCRw8py/oG/Q nWJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=st3Y5TgmLs3/Uh1i1zihaDzv/zW64B/uHhWPuh/JXyw=; b=cnz4gwEHaaxEp1g0q0mokzBhbIAvacJml+iDbWm+CV6Br+LAZYxJ0uDKM7XTTTzO/i e7RKa6tFSvwrExQ2WQyBGAbOm//R47Oei9iQYdhrUzb3SfW+iyQktlD2xG/r3AXiZBL5 /YlvqMiytgy+MgRJbiGccy1pT4EWvGSc/8uIhT6xhL1ukGJg31r82CGoMwsfmGtosMqJ I89xim7o8+8ZSdmuneUaHEByysaHC5JzCYtQesyGXGESdZMK4+0Yd0KS2R8ibKoqUaSQ +Ljhergflh+OdV66jqORqMQ9neA6bnOGZteD6H++qLUINwBH6nPrrKfZNy3oJt9yNqXf cDJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=VRd5tWr3; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gb9-20020a170907960900b00779f8e7ec5bsi11951393ejc.42.2022.09.17.10.09.10; Sat, 17 Sep 2022 10:09:11 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=VRd5tWr3; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5619668BB4A; Sat, 17 Sep 2022 20:09:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9D7B768BA44 for ; Sat, 17 Sep 2022 20:09:00 +0300 (EEST) Received: by mail-qt1-f169.google.com with SMTP id h21so18090861qta.3 for ; Sat, 17 Sep 2022 10:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=5HcHBX7u7se49x4G+Y+4JRja2kmOP5uMhVW5HxscSgw=; b=VRd5tWr3dR3Z8rC2Fne6Iqu23pjz8Ykb6cf0y5ri1ktPYNS+CQLqNHG+s2ZJR7OUCF FbNQqoDvFiZoNorMXz+Gw1eGZcOyT/Eon4APs48bGxvMTGG1o+5veLHGgcujEAPPk1l7 qOcFeyTeDN0F/67AUR1mhow7CWnrkrwcwhwMnWqYmNSM/NPxLW1VbcbjRZBDBjyn/sog mlCfrhQwfsYKd/xADJZvWa++3CBBWuU84Ts1Ij9g6Y7lSDIp3sF22lHMYjussz0ox/rQ 7Om9DfwTmrnVjWW34GDg4bCbbkZaRLWKMw858+FRfiAmNXab5ZRDbxA+wClOINrvLXu6 SnhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=5HcHBX7u7se49x4G+Y+4JRja2kmOP5uMhVW5HxscSgw=; b=mkVt329ATazKwZHXwb9c1xFCwuOWmACON8e3TPMUursWSvunudxwFQtYonOmUfInWL sgQW1VH5RzLKMo2hFpMJNa0FCWCTr1NTiunxiK+DamMi/N5rp/jJLCsvOFxPf4hXWt1I y52DKrOjAgqZlJboRYedzAuIgwXZqkt6G8N9Sn4I38B6bXqViDj5abPxRBzaLtp0/hgO np2O74FtpEZwsdpsYD5yM+bkd+FPzNeH9U2POQYn8uAnA8Uv2JHbEKf4bCXP7HVnBOaM e261QMYK5SVES35RjJy4BJyQ9PHSw6m4V3yXFG5cYodLp7vZl2eOCW/nJdbJVIIj1SEk 82PA== X-Gm-Message-State: ACrzQf3YbEFy9KtS3E4Swbht6auTQfIx+MIwWDWzOizp1Cpc6cML4ORr 7cvV4cP2byB20xJZMWn7Lp38NBYzxmw= X-Received: by 2002:ac8:7f92:0:b0:344:8cd8:59a1 with SMTP id z18-20020ac87f92000000b003448cd859a1mr9196802qtj.384.1663434537457; Sat, 17 Sep 2022 10:08:57 -0700 (PDT) Received: from scott-desktop.. (pool-71-114-80-52.washdc.fios.verizon.net. [71.114.80.52]) by smtp.gmail.com with ESMTPSA id k13-20020a05620a414d00b006c479acd82fsm9628050qko.7.2022.09.17.10.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Sep 2022 10:08:56 -0700 (PDT) From: Scott Theisen To: ffmpeg-devel@ffmpeg.org Date: Sat, 17 Sep 2022 13:08:43 -0400 Message-Id: <20220917170843.308894-1-scott.the.elm@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] mpegts: identify and demux DSMCC-B/MHEG streams X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Scott Theisen Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: md6MODKOWptC These changes are from MythTV. --- The `AV_CODEC_ID`s are probably in the wrong place since these are data codecs, but that is where they are In MythTV. There was also a related change to libavformat/demux.c's avformat_find_stream_info() trying to optimize it for MHEG streams, but it is unnecessary and was causing FATE to fail. libavcodec/codec_desc.c | 12 +++ libavcodec/codec_id.h | 6 ++ libavformat/avformat.h | 5 + libavformat/mpegts.c | 199 +++++++++++++++++++++++++++++++++++++++- libavformat/mpegts.h | 17 ++++ 5 files changed, 237 insertions(+), 2 deletions(-) diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 648c518b3c..0e54087863 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -3488,6 +3488,18 @@ static const AVCodecDescriptor codec_descriptors[] = { .props = AV_CODEC_PROP_TEXT_SUB, .profiles = NULL_IF_CONFIG_SMALL(ff_arib_caption_profiles), }, + { + .id = AV_CODEC_ID_DVB_VBI, + .type = AVMEDIA_TYPE_DATA, + .name = "dvb_vbi", + .long_name = NULL_IF_CONFIG_SMALL("dvb teletext"), + }, + { + .id = AV_CODEC_ID_DSMCC_B, + .type = AVMEDIA_TYPE_DATA, + .name = "dsmcc_b", + .long_name = NULL_IF_CONFIG_SMALL("DSMCC B"), + }, /* other kind of codecs and pseudo-codecs */ { diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index bc8226ff07..7e2198a800 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -559,6 +559,12 @@ enum AVCodecID { AV_CODEC_ID_TTML, AV_CODEC_ID_ARIB_CAPTION, + /* teletext codecs */ + AV_CODEC_ID_DVB_VBI, + + /* DSMCC codec */ + AV_CODEC_ID_DSMCC_B, + /* other specific kind of codecs (generally used for attachments) */ AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs. AV_CODEC_ID_TTF = 0x18000, diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 9d46875cce..664a1afa61 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1117,6 +1117,11 @@ typedef struct AVStream { * */ int pts_wrap_bits; + + /* MHEG support */ + int component_tag; ///< Component tag given in PMT + int carousel_id; + int data_id; } AVStream; struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 8a3436f2be..be8edd9e62 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -46,6 +46,15 @@ #include #endif +typedef struct SectionContext { + int pid; + int stream_type; + int new_packet; + MpegTSContext *ts; + AVFormatContext *stream; + AVStream *st; +} SectionContext; + /* maximum size in which we look for synchronization if * synchronization is lost */ #define MAX_RESYNC_SIZE 65536 @@ -412,6 +421,8 @@ static int discard_pid(MpegTSContext *ts, unsigned int pid) return !used && discarded; } +static void mpegts_push_section(MpegTSFilter *filter, const uint8_t *section, int section_len); + /** * Assemble PES packets out of TS packets, and then call the "section_cb" * function when they are complete. @@ -438,6 +449,11 @@ static void write_section_data(MpegTSContext *ts, MpegTSFilter *tss1, tss->section_index += len; } + if (tss->section_cb == mpegts_push_section) { + SectionContext *sect = tss->opaque; + sect->new_packet = 1; + } + offset = 0; cur_section_buf = tss->section_buf; while (cur_section_buf - tss->section_buf < MAX_SECTION_SIZE && cur_section_buf[0] != 0xff) { @@ -798,6 +814,7 @@ static const StreamType ISO_types[] = { { 0x02, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG2VIDEO }, { 0x03, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3 }, { 0x04, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3 }, + { 0x0b, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DSMCC_B }, /* DVB_CAROUSEL_ID */ { 0x0f, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AAC }, { 0x10, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG4 }, /* Makito encoder sets stream type 0x11 for AAC, @@ -882,11 +899,20 @@ static const StreamType DESC_types[] = { { 0x6a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 }, /* AC-3 descriptor */ { 0x7a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 }, /* E-AC-3 descriptor */ { 0x7b, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, + { 0x13, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DSMCC_B }, /* DVB_CAROUSEL_ID */ + { 0x45, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DVB_VBI }, /* DVB_VBI_DATA_ID */ + { 0x46, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DVB_VBI }, /* DVB_VBI_TELETEXT_ID */ //FixMe type subtilte { 0x56, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_TELETEXT }, { 0x59, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */ { 0 }, }; +/* component tags */ +static const StreamType COMPONENT_TAG_types[] = { + { 0x0a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3 }, + { 0x52, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG2VIDEO }, +}; + static void mpegts_find_stream_type(AVStream *st, uint32_t stream_type, const StreamType *types) @@ -1979,7 +2005,13 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type memcpy(extradata, *pp, 4); /* composition_page_id and ancillary_page_id */ extradata += 5; - *pp += 4; + { + int comp_page = get16(pp, desc_end); + int anc_page = get16(pp, desc_end); + int sub_id = (anc_page << 16) | comp_page; + if (sub_id && (st->codecpar->codec_id == AV_CODEC_ID_DVB_SUBTITLE)) + st->carousel_id = sub_id; + } } language[i * 4 - 1] = 0; @@ -2023,8 +2055,45 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type sti->request_probe = 50; } break; + case DVB_BROADCAST_ID: + st->data_id = get16(pp, desc_end); + break; + case DVB_CAROUSEL_ID: + { + int carId = 0; + carId = get8(pp, desc_end); + carId = (carId << 8) | get8(pp, desc_end); + carId = (carId << 8) | get8(pp, desc_end); + carId = (carId << 8) | get8(pp, desc_end); + st->carousel_id = carId; + } + break; case 0x52: /* stream identifier descriptor */ sti->stream_identifier = 1 + get8(pp, desc_end); + st->component_tag = sti->stream_identifier - 1; + // DVB_DATA_STREAM: + /* Audio and video are sometimes encoded in private streams labelled with + * a component tag. */ +#if 0 + if (st->codecpar->codec_id == AV_CODEC_ID_NONE && + desc_count == 1 && + stream_type == STREAM_TYPE_PRIVATE_DATA) + mpegts_find_stream_type(st, st->component_tag, + COMPONENT_TAG_types); +#endif + break; + case DVB_VBI_TELETEXT_ID: + language[0] = get8(pp, desc_end); + language[1] = get8(pp, desc_end); + language[2] = get8(pp, desc_end); + language[3] = 0; + + /* dvbci->txt_type = */ i = (get8(pp, desc_end)) >> 3; // not exported, defeat compiler -Wunused-value + if (language[0]) + av_dict_set(&st->metadata, "language", language, 0); + break; + case DVB_VBI_DATA_ID: + // dvbci->vbi_data = 1; //not parsing the data service descriptors break; case METADATA_DESCRIPTOR: if (get16(pp, desc_end) == 0xFFFF) @@ -2307,6 +2376,34 @@ static int is_pes_stream(int stream_type, uint32_t prog_reg_desc) (stream_type == 0x86 && prog_reg_desc == AV_RL32("CUEI")) ); } +static SectionContext *add_section_stream(MpegTSContext *ts, int pid, int stream_type) +{ + MpegTSFilter *tss = ts->pids[pid]; + SectionContext *sect = 0; + if (tss) { /* filter already exists */ + /* kill it, and start a new stream */ + mpegts_close_filter(ts, tss); + } + + /* create a SECTION context */ + if (!(sect=av_mallocz(sizeof(SectionContext)))) { + av_log(ts, AV_LOG_ERROR, "Error: av_mallocz() failed in add_section_stream"); + return 0; + } + sect->ts = ts; + sect->stream = ts->stream; + sect->pid = pid; + sect->stream_type = stream_type; + tss = mpegts_open_section_filter(ts, pid, mpegts_push_section, sect, 1); + if (!tss) { + av_free(sect); + av_log(ts, AV_LOG_ERROR, "Error: unable to open mpegts Section filter in add_section_stream"); + return 0; + } + + return sect; +} + static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len) { MpegTSContext *ts = filter->u.section_filter.opaque; @@ -2425,7 +2522,56 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len stream_identifier = parse_stream_identifier_desc(p, p_end) + 1; /* now create stream */ - if (ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES) { + if (stream_type == STREAM_TYPE_DSMCC_B) + { + SectionContext *sect = NULL; + int idx = -1; + + if (ts->pids[pid] && ts->pids[pid]->type == MPEGTS_SECTION && + ts->pids[pid]->u.section_filter.section_cb == mpegts_push_section) { + // u.section_filter.opaque may be the MpegTSContext, so test the section_cb + sect = (SectionContext*) ts->pids[pid]->u.section_filter.opaque; + } + if (!sect) { + sect = add_section_stream(ts, pid, stream_type); + } + if (!sect) + { + av_log(ts, AV_LOG_ERROR, "mpegts_add_stream: " + "error creating Section context for pid 0x%x with type %i\n", + pid, stream_type); + goto out; + } + + idx = ff_find_stream_index(ts->stream, pid); + if (idx >= 0) { + st = ts->stream->streams[idx]; + av_log(ts, AV_LOG_DEBUG, "mpegts_add_stream: " + "reusing stream #%d, has id 0x%x and codec %s, type %s at 0x%p\n", + st->index, st->id, avcodec_get_name(st->codecpar->codec_id), + av_get_media_type_string(st->codecpar->codec_type), st); + } + if (!st) { + st = avformat_new_stream(sect->stream, NULL); + } + if (!st) { + goto out; + } + sect->st = st; + sect->st->id = sect->pid; + + avpriv_set_pts_info(sect->st, 33, 1, 90000); + + sect->st->codecpar->codec_type = AVMEDIA_TYPE_DATA; + sect->st->codecpar->codec_id = AV_CODEC_ID_DSMCC_B; + sect->st->priv_data = sect; + ffstream(sect->st)->need_parsing = AVSTREAM_PARSE_NONE; + + av_log(ts, AV_LOG_DEBUG, "mpegts_add_stream: " + "stream #%d, has id 0x%x and codec %s, type %s at 0x%p\n", + st->index, st->id, avcodec_get_name(st->codecpar->codec_id), + av_get_media_type_string(st->codecpar->codec_type), st); + } else if (ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES) { pes = ts->pids[pid]->u.pes_filter.opaque; if (ts->merge_pmt_versions && !pes->st) { st = find_matching_stream(ts, pid, h->id, stream_identifier, i, &old_program); @@ -2527,6 +2673,55 @@ out: av_free(mp4_descr[i].dec_config_descr); } +/* mpegts_push_section: return one or more tables. The tables may not completely fill + the packet and there may be stuffing bytes at the end. + This is complicated because a single TS packet may result in several tables being + produced. We may have a "start" bit indicating, in effect, the end of a table but + the rest of the TS packet after the start may be filled with one or more small tables. +*/ +static void mpegts_push_section(MpegTSFilter *filter, const uint8_t *section, int section_len) +{ + SectionContext *sect = filter->u.section_filter.opaque; + MpegTSContext *ts = sect->ts; + SectionHeader header; + AVPacket *pkt = ts->pkt; + const uint8_t *p = section, *p_end = section + section_len - 4; + + if (parse_section_header(&header, &p, p_end) < 0) + { + av_log(ts, AV_LOG_DEBUG, "Unable to parse header\n"); + return; + } + + if (sect->new_packet && pkt && sect->st && pkt->size == -1) { + int pktLen = section_len + 184; /* Add enough for a complete TS payload. */ + sect->new_packet = 0; + av_packet_unref(pkt); + if (av_new_packet(pkt, pktLen) == 0) { + memcpy(pkt->data, section, section_len); + memset(pkt->data+section_len, 0xff, pktLen-section_len); + pkt->stream_index = sect->st->index; + ts->stop_parse = 1; + } + } else if (pkt->data) { /* We've already added at least one table. */ + uint8_t *data = pkt->data; + int space = pkt->size; + int table_size = 0; + while (space > 3 + table_size) { + table_size = (((data[1] & 0xf) << 8) | data[2]) + 3; + if (table_size < space) { + space -= table_size; + data += table_size; + } /* Otherwise we've got filler. */ + } + if (space < section_len) { + av_log(ts, AV_LOG_DEBUG, "Insufficient space for additional packet\n"); + return; + } + memcpy(data, section, section_len); + } +} + static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len) { MpegTSContext *ts = filter->u.section_filter.opaque; diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h index a48f14e768..6f57af7786 100644 --- a/libavformat/mpegts.h +++ b/libavformat/mpegts.h @@ -122,6 +122,7 @@ #define STREAM_TYPE_AUDIO_MPEG2 0x04 #define STREAM_TYPE_PRIVATE_SECTION 0x05 #define STREAM_TYPE_PRIVATE_DATA 0x06 +#define STREAM_TYPE_DSMCC_B 0x0b #define STREAM_TYPE_AUDIO_AAC 0x0f #define STREAM_TYPE_AUDIO_AAC_LATM 0x11 #define STREAM_TYPE_VIDEO_MPEG4 0x10 @@ -139,6 +140,22 @@ #define STREAM_TYPE_AUDIO_TRUEHD 0x83 #define STREAM_TYPE_AUDIO_EAC3 0x87 +#define STREAM_TYPE_AUDIO_MISC_DTS 0x8a +#define STREAM_TYPE_AUDIO_HDMV_AC3_PLUS 0x84 +#define STREAM_TYPE_AUDIO_HDMV_DTS_HD 0x85 +#define STREAM_TYPE_AUDIO_HDMV_DTS_HD_MASTER 0x86 + +#define STREAM_TYPE_SUBTITLE_DVB 0x100 +#define STREAM_TYPE_VBI_DVB 0x101 + +#define DVB_CAROUSEL_ID 0x13 +#define DVB_VBI_DATA_ID 0x45 +#define DVB_VBI_TELETEXT_ID 0x46 +#define DVB_TELETEXT_ID 0x56 +#define DVB_SUBT_DESCID 0x59 +#define DVB_BROADCAST_ID 0x66 +#define DVB_DATA_STREAM 0x52 + /* ISO/IEC 13818-1 Table 2-22 */ #define STREAM_ID_PROGRAM_STREAM_MAP 0xbc #define STREAM_ID_PRIVATE_STREAM_1 0xbd