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)
{
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);
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;