X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fvideo_decoder.h;h=c8530d82caa850429536e0bd0859396f198c7e4c;hp=156ee42221a0d645a1ac8998934afc6c98ccae78;hb=588a3899fd6069f18b6e9f3d5ec62f2e938e034d;hpb=a28ef704adf8c5bfa45b3d6285f741af64758ceb diff --git a/src/lib/video_decoder.h b/src/lib/video_decoder.h index 156ee4222..c8530d82c 100644 --- a/src/lib/video_decoder.h +++ b/src/lib/video_decoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2016 Carl Hetherington + Copyright (C) 2012-2018 Carl Hetherington This file is part of DCP-o-matic. @@ -44,46 +44,29 @@ class Log; class VideoDecoder : public DecoderPart { public: - VideoDecoder (Decoder* parent, boost::shared_ptr c, boost::shared_ptr log); - - std::list get (Frame frame, bool accurate); - -#ifdef DCPOMATIC_DEBUG - int test_gaps; -#endif + VideoDecoder (Decoder* parent, boost::shared_ptr c); friend struct video_decoder_fill_test1; friend struct video_decoder_fill_test2; friend struct ffmpeg_pts_offset_test; friend void ffmpeg_decoder_sequential_test_one (boost::filesystem::path file, float fps, int gaps, int video_length); - void seek (ContentTime time, bool accurate); - void give (boost::shared_ptr, Frame frame); - - boost::optional position () const { + boost::optional position (boost::shared_ptr) const { return _position; } - void reset_position () { - _position.reset (); - } - -private: + void seek (); + void emit (boost::shared_ptr film, boost::shared_ptr, Frame frame); - std::list decoded (Frame frame); - void fill_one_eye (Frame from, Frame to, Eyes); - void fill_both_eyes (VideoFrame from, VideoFrame to); + boost::signals2::signal Data; +private: boost::shared_ptr _content; - std::list _decoded; - boost::shared_ptr _black_image; - boost::optional _last_seek_time; - bool _last_seek_accurate; - /** if set, this is a frame for which we got no data because the Decoder said - * it has no more to give. - */ - boost::optional _no_data_frame; - boost::optional _position; + /** Frame of last thing to be emitted; only used for 3D */ + boost::optional _last_emitted_frame; + boost::optional _last_emitted_eyes; + boost::optional _position; + std::vector _last_threed_frames; }; #endif