[vlc-devel] Decoupling Ogg-Demuxer

Jean-Baptiste Kempf jb at videolan.org
Sat Jan 16 18:55:25 CET 2016

On 16 Jan, Michael Tänzer wrote :
> I'm currently writing a decoder for the unofficial OggSpots codec [1] in
> VLC.


> As you probably know the Ogg demuxer is very interwoven with the
> various decoders that can be put into an Ogg container.

Like what part?

> a) Just go with the existing approach and intermingle the OggSpots codec
> with the demuxer. This would also mean that for the codec implementation
> to be useful it would need to be included with the main VLC distribution.
> b) Decouple all the Ogg mess and allow new codecs to be plugged in just
> by loading a new module.
> Pros for b):
> + Better separation between codecs and demuxers
> + Reduce the amount of code in the Ogg demuxer (currently 3384 lines)
> Challenges for b):
> - Ogg format depends on some information passed from the codec to the
> demuxer (for seeking and time calculation). What is the clean way to
> pass this information? es_format_t.p_extra is already used for
> transferring headers from the demuxer to the codec. Introduce a new
> field in es_format_t? Introduce new function pointers in decoder_t?

Unfortunately, I believe seeking should be dealt with in the demuxer,
and not really in the decoder. Ogg granulepos is a misfeature.

> - The decoupling would be a major change and maybe break some
> functionality. Is there some sort of test suite like an archive of media
> files with special cases like broken streams or errors produced by a
> certain version of a library, so we can throw those files against the
> new implementation and test if it still works?

Use the theora testsuite and all the bug we closed on the report with

> What are your suggestions for tackling that problem?

Unfortunately, I'd do a) and would work on splitting the files/cleaning
the code.

With my kindest regards,

Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device

More information about the vlc-devel mailing list