[MPlayer-dev-eng] Matroska demuxer, C++ sources

D Richard Felker III dalias at aerifal.cx
Fri Apr 11 17:29:36 CEST 2003


On Fri, Apr 11, 2003 at 02:43:44PM +0200, Moritz Bunkus wrote:
> Hi.
> 
> As some of you know I'm working on Matroska support. Part of it is a
> Matroska demuxer for MPlayer. 'Unfortunately' the current Matroska
> libraries are written in C++ and therefore the demuxer is written in C++
> as well. So far I've not included it in MPlayer's CVS but I'd like to to
> that soon. So my question is:
> 
> Is C++ acceptable if it's contained to one file?
> (libmpdemux/demux_mkv.cpp) I'll maintain it, of course, so no one needs
> to bother with it ;) And Matroska support will be autodetected by
> configure, so if the libraries themselves are not found the module will
> not be compiled at all.

Please instead write an independent demuxer in C. The problem with C++
isn't just the ugliness. There are also lots of portability issues.

> Apart from the ususal philosophical objetcions regarding Matroska -
> would a C++ demuxer for Matroska be ok? Of course I'll post the patch
> here before committing it so that technical aspects can be worked out.

My opinion would be no, but that's up to other people to decide.
Matroska support is not even useful right now, so it's not worth
littering the code with ugly hacks (C++). On the other hand, LIVE.COM
streaming support is useful, so the C++ was somewhat justified there,
although I still want to see native C code for that stuff in MPlayer
someday...

Rich



More information about the MPlayer-dev-eng mailing list