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

Steve Lhomme steve.lhomme at free.fr
Sat Jan 25 17:12:14 CET 2003


Moritz Bunkus wrote:

> 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.

Well, the C API is the one from the old libmcf. It is currently not 
"connected" to the matroska elements. But that API shouldn't need much 
change (if any).

At the C++ level there definitely is classes to override for each IO 
system needed (HD caching, network, etc). I'm not sure that at the C 
level there is something similar. It would probably be through a FILE 
pointer, maybe it can be done another way. If you have any idea on 
improving the C API (hopefully mapping the necessary structures to a C++ 
class that use IOCallback), feel free to submit that code.

> 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.

In what form would that be ? If that's general enough it should be easy 
to use it in the C API and map it to an internal C++ class (all elements 
read/write is done through an IOCallback class).


http://matroska.org



More information about the Matroska-devel mailing list