summaryrefslogtreecommitdiff
path: root/src/lib/encoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-14 19:27:04 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-14 19:27:04 +0100
commit21e8238484af35ac207b01defe406e73445632be (patch)
tree8985d03f7b5641fd4e160d5ca4cac253976d51ff /src/lib/encoder.cc
parent5c09a82e483593fb37da0cad20679be735887613 (diff)
Make DCPVideoFrame use PlayerVideoFrame to store its image.
Diffstat (limited to 'src/lib/encoder.cc')
-rw-r--r--src/lib/encoder.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc
index 8ae402797..4fc2d7f81 100644
--- a/src/lib/encoder.cc
+++ b/src/lib/encoder.cc
@@ -125,9 +125,9 @@ Encoder::process_end ()
*/
for (list<shared_ptr<DCPVideoFrame> >::iterator i = _queue.begin(); i != _queue.end(); ++i) {
- _film->log()->log (String::compose (N_("Encode left-over frame %1"), (*i)->frame ()));
+ _film->log()->log (String::compose (N_("Encode left-over frame %1"), (*i)->index ()));
try {
- _writer->write ((*i)->encode_locally(), (*i)->frame (), (*i)->eyes ());
+ _writer->write ((*i)->encode_locally(), (*i)->index (), (*i)->eyes ());
frame_done ();
} catch (std::exception& e) {
_film->log()->log (String::compose (N_("Local encode failed (%1)"), e.what ()));
@@ -219,7 +219,7 @@ Encoder::process_video (shared_ptr<PlayerVideoFrame> pvf, bool same)
TIMING ("adding to queue of %1", _queue.size ());
_queue.push_back (shared_ptr<DCPVideoFrame> (
new DCPVideoFrame (
- pvf->image(), _video_frames_out, pvf->eyes(), pvf->colour_conversion(), _film->video_frame_rate(),
+ pvf, _video_frames_out, _film->video_frame_rate(),
_film->j2k_bandwidth(), _film->resolution(), _film->log()
)
));
@@ -282,7 +282,7 @@ try
TIMING ("encoder thread %1 wakes with queue of %2", boost::this_thread::get_id(), _queue.size());
shared_ptr<DCPVideoFrame> vf = _queue.front ();
- TIMING ("encoder thread %1 pops frame %2 (%3) from queue", boost::this_thread::get_id(), vf->frame(), vf->eyes ());
+ TIMING ("encoder thread %1 pops frame %2 (%3) from queue", boost::this_thread::get_id(), vf->index(), vf->eyes ());
_queue.pop_front ();
lock.unlock ();
@@ -308,27 +308,27 @@ try
_film->log()->log (
String::compose (
N_("Remote encode of %1 on %2 failed (%3); thread sleeping for %4s"),
- vf->frame(), server->host_name(), e.what(), remote_backoff)
+ vf->index(), server->host_name(), e.what(), remote_backoff)
);
}
} else {
try {
- TIMING ("encoder thread %1 begins local encode of %2", boost::this_thread::get_id(), vf->frame());
+ TIMING ("encoder thread %1 begins local encode of %2", boost::this_thread::get_id(), vf->index());
encoded = vf->encode_locally ();
- TIMING ("encoder thread %1 finishes local encode of %2", boost::this_thread::get_id(), vf->frame());
+ TIMING ("encoder thread %1 finishes local encode of %2", boost::this_thread::get_id(), vf->index());
} catch (std::exception& e) {
_film->log()->log (String::compose (N_("Local encode failed (%1)"), e.what ()));
}
}
if (encoded) {
- _writer->write (encoded, vf->frame (), vf->eyes ());
+ _writer->write (encoded, vf->index (), vf->eyes ());
frame_done ();
} else {
lock.lock ();
_film->log()->log (
- String::compose (N_("Encoder thread %1 pushes frame %2 back onto queue after failure"), boost::this_thread::get_id(), vf->frame())
+ String::compose (N_("Encoder thread %1 pushes frame %2 back onto queue after failure"), boost::this_thread::get_id(), vf->index())
);
_queue.push_front (vf);
lock.unlock ();