summaryrefslogtreecommitdiff
path: root/src/lib/video_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-12 22:10:54 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commit6f344b876689a1234a5eb75041882f06f5d9fe5c (patch)
tree3a51f17cab8b8f31b21661b643aaed6a53326031 /src/lib/video_decoder.cc
parent36774ee2b48f0bfde43b743592e5816ff58bb7d2 (diff)
Reasonably straightforward stuff; main things are adding
a _parent to VideoContent (mainly, but not only, for signalling) and moving the video shared_ptr into Content, which makes much more sense to replace dynamic_cast tests for whether something has video or whatever. Nearly builds.
Diffstat (limited to 'src/lib/video_decoder.cc')
-rw-r--r--src/lib/video_decoder.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc
index 0936d1bda..f68f0815c 100644
--- a/src/lib/video_decoder.cc
+++ b/src/lib/video_decoder.cc
@@ -34,13 +34,14 @@ using std::back_inserter;
using boost::shared_ptr;
using boost::optional;
-VideoDecoder::VideoDecoder (shared_ptr<const VideoContent> c)
+VideoDecoder::VideoDecoder (shared_ptr<const VideoContent> c, shared_ptr<Log> log)
#ifdef DCPOMATIC_DEBUG
: test_gaps (0)
, _video_content (c)
#else
: _video_content (c)
#endif
+ , _log (log)
, _last_seek_accurate (true)
, _ignore_video (false)
{
@@ -79,7 +80,7 @@ VideoDecoder::get_video (Frame frame, bool accurate)
one after the end of _decoded_video we need to seek.
*/
- _video_content->film()->log()->log (String::compose ("VD has request for %1", frame), LogEntry::TYPE_DEBUG_DECODE);
+ _log->log (String::compose ("VD has request for %1", frame), LogEntry::TYPE_DEBUG_DECODE);
if (_decoded_video.empty() || frame < _decoded_video.front().frame || frame > (_decoded_video.back().frame + 1)) {
seek (ContentTime::from_frames (frame, _video_content->video_frame_rate()), accurate);
@@ -252,7 +253,7 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, Frame frame)
return;
}
- _video_content->film()->log()->log (String::compose ("VD receives %1", frame), LogEntry::TYPE_DEBUG_DECODE);
+ _log->log (String::compose ("VD receives %1", frame), LogEntry::TYPE_DEBUG_DECODE);
/* Work out what we are going to push into _decoded_video next */
list<ContentVideo> to_push;