]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '7fbb3b5b9857276b4cd17b2a530c7e0880d2bc0a'
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Mon, 29 Feb 2016 15:39:19 +0000 (15:39 +0000)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Mon, 29 Feb 2016 15:39:19 +0000 (15:39 +0000)
* commit '7fbb3b5b9857276b4cd17b2a530c7e0880d2bc0a':
  lavf: use the io_open callbacks for files opened from open_input() as well

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
1  2 
libavformat/avformat.h

index 2b6533c9570163b968069dd1d77831b331c4f329,8dab2b75e790b5a706cb140037fdc3f0be99349e..b843a4b344bd1a4dc59ed15f8c4d3829993ecd65
@@@ -1783,67 -1235,11 +1783,67 @@@ typedef struct AVFormatContext 
      void *opaque;
  
      /**
 +     * Callback used by devices to communicate with application.
 +     */
 +    av_format_control_message control_message_cb;
 +
 +    /**
 +     * Output timestamp offset, in microseconds.
 +     * Muxing: set by user via AVOptions (NO direct access)
 +     */
 +    int64_t output_ts_offset;
 +
 +    /**
 +     * dump format separator.
 +     * can be ", " or "\n      " or anything else
 +     * Code outside libavformat should access this field using AVOptions
 +     * (NO direct access).
 +     * - muxing: Set by user.
 +     * - demuxing: Set by user.
 +     */
 +    uint8_t *dump_separator;
 +
 +    /**
 +     * Forced Data codec_id.
 +     * Demuxing: Set by user.
 +     */
 +    enum AVCodecID data_codec_id;
 +
 +#if FF_API_OLD_OPEN_CALLBACKS
 +    /**
 +     * Called to open further IO contexts when needed for demuxing.
 +     *
 +     * This can be set by the user application to perform security checks on
 +     * the URLs before opening them.
 +     * The function should behave like avio_open2(), AVFormatContext is provided
 +     * as contextual information and to reach AVFormatContext.opaque.
 +     *
 +     * If NULL then some simple checks are used together with avio_open2().
 +     *
 +     * Must not be accessed directly from outside avformat.
 +     * @See av_format_set_open_cb()
 +     *
 +     * Demuxing: Set by user.
 +     *
 +     * @deprecated Use io_open and io_close.
 +     */
 +    attribute_deprecated
 +    int (*open_cb)(struct AVFormatContext *s, AVIOContext **p, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options);
 +#endif
 +
 +    /**
 +     * ',' separated list of allowed protocols.
 +     * - encoding: unused
 +     * - decoding: set by user through AVOptions (NO direct access)
 +     */
 +    char *protocol_whitelist;
 +
 +    /*
       * A callback for opening new IO streams.
       *
-      * Certain muxers or demuxers (e.g. for various playlist-based formats) need
-      * to open additional files during muxing or demuxing. This callback allows
-      * the caller to provide custom IO in such cases.
+      * Whenever a muxer or a demuxer needs to open an IO stream (typically from
+      * avformat_open_input() for demuxers, but for certain formats can happen at
+      * other times as well), it will call this callback to obtain an IO context.
       *
       * @param s the format context
       * @param pb on success, the newly opened IO context should be returned here