[FFmpeg-devel] [RFC] possible API for opening external demuxer references

Reimar Döffinger Reimar.Doeffinger
Wed Feb 27 19:25:08 CET 2008

On Wed, Feb 27, 2008 at 07:07:26PM +0100, Michael Niedermayer wrote:
> On Wed, Feb 27, 2008 at 02:38:08PM +0100, Reimar D?ffinger wrote:
> > Hello,
> > currently just a flag probably is good enough, but in case someone is
> > interested in taking things further (maybe even as a way to implement
> > general playlist support in lavf, including rules like "internet
> > playlists can only reference internet files and vice versa"?) here is
> > a first idea of a possible API.
> > Probably it makes little sense without actually implementing things to
> > actually see how suitable it is, but since I already got that far...
> IMHO the demuxer should "return" the urls to the calling application
> and not mess with them any further.
> That is have a seperate AVStream with CODEC_ID_REFERENCE/URL/whatever
> and put the urls in extradata.

I think in mov those streams already do have extradata though.
It would be possible to create an additional AVStream, though this may not
work too well with stream copy either.

> The application could check exradata after read_header() and act
> on them as needed. That is for example opening seperate streams, demuxers
> decoders (some of which may be binary only).

Ok so far, but the mov way needs the original demuxer to get the opened
separate streams AFAICT.
Hm... Maybe one AVStream for the actual external data stream and another
one for the reference where the extradata also contains the stream
number of the external stream?
And a ByteIOContext in AVStream that would have to be set, otherwise the
demuxer would ignore it (well, maybe better set to AVDISCARD_ALL by
default and the app must unset that).
Or is that too messy?

Reimar D?ffinger

More information about the ffmpeg-devel mailing list