summaryrefslogtreecommitdiff
path: root/src/lib/encoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-14 11:27:17 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-14 11:27:17 +0100
commit5c09a82e483593fb37da0cad20679be735887613 (patch)
tree9fb0540536514aa1dc7d4fd4c056c24ca52f59d3 /src/lib/encoder.cc
parent8f7d0cf115980cb357bc3da410842503930e66b8 (diff)
Move Eyes and ColourConversion into PlayerVideoFrame.
Diffstat (limited to 'src/lib/encoder.cc')
-rw-r--r--src/lib/encoder.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc
index bb2fe6822..8ae402797 100644
--- a/src/lib/encoder.cc
+++ b/src/lib/encoder.cc
@@ -180,7 +180,7 @@ Encoder::frame_done ()
}
void
-Encoder::process_video (shared_ptr<PlayerVideoFrame> image, Eyes eyes, ColourConversion conversion, bool same)
+Encoder::process_video (shared_ptr<PlayerVideoFrame> pvf, bool same)
{
_waker.nudge ();
@@ -207,28 +207,28 @@ Encoder::process_video (shared_ptr<PlayerVideoFrame> image, Eyes eyes, ColourCon
rethrow ();
if (_writer->can_fake_write (_video_frames_out)) {
- _writer->fake_write (_video_frames_out, eyes);
- _have_a_real_frame[eyes] = false;
+ _writer->fake_write (_video_frames_out, pvf->eyes ());
+ _have_a_real_frame[pvf->eyes()] = false;
frame_done ();
- } else if (same && _have_a_real_frame[eyes]) {
+ } else if (same && _have_a_real_frame[pvf->eyes()]) {
/* Use the last frame that we encoded. */
- _writer->repeat (_video_frames_out, eyes);
+ _writer->repeat (_video_frames_out, pvf->eyes());
frame_done ();
} else {
/* Queue this new frame for encoding */
TIMING ("adding to queue of %1", _queue.size ());
_queue.push_back (shared_ptr<DCPVideoFrame> (
new DCPVideoFrame (
- image->image(), _video_frames_out, eyes, conversion, _film->video_frame_rate(),
+ pvf->image(), _video_frames_out, pvf->eyes(), pvf->colour_conversion(), _film->video_frame_rate(),
_film->j2k_bandwidth(), _film->resolution(), _film->log()
)
));
_condition.notify_all ();
- _have_a_real_frame[eyes] = true;
+ _have_a_real_frame[pvf->eyes()] = true;
}
- if (eyes != EYES_LEFT) {
+ if (pvf->eyes() != EYES_LEFT) {
++_video_frames_out;
}
}