[Matroska-devel] Element order in EBML/libebml
rbultje at ronald.bitfreak.net
Mon Oct 20 17:07:43 CEST 2003
On Mon, 2003-10-20 at 16:56, Cyrius wrote:
> If order doesn't matter that means you would have to
> load the file in memory and sort the elements to get
> back the correct order (that's just to point out some
> nonsense behind "order doesn't matter")
That's what DirectShow and GStreamer do, right? At least GStreamer does
so in a way. We read blocks from files, place them in a queue and let
the decoder decode it when it feels like it. Then, the outputs play this
decoded data back (possible from another queue). There can be any number
of queues in the pipeline and any number of buffers (with a maximum, of
course, but that's not the point). The only element that takes care of
sync is the video/audio output. So I might be reading 10 MB ahead of the
data that I'm currently playing, my decoder might be 8 MB ahead and the
rest might be queued in between. So if my video/audio data of the same
time are 8 MB apart from each other, you won't notice (in GStreamer).
Order indeed doesn't matter, not that much.
Placing things in order still can matter at parts where the queue'ing is
harder than this. Imagine live stream viewing, these kind of things.
That's why you try to keep streams synchronized in the file.
Ronald Bultje <rbultje at ronald.bitfreak.net>
Linux Video/Multimedia developer
More information about the Matroska-devel