demux: rewrite probing and demuxer initialization

Get rid of the strange and messy reliance on DEMUXER_TYPE_ constants.
Instead of having two open functions for the demuxer callbacks (which
somehow are both optional, but you can also decide to implement both...),
just have one function. This function takes a parameter that tells the
demuxer how strictly it should check for the file headers. This is a
nice simplification and allows more flexibility.

Remove the file extension code. This literally did nothing (anymore).

Change demux_lavf so that we check our other builtin demuxers first
before libavformat tries to guess by file extension.
This commit is contained in:
wm4
2013-07-12 21:58:11 +02:00
parent 311d2f199a
commit 3269bd1780
22 changed files with 220 additions and 434 deletions

View File

@@ -32,7 +32,7 @@ static int
mf_stream_open (stream_t *stream, int mode, void *opts)
{
stream->type = STREAMTYPE_MF;
stream->demuxer = "lavf";
stream->demuxer = "mf";
return STREAM_OK;
}