summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-02-08 17:52:52 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-02-08 17:52:52 +0000
commitd04768fa80667929a713ee3a1e97a07f25c7a7d0 (patch)
tree9002074af1bf3f239bdeef4892c2768be1e2ade7 /libavformat/avformat.h
parent3daa434a40c56deef91c9d545552349d661105e9 (diff)
avformat_seek_file() prototype
Originally committed as revision 17060 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 420125409d..ecb2951391 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -891,6 +891,30 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
int flags);
/**
+ * Seek to timestamp ts.
+ * Seeking will be done so that the point from which all active streams
+ * can be presented successfully will be closest to ts and within min/max_ts.
+ * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.
+ *
+ * if flags contain AVSEEK_FLAG_BYTE then all timestamps are in byte and
+ * are the file position (this may not be supported by all demuxers).
+ * if flags contain AVSEEK_FLAG_FRAME then all timestamps are in frames
+ * in the stream with stream_index (this may not be supported by all demuxers).
+ * else all timestamps are in units of the stream selected by stream_index or
+ * if its -1 AV_TIME_BASE units.
+ * if flags contain AVSEEK_FLAG_ANY then non keyframes are treated as
+ * keyframes (this may not be supported by all demuxers).
+ *
+ * @param stream_index index of the stream which is used as timebase reference.
+ * @param min_ts smallest acceptable timestamp
+ * @param ts target timestamp
+ * @param max_ts largest acceptable timestamp
+ * @param flags flags
+ * @returns >=0 on success, error code otherwise
+ */
+int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
+
+/**
* Start playing a network based stream (e.g. RTSP stream) at the
* current position.
*/