diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-06-26 01:21:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-06-26 17:04:31 +0100 |
| commit | 09a9ac376db005a40a351736bcff4077f098825d (patch) | |
| tree | 64ea69741155d15d114ad96daf0f90e24b3abe28 /src/lib/video_decoder.h | |
| parent | 46cd0fe7b5b514f0d9456b25f670679cc584a218 (diff) | |
Another try at sorting out the thorny question of timing.
Diffstat (limited to 'src/lib/video_decoder.h')
| -rw-r--r-- | src/lib/video_decoder.h | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/src/lib/video_decoder.h b/src/lib/video_decoder.h index 8de76c10f..d24219d95 100644 --- a/src/lib/video_decoder.h +++ b/src/lib/video_decoder.h @@ -20,37 +20,30 @@ #ifndef DCPOMATIC_VIDEO_DECODER_H #define DCPOMATIC_VIDEO_DECODER_H -#include "video_source.h" #include "decoder.h" #include "util.h" class VideoContent; -class VideoDecoder : public VideoSource, public virtual Decoder +class VideoDecoder : public virtual Decoder { public: - VideoDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const VideoContent>); + VideoDecoder (boost::shared_ptr<const Film>); - virtual void seek (Time); - virtual void seek_back (); - virtual void seek_forward (); - - void set_video_container_size (libdcp::Size); + virtual void seek (VideoContent::Frame) = 0; + virtual void seek_back () = 0; -protected: + /** Emitted when a video frame is ready. + * First parameter is the video image. + * Second parameter is true if the image is the same as the last one that was emitted. + * Third parameter is the frame within our source. + */ + boost::signals2::signal<void (boost::shared_ptr<const Image>, bool, VideoContent::Frame)> Video; - void video (boost::shared_ptr<Image>, bool, Time); - void subtitle (boost::shared_ptr<TimedSubtitle>); - bool video_done () const; - - Time _next_video; - boost::shared_ptr<const VideoContent> _video_content; - -private: - boost::shared_ptr<TimedSubtitle> _timed_subtitle; - FrameRateConversion _frame_rate_conversion; - bool _odd; - boost::optional<libdcp::Size> _video_container_size; +protected: + + void video (boost::shared_ptr<const Image>, bool, VideoContent::Frame); + VideoContent::Frame _video_position; }; #endif |
