diff --git a/ChangeLog b/ChangeLog index d9a592d8d..6d99d9c9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2003-08-10 Moritz Bunkus + * mkvextract: Support for MultiComment tags. + * mkvmerge: Fixed support for reading MultiComment tags from XML tag files. diff --git a/src/tagwriter.cpp b/src/tagwriter.cpp index ca33a24ad..53032da09 100644 --- a/src/tagwriter.cpp +++ b/src/tagwriter.cpp @@ -146,8 +146,22 @@ static void print_unknown(int level, EbmlElement *e) { #define pr_unk() print_unknown(level, e) +static void handle_multicomments(EbmlElement *e, int level) { + if (is_id(KaxTagMultiCommentName)) + pr_s("Name"); + + else if (is_id(KaxTagMultiCommentComments)) + pr_us("Comments"); + + else if (is_id(KaxTagMultiCommentLanguage)) + pr_s("Language"); + + else + pr_unk(); +} + static void handle_level5(EbmlElement *e) { - int level = 5; + int i, level = 5; if (is_id(KaxTagMultiPriceCurrency)) pr_s("Currency"); @@ -158,6 +172,13 @@ static void handle_level5(EbmlElement *e) { else if (is_id(KaxTagMultiPricePriceDate)) pr_d("PriceDate"); + else if (is_id(KaxTagMultiComment)) { + mxprint(o, " \n"); + for (i = 0; i < ((EbmlMaster *)e)->ListSize(); i++) + handle_multicomments((*(EbmlMaster *)e)[i], 6); + mxprint(o, " \n"); + } + else pr_unk(); } @@ -252,6 +273,13 @@ static void handle_level4(EbmlElement *e) { else if (is_id(KaxTagMultiTitleLanguage)) pr_s("Language"); + else if (is_id(KaxTagMultiComment)) { + mxprint(o, " \n"); + for (i = 0; i < ((EbmlMaster *)e)->ListSize(); i++) + handle_multicomments((*(EbmlMaster *)e)[i], 5); + mxprint(o, " \n"); + } + else pr_unk(); } @@ -409,6 +437,12 @@ static void handle_level3(EbmlElement *e) { handle_level4((*(EbmlMaster *)e)[i]); mxprint(o, " \n"); + } else if (is_id(KaxTagMultiComment)) { + mxprint(o, " \n"); + for (i = 0; i < ((EbmlMaster *)e)->ListSize(); i++) + handle_multicomments((*(EbmlMaster *)e)[i], 4); + mxprint(o, " \n"); + } else pr_unk(); } @@ -482,6 +516,12 @@ static void handle_level2(EbmlElement *e) { handle_level3((*(EbmlMaster *)e)[i]); mxprint(o, " \n"); + } else if (is_id(KaxTagMultiComment)) { + mxprint(o, " \n"); + for (i = 0; i < ((EbmlMaster *)e)->ListSize(); i++) + handle_multicomments((*(EbmlMaster *)e)[i], 3); + mxprint(o, " \n"); + } else pr_unk(); }