int64_t const video_length_in_audio_frames = ((int64_t) last_video_frame() * audio_sample_rate() / frames_per_second());
int64_t const audio_short_by_frames = video_length_in_audio_frames - _audio_frames_processed;
- _log->log (
+ _film->log()->log (
String::compose ("DCP length is %1 (%2 audio frames); %3 frames of audio processed.",
last_video_frame(),
video_length_in_audio_frames,
if (audio_short_by_frames >= 0 && _opt->decode_audio) {
- _log->log (String::compose ("DCP length is %1; %2 frames of audio processed.", last_video_frame(), _audio_frames_processed));
- _log->log (String::compose ("Adding %1 frames of silence to the end.", audio_short_by_frames));
+ _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 ("Adding %1 frames of silence to the end.", audio_short_by_frames));
/* XXX: this is slightly questionable; does memset () give silence with all
sample formats?
{
/* Deinterleave and convert to float */
- assert ((size % (bytes_per_audio_sample() * _film->audio_channels())) == 0);
+ assert ((size % (bytes_per_audio_sample() * audio_channels())) == 0);
int const total_samples = size / bytes_per_audio_sample();
int const frames = total_samples / _film->audio_channels();
- shared_ptr<AudioBuffers> audio (new AudioBuffers (_film->audio_channels(), frames));
+ shared_ptr<AudioBuffers> audio (new AudioBuffers (audio_channels(), frames));
switch (audio_sample_format()) {
case AV_SAMPLE_FMT_S16:
inputs->pad_idx = 0;
inputs->next = 0;
- _log->log ("Using filter chain `" + filters + "'");
+ _film->log()->log ("Using filter chain `" + filters + "'");
#if LIBAVFILTER_VERSION_MAJOR == 2 && LIBAVFILTER_VERSION_MINOR == 15
if (avfilter_graph_parse (graph, filters.c_str(), inputs, outputs, 0) < 0) {
boost::shared_ptr<const Options> _opt;
/** associated Job, or 0 */
Job* _job;
- /** log that we can write to */
- Log* _log;
/** true to do the bare minimum of work; just run through the content. Useful for acquiring
* accurate frame counts as quickly as possible. This generates no video or audio output.
/* frames of silence that we must push */
int const s = rint ((_first_audio.get() - _first_video.get()) * audio_sample_rate ());
- _log->log (
+ _film->log()->log (
String::compose (
"First video at %1, first audio at %2, pushing %3 frames of silence for %4 channels (%5 bytes per sample)",
_first_video.get(), _first_audio.get(), s, audio_channels(), bytes_per_audio_sample()