[matroska-devel] Re: more questions about libmatroska & CVS

Kromyx jadaschlenker at compuserve.de
Fri Jan 24 20:21:50 CET 2003


Moritz Bunkus <moritz at bunkus.org> schrieb in im Newsbeitrag:
20030124144303.GG18648 at bunkus.org...
>
> Hi.
>
> > I don't really understand. What do you call stream handling ? If that's
the IO
> > functions, there is a virtual class for that, and it can be used to
create
> > another stream handling (one that does internal caching for example) if
you need
> > to. These classes are part of the library, but should not use the
libebml or
> > libmatroska namespaces. They are the same ones used in libmcf (and
probably
> > copyrighted by Ingo).
>
> What I call stream handling is reading from files, downloading from
> URLs, supporting protocols like HTTP, RTSP and many more, reading from
> a MODE2 CD etc. So far I've only found two functions in the C api
> (src/api/libmatroska.h) that seem to 'open' something:
> matroska_open_stream_file and matroska_open_url. Unfortunately I won't
> be able to use that with e.g. mplayer at all - mplayer itself does all
> I/O handling (including reading from files/devices/network), and the
> demultiplexers only handle the data given to them by the stream layer.
>
> Please note that I don't have much insight into all the matroska code
> yet as I'm rather new to it. What I have to do is use the C api (as
> mplayer won't accept C++ code inside its source, but I can link against
> the libmatroska) and a method similar to libogg - it just receives the
> data from the application but does not handle files itself.
>
> How would I have to extend the current sources for this?
>
> The things for CVS are all perfectly fine with me.
>
> --
>  ==> Ciao, Mosu (Moritz Bunkus)
> http://matroska.org
>

i dont want to interfere but i guess i know what youre talking about. in
"dshow language" these models are called push and pull. mplayer uses the
"push" model which means it pushes the data towards the demuxer. libmatroska
(as well as libmcf) uses the pull model by requesting specific data
portions.
there is a little bit of incompatibility between those models. to use
libmatroska with mplayer you need to write a IOCallback derived class and
add a new function to the c-api like

matroska_stream matroska_open_push_stream(..) {
IOCallbackDerivedClass    *fileid = new IOCallbackDerivedClass(...);
return file_id;
}

the IOCallback derived class requires its own c-api for finally pushing the
data to the demuxer. the big problem is that you dont know which parts of
the matroska file libmatroska wants to read at a specfic moment so in the
worst case the IOCallbackDerivedClass needs to buffer the whole file.

im not to familiar with mplayer and so on, but i hope i could help

Jan(kromyx/myFUN)


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 25.12.02



http://matroska.org



More information about the Matroska-devel mailing list