summaryrefslogtreecommitdiff
path: root/src/lib/decoder.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-11-19 00:31:37 +0000
committerCarl Hetherington <cth@carlh.net>2016-11-19 00:51:05 +0000
commit24e890682b3f2aa211277ad8b6b3591f2026d4be (patch)
treeb3b8b23c295e1efc1846c0a37088773da97606f8 /src/lib/decoder.h
parent5d6e2ffca8e4b0d587eff8723716003a6d81be47 (diff)
Cope with offsets between video/audio/subtitle data in a muxed file.
Diffstat (limited to 'src/lib/decoder.h')
-rw-r--r--src/lib/decoder.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/decoder.h b/src/lib/decoder.h
index 84661ee8c..d2302d7a2 100644
--- a/src/lib/decoder.h
+++ b/src/lib/decoder.h
@@ -52,7 +52,9 @@ public:
PASS_REASON_SUBTITLE
};
- void maybe_seek (ContentTime time, bool accurate);
+ void maybe_seek_video (ContentTime time, bool accurate);
+ void maybe_seek_audio (ContentTime time, bool accurate);
+ void maybe_seek_subtitle (ContentTime time, bool accurate);
/** @return true if this decoder has already returned all its data and will give no more */
virtual bool pass (PassReason, bool accurate) = 0;
@@ -63,7 +65,9 @@ public:
virtual void reset () {}
protected:
- boost::optional<ContentTime> _position;
+ boost::optional<ContentTime> _video_position;
+ boost::optional<ContentTime> _audio_position;
+ boost::optional<ContentTime> _subtitle_position;
private:
/** Seek so that the next pass() will yield the next thing
@@ -75,6 +79,7 @@ private:
* it may seek to just the right spot.
*/
virtual void seek (ContentTime time, bool accurate) = 0;
+ void maybe_seek (boost::optional<ContentTime>& position, ContentTime time, bool accurate);
};
#endif