diff --git a/ChangeLog b/ChangeLog index 20fcb90ba..83f0858ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2003-07-14 Moritz Bunkus + + * mkvinfo: Support for the elements dealing with attachments + (KaxAttachments, KaxAttached, KaxFileDescription, KaxFileName, + KaxMimeType, KaxFileData). + +2003-07-13 Moritz Bunkus + + * mkvmerge: Changed the RealVideo packaging method: Subpackets are + assembled into complete packets so the demuxer does not have to do + that anymore. + + * mkvmerge: DisplayWidth and DisplayHeight, which form the display + aspect ratio, are now always written to ease changing them later + without having to completely remux the file. + 2003-07-08 Moritz Bunkus * mkvmerge: Fixed some infinite-reading-from-a-file bug that diff --git a/src/mkvinfo.cpp b/src/mkvinfo.cpp index 265d707ef..df939ffa4 100644 --- a/src/mkvinfo.cpp +++ b/src/mkvinfo.cpp @@ -49,6 +49,7 @@ extern "C" { #include #include +#include #include #include #include @@ -1342,6 +1343,103 @@ bool process_file(const char *file_name) { } // while (l2 != NULL) + // Weee! Attachments! + } else if (EbmlId(*l1) == KaxAttachements::ClassInfos.GlobalId) { + show_element(l1, 1, "Attachements"); + + upper_lvl_el = 0; + l2 = es->FindNextElement(l1->Generic().Context, upper_lvl_el, + 0xFFFFFFFFL, true); + while (l2 != NULL) { + if (upper_lvl_el > 0) + break; + if ((upper_lvl_el < 0) && !fits_parent(l2, l1)) + break; + + if (EbmlId(*l2) == KaxAttached::ClassInfos.GlobalId) { + show_element(l2, 2, "Attached"); + + upper_lvl_el = 0; + l3 = es->FindNextElement(l2->Generic().Context, upper_lvl_el, + 0xFFFFFFFFL, true); + while (l3 != NULL) { + if (upper_lvl_el > 0) + break; + if ((upper_lvl_el < 0) && !fits_parent(l3, l2)) + break; + + if (EbmlId(*l3) == KaxFileDescription::ClassInfos.GlobalId) { + KaxFileDescription &f_desc = + *static_cast(l3); + f_desc.ReadData(es->I_O()); + str = UTFstring_to_cstr(UTFstring(f_desc)); + show_element(l3, 3, "File description: %s", str); + safefree(str); + + } else if (EbmlId(*l3) == KaxFileName::ClassInfos.GlobalId) { + KaxFileName &f_name = + *static_cast(l3); + f_name.ReadData(es->I_O()); + str = UTFstring_to_cstr(UTFstring(f_name)); + show_element(l3, 3, "File name: %s", str); + safefree(str); + + } else if (EbmlId(*l3) == KaxMimeType::ClassInfos.GlobalId) { + KaxMimeType &mime_type = + *static_cast(l3); + mime_type.ReadData(es->I_O()); + show_element(l3, 3, "Mime type: %s", + string(mime_type).c_str()); + + } else if (EbmlId(*l3) == KaxFileData::ClassInfos.GlobalId) { + KaxFileData &f_data = + *static_cast(l3); + f_data.ReadData(es->I_O()); + show_element(l3, 3, "File data, size: %u", f_data.GetSize()); + + } else if (!is_ebmlvoid(l3, 3, upper_lvl_el)) + show_unknown_element(l3, 3); + + if (upper_lvl_el > 0) { // we're coming from l4 + assert(1 == 0); + + } else if (upper_lvl_el == 0) { + l3->SkipData(*es, l3->Generic().Context); + delete l3; + upper_lvl_el = 0; + l3 = es->FindNextElement(l2->Generic().Context, upper_lvl_el, + 0xFFFFFFFFL, true); + } else { + delete l3; + l3 = l4; + } + + } // while (l3 != NULL) + + } else if (!is_ebmlvoid(l2, 2, upper_lvl_el)) + show_unknown_element(l2, 2); + + if (upper_lvl_el > 0) { // we're coming from l3 + upper_lvl_el--; + delete l2; + l2 = l3; + if (upper_lvl_el > 0) + break; + + } else if (upper_lvl_el == 0) { + l2->SkipData(*es, + l2->Generic().Context); + delete l2; + upper_lvl_el = 0; + l2 = es->FindNextElement(l1->Generic().Context, upper_lvl_el, + 0xFFFFFFFFL, true); + } else { + delete l2; + l2 = l3; + } + + } // while (l2 != NULL) + // Let's handle some TAGS. } else if (EbmlId(*l1) == KaxTags::ClassInfos.GlobalId) { show_element(l1, 1, "Tags");