changeset 4570:b42c89b5b998 libavformat

AVInputFormat.reed_seek2()
author michael
date Wed, 25 Feb 2009 03:18:11 +0000
parents 0000335f1eba
children d870b1e4b731
files avformat.h
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/avformat.h	Tue Feb 24 22:19:09 2009 +0000
+++ b/avformat.h	Wed Feb 25 03:18:11 2009 +0000
@@ -333,6 +333,8 @@
     /** Close the stream. The AVFormatContext and AVStreams are not
        freed by this function */
     int (*read_close)(struct AVFormatContext *);
+
+#if LIBAVFORMAT_VERSION_MAJOR < 53
     /**
      * Seek to a given timestamp relative to the frames in
      * stream component stream_index.
@@ -343,6 +345,7 @@
      */
     int (*read_seek)(struct AVFormatContext *,
                      int stream_index, int64_t timestamp, int flags);
+#endif
     /**
      * Gets the next timestamp in stream[stream_index].time_base units.
      * @return the timestamp or AV_NOPTS_VALUE if an error occurred
@@ -368,6 +371,14 @@
 
     const struct AVCodecTag * const *codec_tag;
 
+    /**
+     * 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.
+     */
+    int (*reed_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
+
     /* private fields */
     struct AVInputFormat *next;
 } AVInputFormat;