Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-11-24 00:40:46 +0400
committerClément Bœsch <ubitux@gmail.com>2012-12-02 03:06:03 +0400
commitff3624b1ad9dc4374c9adf7ba65ac3ed6d05c0e5 (patch)
tree28584a27b9fa6278fda392c1ca7bf1d3d0191300 /libavformat/subtitles.h
parentb684f744ac1e4c5cbd6ac91d2be6098e1b122288 (diff)
lavf/subtitles: add ff_subtitles_queue_seek().
This function is almost identical to lavf/assdec:read_seek2(). It performs a generic seek for text subtitles demuxers for the new seeking API. The only difference with assdec:read_seek2 is the ts_diff being unsigned to avoid overflows. The seek callback in the ASS demuxer will be removed when it is redesigned to use FFDemuxSubtitlesQueue.
Diffstat (limited to 'libavformat/subtitles.h')
-rw-r--r--libavformat/subtitles.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/subtitles.h b/libavformat/subtitles.h
index b089bb2a87..55e6182922 100644
--- a/libavformat/subtitles.h
+++ b/libavformat/subtitles.h
@@ -55,6 +55,13 @@ void ff_subtitles_queue_finalize(FFDemuxSubtitlesQueue *q);
int ff_subtitles_queue_read_packet(FFDemuxSubtitlesQueue *q, AVPacket *pkt);
/**
+ * Update current_sub_idx to emulate a seek. Except the first parameter, it
+ * matches AVInputFormat->read_seek2 prototypes.
+ */
+int ff_subtitles_queue_seek(FFDemuxSubtitlesQueue *q, AVFormatContext *s, int stream_index,
+ int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
+
+/**
* Remove and destroy all the subtitles packets.
*/
void ff_subtitles_queue_clean(FFDemuxSubtitlesQueue *q);