[FFmpeg-devel] [RFC] possible API for opening external demuxer references
Reimar Döffinger
Reimar.Doeffinger
Wed Feb 27 15:36:34 CET 2008
Hello,
On Wed, Feb 27, 2008 at 03:25:17PM +0100, Baptiste Coudurier wrote:
> > diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> > index ad186e4..8f0cfa8 100644
> > --- a/libavformat/avformat.h
> > +++ b/libavformat/avformat.h
> > @@ -499,6 +499,12 @@ typedef struct AVFormatContext {
> > * demuxing: set by user
> > */
> > unsigned int max_index_size;
> > +
> > + //! Callback used to open a substream referenced by a container
> > + int (*open_stream)(struct AVFormatContext *, ByteIOContext **s,
> > + const uint8_t *resource, int resource_length, int flags);
> > + //! Custom user data for use by e.g. open_stream callback
> > + void *user_data;
> > } AVFormatContext;
>
> Humm not sure, but is AVFormatContext arg needed here ?
Well, the idea was that resource might well be demuxer-specific, which
is also why it is not a simple string.
This may well be API-overkill though.
> Problem is open_stream prototype is incompatible with url_fopen.
[...]
> Also I'd like url_fopen to be used as a fallback, if the
> AVFMT_FLAG_EXTREF flag is set, or another mechanism.
I had thought making a wrapper for that.
Anyway, url_fopen syntax is not possible IMO, we should at least allow
some king of user-data to be passed to the function.
Greetings,
Reimar D?ffinger
More information about the ffmpeg-devel
mailing list