* Decoding: duration of the stream, in stream time base.
* If a source file does not specify a duration, but does specify
* a bitrate, this value will be estimated from bitrate and file size.
+ *
+ * Encoding: May be set by the caller before avformat_write_header() to
+ * provide a hint to the muxer about the estimated duration.
*/
int64_t duration;
*/
/**
- * Stream information used internally by av_find_stream_info()
+ * Stream information used internally by avformat_find_stream_info()
*/
#define MAX_STD_TIMEBASES (30*12+30+3+6)
struct {
int probe_packets;
/**
- * Number of frames that have been demuxed during av_find_stream_info()
+ * Number of frames that have been demuxed during avformat_find_stream_info()
*/
int codec_info_nb_frames;
* - decoding: set by user through AVOptions (NO direct access)
*/
char *protocol_blacklist;
+
+ /**
+ * The maximum number of streams.
+ * - encoding: unused
+ * - decoding: set by user through AVOptions (NO direct access)
+ */
+ int max_streams;
} AVFormatContext;
int av_format_get_probe_score(const AVFormatContext *s);
*/
AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c);
+/**
+ * Wrap an existing array as stream side data.
+ *
+ * @param st stream
+ * @param type side information type
+ * @param data the side data array. It must be allocated with the av_malloc()
+ * family of functions. The ownership of the data is transferred to
+ * st.
+ * @param size side information size
+ * @return zero on success, a negative AVERROR code on failure. On failure,
+ * the stream is unchanged and the data remains owned by the caller.
+ */
+int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
+ uint8_t *data, size_t size);
+
/**
* Allocate new information from stream.
*