From 06872f2bdaa14972330c298902f0cce27f3a3900 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 22 Aug 2004 18:20:02 +0000 Subject: [PATCH] Merged 2033 --- ChangeLog | 4 ++++ src/common/tagparser.h | 1 + src/common/tagparser_end.cpp | 2 ++ src/common/tagparser_start.cpp | 4 ++++ src/common/tagwriter.cpp | 6 ++++++ src/mkvinfo.cpp | 4 ++++ 6 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index b917b71ab..15325d2b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-08-22 Moritz Bunkus + * mkvmerge, mkvinfo, mkvextract: new feature: Added support for + the 'TargetType' tag element (which I meant to add before the + 0.9.5 release...). + * mkvmerge: bug fix: The MP3 handling was broken on weird and rare occasions when reading MP3 from a Matroska file. diff --git a/src/common/tagparser.h b/src/common/tagparser.h index 7237ea34c..1104ca8ac 100644 --- a/src/common/tagparser.h +++ b/src/common/tagparser.h @@ -117,6 +117,7 @@ using namespace libmatroska; #define E_TagLanguage 85 #define E_DefaultLanguage 86 #define E_EditionUID 87 +#define E_TargetType 88 // MAX: 81 diff --git a/src/common/tagparser_end.cpp b/src/common/tagparser_end.cpp index 7117b5c41..a5161e008 100644 --- a/src/common/tagparser_end.cpp +++ b/src/common/tagparser_end.cpp @@ -369,6 +369,8 @@ end_level3(parser_data_t *pdata, el_get_uint(pdata, pdata->chapter_uid); else if (!strcmp(name, "EditionUID")) el_get_uint(pdata, pdata->edition_uid); + else if (!strcmp(name, "TargetType")) + el_get_string(pdata, &GetChild(*pdata->targets)); } else if (parent == E_General) { if (!strcmp(name, "Subject")) diff --git a/src/common/tagparser_start.cpp b/src/common/tagparser_start.cpp index 75c7be72c..6b4634828 100644 --- a/src/common/tagparser_start.cpp +++ b/src/common/tagparser_start.cpp @@ -248,6 +248,10 @@ start_level3(parser_data_t *pdata, *pdata->edition_uid); pdata->parents->push_back(E_EditionUID); + } else if (!strcmp(name, "TargetType")) { + check_instances(pdata->targets, KaxTagTargetType); + pdata->parents->push_back(E_TargetType); + } else tperror_nochild(); diff --git a/src/common/tagwriter.cpp b/src/common/tagwriter.cpp index f09dfe1c8..10a65e402 100644 --- a/src/common/tagwriter.cpp +++ b/src/common/tagwriter.cpp @@ -370,6 +370,12 @@ handle_level3(EbmlElement *e) { else if (is_id(e, KaxTagChapterUID)) pr_ui("ChapterUID"); + else if (is_id(e, KaxTagEditionUID)) + pr_ui("EditionUID"); + + else if (is_id(e, KaxTagTargetType)) + pr_s("TargetType"); + else if (is_id(e, KaxTagSubject)) pr_us("Subject"); diff --git a/src/mkvinfo.cpp b/src/mkvinfo.cpp index 7e97a4a17..13c336f8d 100644 --- a/src/mkvinfo.cpp +++ b/src/mkvinfo.cpp @@ -1880,6 +1880,10 @@ def_handle(tag_targets) { KaxTagEditionUID &editionuid = *static_cast(l4); show_element(l4, 4, "Edition UID: %llu", uint64(editionuid)); + } else if (is_id(l4, KaxTagTargetType)) { + KaxTagTargetType &ttype = *static_cast(l4); + show_element(l4, 4, "Target type: %s", string(ttype).c_str()); + } else if (!is_global(es, l4, 4) && !parse_multicomment(es, l4, 4)) show_unknown_element(l4, 4);