ietf-wg-cellar / ebml-specification

the specification for the EBML format
Creative Commons Attribution 4.0 International
70 stars 24 forks source link

Why is the EBML-Dummy element not part of the Ebml.xml? #401

Closed hubblec4 closed 3 years ago

hubblec4 commented 3 years ago

A dummy element can be found anywhere like the global elements (Void, CRC-32).

mbunkus commented 3 years ago

There is no "dummy element". There is the C++ class EbmlDummy in libEBML, but it is only a placeholder for element types that isn't known to the library using libEBML (meaning libMatroska).

Or to put it differently: let's assume a file is using the FlagHearingImpaired element, and an application using an older libMatroska version that doesn't know about the element yet is reading the file. In that case libMatroska will construct an instance of the EbmlDummy class when it encounters that FlagHearingImpaired element. This is so that the calling application knows that there is an element there that the library doesn't support (yet).

hubblec4 commented 3 years ago

Yes I know this EBMLDummy class is only a placeholder. But what is when there is no EBMLDummy class declared, because it is not part of the EBML specs?

Can a reader read an EBML document with elements which are unknown to the reader, without issues?

mbunkus commented 3 years ago

A reader can always skip elements it doesn't know as it can always read the ID & size fields. Whether or not understanding of that element is required is usually signalled via the DocTypeReadVersion EBML Header element.

hubblec4 commented 3 years ago

OK. I think I understand now. The DummyElement is a bonus feature in the c++ lib, so that for exapmle MKVToolNix can show this unknown elements