diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp_decoder.cc | 6 | ||||
| -rw-r--r-- | src/lib/dcp_decoder.h | 2 | ||||
| -rw-r--r-- | src/lib/decoder.h | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index a3c42a321..03ac66e94 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -457,3 +457,9 @@ DCPDecoder::calculate_lazy_digest (shared_ptr<const DCPContent> c) const } return d.get (); } + +ContentTime +DCPDecoder::position () const +{ + return ContentTime::from_frames(_offset, _dcp_content->active_video_frame_rate(film())) + _next; +} diff --git a/src/lib/dcp_decoder.h b/src/lib/dcp_decoder.h index 496d95740..4de8c8629 100644 --- a/src/lib/dcp_decoder.h +++ b/src/lib/dcp_decoder.h @@ -62,6 +62,8 @@ public: return _lazy_digest; } + dcpomatic::ContentTime position () const; + private: friend struct dcp_subtitle_within_dcp_test; diff --git a/src/lib/decoder.h b/src/lib/decoder.h index 92082ca18..ddea58aac 100644 --- a/src/lib/decoder.h +++ b/src/lib/decoder.h @@ -57,7 +57,7 @@ public: virtual bool pass () = 0; virtual void seek (dcpomatic::ContentTime time, bool accurate); - dcpomatic::ContentTime position () const; + virtual dcpomatic::ContentTime position () const; protected: boost::shared_ptr<const Film> film () const; |
