From 504c63b3d62038bc486ca8a09e77fbb403907edd Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 10 May 2016 14:29:14 +0100 Subject: Basics of splitting up Decoder tree like Content. --- src/lib/video_decoder.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/lib/video_decoder.cc') diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index 8862eaa6e..fce5b367a 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -34,12 +34,14 @@ using std::back_inserter; using boost::shared_ptr; using boost::optional; -VideoDecoder::VideoDecoder (shared_ptr c, shared_ptr log) +VideoDecoder::VideoDecoder (Decoder* parent, shared_ptr c, shared_ptr log) #ifdef DCPOMATIC_DEBUG : test_gaps (0) - , _video_content (c) + , _parent (parent), + _video_content (c) #else - : _video_content (c) + : _parent (parent) + , _video_content (c) #endif , _log (log) , _last_seek_accurate (true) @@ -105,7 +107,7 @@ VideoDecoder::get_video (Frame frame, bool accurate) break; } - if (pass (PASS_REASON_VIDEO, accurate)) { + if (_parent->pass (Decoder::PASS_REASON_VIDEO, accurate)) { /* The decoder has nothing more for us */ no_data = true; break; @@ -128,7 +130,7 @@ VideoDecoder::get_video (Frame frame, bool accurate) } else { /* Any frame will do: use the first one that comes out of pass() */ - while (_decoded_video.empty() && !pass (PASS_REASON_VIDEO, accurate)) {} + while (_decoded_video.empty() && !_parent->pass (Decoder::PASS_REASON_VIDEO, accurate)) {} if (!_decoded_video.empty ()) { dec.push_back (_decoded_video.front ()); } -- cgit v1.2.3