aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-02-27 09:35:17 +0100
committerAnton Khirnov <anton@khirnov.net>2012-03-26 10:59:43 +0200
commitf58b8cc3e3e8ffe5bf12d49611703c0231c76f44 (patch)
treee9daacf257eb7048a552886063b425135a7b1775 /libavformat
parent10fa4ff7bc62f5630f0a951b622de692ddd35acf (diff)
downloadffmpeg-f58b8cc3e3e8ffe5bf12d49611703c0231c76f44.tar.gz
lavf doxy: add some basic documentation about reading from the demuxer.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index cbd139b574..c540d40dec 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -145,6 +145,22 @@
* avformat_close_input(). It will free everything associated with the file.
*
* @section lavf_decoding_read Reading from an opened file
+ * Reading data from an opened AVFormatContext is done by repeatedly calling
+ * av_read_frame() on it. Each call, if successful, will return an AVPacket
+ * containing encoded data for one AVStream, identified by
+ * AVPacket.stream_index. This packet may be passed straight into the libavcodec
+ * decoding functions avcodec_decode_video2(), avcodec_decode_audio4() or
+ * avcodec_decode_subtitle2() if the caller wishes to decode the data.
+ *
+ * AVPacket.pts, AVPacket.dts and AVPacket.duration timing information will be
+ * set if known. They may also be unset (i.e. AV_NOPTS_VALUE for
+ * pts/dts, 0 for duration) if the stream does not provide them. The timing
+ * information will be in AVStream.time_base units, i.e. it has to be
+ * multiplied by the timebase to convert them to seconds.
+ *
+ * The packet data belongs to the demuxer and is invalid after the next call to
+ * av_read_frame(). The user must free the packet with av_free_packet() before
+ * calling av_read_frame() again or closing the file.
*
* @section lavf_decoding_seek Seeking
* @}