From a28ef704adf8c5bfa45b3d6285f741af64758ceb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 8 Dec 2016 11:23:58 +0000 Subject: Further fixes and tidying to 'better-seek'. This fixes the failure to keep track of the `position' of each stream of a multi-stream file. It also tidies things up a bit. --- src/lib/video_decoder.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/lib/video_decoder.h') diff --git a/src/lib/video_decoder.h b/src/lib/video_decoder.h index 4f764d203..156ee4222 100644 --- a/src/lib/video_decoder.h +++ b/src/lib/video_decoder.h @@ -60,6 +60,14 @@ public: void seek (ContentTime time, bool accurate); void give (boost::shared_ptr, Frame frame); + boost::optional position () const { + return _position; + } + + void reset_position () { + _position.reset (); + } + private: std::list decoded (Frame frame); @@ -75,6 +83,7 @@ private: * it has no more to give. */ boost::optional _no_data_frame; + boost::optional _position; }; #endif -- cgit v1.2.3