[vlc-devel] Decoupling Ogg-Demuxer

Michael Tänzer neo at nhng.de
Sat Jan 16 14:42:56 CET 2016


Hi,

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. This essentially
leaves me with the following options:

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

What are your suggestions for tackling that problem?

-- 
Have a nice day,
Michael

[1]: https://wiki.xiph.org/OggSpots

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160116/61f2a84a/attachment.sig>


More information about the vlc-devel mailing list