From 9c399a21b37d83ceb2c81706975e2c46d1a3f673 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 18 Dec 2013 09:39:36 +0000 Subject: Considerable rework of decoder timing; tests pass, at least. --- src/lib/video_decoder.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/lib/video_decoder.cc') diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index 72caf72e9..3a8891111 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -24,6 +24,7 @@ using std::cout; using boost::shared_ptr; +using boost::optional; VideoDecoder::VideoDecoder (shared_ptr f, shared_ptr c) : Decoder (f) @@ -32,20 +33,20 @@ VideoDecoder::VideoDecoder (shared_ptr f, shared_ptr image, bool same, ContentTime time) { switch (_video_content->video_frame_type ()) { case VIDEO_FRAME_TYPE_2D: - Video (image, EYES_BOTH, same, time); + _pending.push_back (shared_ptr (new DecodedVideo (image, EYES_BOTH, same, time))); break; case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT: { int const half = image->size().width / 2; - Video (image->crop (Crop (0, half, 0, 0), true), EYES_LEFT, same, time); - Video (image->crop (Crop (half, 0, 0, 0), true), EYES_RIGHT, same, time); + _pending.push_back (shared_ptr (new DecodedVideo (image->crop (Crop (0, half, 0, 0), true), EYES_LEFT, same, time))); + _pending.push_back (shared_ptr (new DecodedVideo (image->crop (Crop (half, 0, 0, 0), true), EYES_RIGHT, same, time))); break; } } } - -- cgit v1.2.3