summaryrefslogtreecommitdiffstats
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-05-22 19:24:59 +0200
committerAnton Khirnov <anton@khirnov.net>2011-07-10 17:07:05 +0200
commita67c061e0f3b55ffcc96f336fc0998e44b86c8e4 (patch)
tree28556abef85e00ac067db5e165c3676c98667ff7 /libavformat/avformat.h
parent0b950fe240936fa48fd41204bcfd04f35bbf39c3 (diff)
downloadffmpeg-streaming-a67c061e0f3b55ffcc96f336fc0998e44b86c8e4.zip
ffmpeg-streaming-a67c061e0f3b55ffcc96f336fc0998e44b86c8e4.tar.gz
lavf: add avformat_find_stream_info()
It supports passing options to codecs.
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 2cdf11b..6e861de 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1093,6 +1093,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputForma
*/
AVFormatContext *avformat_alloc_context(void);
+#if FF_API_FORMAT_PARAMETERS
/**
* Read packets of a media file to get stream information. This
* is useful for file formats with no headers such as MPEG. This
@@ -1105,8 +1106,34 @@ AVFormatContext *avformat_alloc_context(void);
* @return >=0 if OK, AVERROR_xxx on error
* @todo Let the user decide somehow what information is needed so that
* we do not waste time getting stuff the user does not need.
+ *
+ * @deprecated use avformat_find_stream_info.
*/
int av_find_stream_info(AVFormatContext *ic);
+#endif
+
+/**
+ * Read packets of a media file to get stream information. This
+ * is useful for file formats with no headers such as MPEG. This
+ * function also computes the real framerate in case of MPEG-2 repeat
+ * frame mode.
+ * The logical file position is not changed by this function;
+ * examined packets may be buffered for later processing.
+ *
+ * @param ic media file handle
+ * @param options If non-NULL, an ic.nb_streams long array of pointers to
+ * dictionaries, where i-th member contains options for
+ * codec corresponding to i-th stream.
+ * On return each dictionary will be filled with options that were not found.
+ * @return >=0 if OK, AVERROR_xxx on error
+ *
+ * @note this function isn't guaranteed to open all the codecs, so
+ * options being non-empty at return is a perfectly normal behavior.
+ *
+ * @todo Let the user decide somehow what information is needed so that
+ * we do not waste time getting stuff the user does not need.
+ */
+int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
/**
* Find the "best" stream in the file.
OpenPOWER on IntegriCloud