summaryrefslogtreecommitdiff
path: root/libavformat/subtitles.h
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-11-23 21:40:46 +0100
committerClément Bœsch <ubitux@gmail.com>2012-12-02 00:06:03 +0100
commitff3624b1ad9dc4374c9adf7ba65ac3ed6d05c0e5 (patch)
tree28584a27b9fa6278fda392c1ca7bf1d3d0191300 /libavformat/subtitles.h
parentb684f744ac1e4c5cbd6ac91d2be6098e1b122288 (diff)
downloadffmpeg-ff3624b1ad9dc4374c9adf7ba65ac3ed6d05c0e5.tar.gz
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);