[MPlayer-dev-eng] [PATCH] [RFC] Demuxer cleanup

Roberto Togni r_togni at tiscali.it
Tue Jul 26 00:37:10 CEST 2005


Hi all.

This patch replaces the big switch statements in demuxer.c with a
modularized structure, like the one already used for codecs and streams.

Now to add a demuxer you only have to add a new DEMUXER_TYPE_ define,
add a pointer to a demuxer description structure to the list at the top
of demuxer.c, and add the demuxer_desc_t structure in your code.

This is a big patch, but most of the changes are very simple:
- demuxer.c: almost all changes are here
- demuxer_*.c: some functions made static, added description structures,
created open_ and check_ functions to host code moved from demuxer.c
(where needed)
- mplayer.c: added code for -demuxer help
- cfg-common.h: -demuxer now takes a string as parameter

As a bonus you get:
- -demuxer help
- demuxer selection by name


Please test. If you can please test also external audiofile and tv
(this is untested, i don't have a tv card).

If someone is missing in author field of a demuxer please report.

I'd like to apply it soon if there are no objections (this weekend?),
unless you think it's better to delay it after pre9 (when?)

Ciao,
 Roberto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demuxer20050725.diff.bz2
Type: application/octet-stream
Size: 20853 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050726/cc9c48c5/attachment.obj>


More information about the MPlayer-dev-eng mailing list