: _film (f)
, _job (j)
, _video_frames_out (0)
+ , _state (TRANSCODING)
, _terminate (false)
{
_have_a_real_frame[EYES_BOTH] = false;
}
}
+ {
+ boost::mutex::scoped_lock lm (_state_mutex);
+ _state = HASHING;
+ }
+
_writer->finish ();
_writer.reset ();
}
float
Encoder::current_encoding_rate () const
{
- boost::mutex::scoped_lock lock (_history_mutex);
+ boost::mutex::scoped_lock lock (_state_mutex);
if (int (_time_history.size()) < _history_size) {
return 0;
}
int
Encoder::video_frames_out () const
{
- boost::mutex::scoped_lock (_history_mutex);
+ boost::mutex::scoped_lock (_state_mutex);
return _video_frames_out;
}
void
Encoder::frame_done ()
{
- boost::mutex::scoped_lock lock (_history_mutex);
+ boost::mutex::scoped_lock lock (_state_mutex);
struct timeval tv;
gettimeofday (&tv, 0);
}
void
-Encoder::process_video (shared_ptr<const Image> image, Eyes eyes, bool same)
+Encoder::process_video (shared_ptr<const Image> image, Eyes eyes, ColourConversion conversion, bool same)
{
boost::mutex::scoped_lock lock (_mutex);
TIMING ("adding to queue of %1", _queue.size ());
_queue.push_back (shared_ptr<DCPVideoFrame> (
new DCPVideoFrame (
- image, _video_frames_out, eyes, _film->video_frame_rate(),
+ image, _video_frames_out, eyes, conversion, _film->video_frame_rate(),
_film->j2k_bandwidth(), _film->log()
)
));