[MPlayer-dev-eng] [PATCH] add lavfpref demuxer for formats where lavf is preferred over native demuxers
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Apr 7 21:47:25 CEST 2007
Hello,
On Sat, Apr 07, 2007 at 09:00:49PM +0200, Roberto Togni wrote:
> On Sat, 7 Apr 2007 20:16:28 +0200
> Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> > wanted to do this since a long time.
> > It is a demuxer that does almost the same as the normal lavf one, only
> > that it only accepts some formats and is tested much earlier.
> > Does it look okay?
> > I also removed a few entries from extension.c that should not be
> > needed anymore.
> >
>
> [...]
>
> > Index: libmpdemux/demuxer.h
> > ===================================================================
> > --- libmpdemux/demuxer.h (revision 22937)
> > +++ libmpdemux/demuxer.h (working copy)
> > @@ -55,6 +55,7 @@
> > #define DEMUXER_TYPE_MPEG_PES 41
> > #define DEMUXER_TYPE_MPEG_GXF 42
> > #define DEMUXER_TYPE_NUT 43
> > +#define DEMUXER_TYPE_LAVF_PREFERRED 44
> >
> > // This should always match the higest demuxer type number.
> > // Unless you want to disallow users to force the demuxer to some
>
> You forgot to increment DEMUXER_TYPE_MAX, if it's wanted then imo this
> should be given a bigger number.
Of course, simply missed that.
> The idea is good, just hope that no selected lavf demuxer has greedy
> detection...
I can check again before applying but I think not (except for nut, dxa
and wv I worked on all of those demuxers). But the point is that
it would be trivial to fix, just remove it from the list.
(I just checked, nut searches for a specific 64-bit value anywhere in
the autodetection buffer, the others for a specific 32-bit value at the
start of the file, I think they should really be safe as in non-greedy)
The main point is, we simply need to do something like this if we want
to go the way towards replacing libmpdemux with lavf (and I think that
is desirable) without risking major breakage in-between, and to help get
better testing for lavf.
Of course, suggestions for better ways to do this are welcome in case
there are any :-)
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list