[Matroska-devel] Element order in EBML/libebml
suiryc at yahoo.com
Fri Oct 17 17:43:14 CEST 2003
--- Steve Lhomme <steve.lhomme at free.fr> wrote:
> But EBML, in general, does induce an order for
> elements. You could swap
> some and the meaning of the file has to be the same.
For some elements that is indeed possible (e.g. I
don't care if the reference of a frame is written
before or after the frame by itself, both ordering is
handled), but order matters at some point.
> For the rest, there is no case where the order of
> elements matters. Even
> for blocks not in coding+display order. I think
> DirectShow is capable of
> being feed with timecodes in no particular order (as
> long as it's not in
> the past of what has been rendered)...
And we can even send audio data to a video stream in
DirectShow. No really, order matters. If you send data
in another order than what needs a codec don't expect
to playback properly the file.
> But that's a
> problem for hardware
> players that can't reorder frames easily (BTW, it
> has always been said
> that a Cluster should be held full in memory)...
So in this case libebml/EBML doesn't guarantee the
order of the data, and thus nobody can tell for sure
that data will be send in correct order to the codec.
So actually when we write a Matroska file we don't
know if the codec will be able to decode the data we
would send (in an unpredictible order), and if the
file will be playable.
> For elements that DO need an order, it has to be
> written somwehere. So
> far, for Blocks and now for Encoding, it is an EBML
> element. (timecode,
> coding order)
But here you assume you know the content of the file
(what kind of codec was used, what data ordering this
codec needs). Anyway since the order can't be
guaranted (since the order of elements can be changed
without the meaning of the file being altered) you
can't even assume that the order in which elements
will be read back is correct (and since you don't know
how to reorder the data you can't playback the file) !?!?
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
More information about the Matroska-devel