in to get it to the right length.
*/
- int64_t const video_length_in_audio_frames = ((int64_t) last_video_frame() * audio_sample_rate() / frames_per_second());
+ int64_t const video_length_in_audio_frames = ((int64_t) video_frame() * audio_sample_rate() / frames_per_second());
int64_t const audio_short_by_frames = video_length_in_audio_frames - _audio_frames_processed;
_film->log()->log (
String::compose ("DCP length is %1 (%2 audio frames); %3 frames of audio processed.",
- last_video_frame(),
+ video_frame(),
video_length_in_audio_frames,
_audio_frames_processed)
);
if (audio_short_by_frames >= 0 && _opt->decode_audio) {
- _film->log()->log (String::compose ("DCP length is %1; %2 frames of audio processed.", last_video_frame(), _audio_frames_processed));
+ _film->log()->log (String::compose ("DCP length is %1; %2 frames of audio processed.", video_frame(), _audio_frames_processed));
_film->log()->log (String::compose ("Adding %1 frames of silence to the end.", audio_short_by_frames));
/* XXX: this is slightly questionable; does memset () give silence with all
}
shared_ptr<Subtitle> sub;
- if (_timed_subtitle && _timed_subtitle->displayed_at (double (last_video_frame()) / _film->frames_per_second())) {
+ if (_timed_subtitle && _timed_subtitle->displayed_at (double (video_frame()) / _film->frames_per_second())) {
sub = _timed_subtitle->subtitle ();
}
void go ();
/** @return the index of the last video frame to be processed */
- int last_video_frame () const {
+ int video_frame () const {
return _video_frame;
}
_decoder = decoder_factory (_film, o, this, true, true);
_decoder->go ();
- _film->set_length (_decoder->last_video_frame ());
+ _film->set_length (_decoder->video_frame ());
- _film->log()->log (String::compose ("Video length is %1 frames", _decoder->last_video_frame()));
+ _film->log()->log (String::compose ("Video length is %1 frames", _decoder->video_frame()));
ascend ();
set_progress (1);
set_state (FINISHED_OK);
}
-
-int
-ExamineContentJob::last_video_frame () const
-{
- return _decoder->last_video_frame ();
-}
std::string name () const;
void run ();
- int last_video_frame () const;
-
private:
boost::shared_ptr<Decoder> _decoder;
};
if (avcodec_decode_video2 (_video_codec_context, _frame, &frame_finished, &_packet) >= 0 && frame_finished) {
/* Where we are in the output, in seconds */
- double const out_pts_seconds = last_video_frame() / frames_per_second();
+ double const out_pts_seconds = video_frame() / frames_per_second();
/* Difference between where we are and where we should be */
double const delta = pts_seconds - out_pts_seconds;