summaryrefslogtreecommitdiff
path: root/src/lib/video_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-05-10 14:29:14 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commit504c63b3d62038bc486ca8a09e77fbb403907edd (patch)
treed9118c185110dd9eb103ed033700d4b3f486785d /src/lib/video_decoder.cc
parent9423e02c37daba7f9e406929a1cfc1bb10fb4b62 (diff)
Basics of splitting up Decoder tree like Content.
Diffstat (limited to 'src/lib/video_decoder.cc')
-rw-r--r--src/lib/video_decoder.cc12
1 files changed, 7 insertions, 5 deletions
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<const Content> c, shared_ptr<Log> log)
+VideoDecoder::VideoDecoder (Decoder* parent, shared_ptr<const Content> c, shared_ptr<Log> 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 ());
}