int64_t
Playlist::required_disk_space (shared_ptr<const Film> film, int j2k_bandwidth, int audio_channels, int audio_frame_rate) const
{
- int64_t video = uint64_t (j2k_bandwidth / 8) * length(film).seconds();
- int64_t audio = uint64_t (audio_channels * audio_frame_rate * 3) * length(film).seconds();
+ int64_t video = uint64_t(j2k_bandwidth / 8) * length(film).seconds();
+ int64_t audio = uint64_t(audio_channels) * audio_frame_rate * 3 * length(film).seconds();
for (auto i: content()) {
auto d = dynamic_pointer_cast<DCPContent> (i);
video -= uint64_t (j2k_bandwidth / 8) * d->length_after_trim(film).seconds();
}
if (d->reference_audio()) {
- audio -= uint64_t (audio_channels * audio_frame_rate * 3) * d->length_after_trim(film).seconds();
+ audio -= uint64_t(audio_channels) * audio_frame_rate * 3 * d->length_after_trim(film).seconds();
}
}
}
}
if (score > best_score) {
- best_summary = i->path(0).leaf().string();
+ best_summary = i->path(0).filename().string();
best_score = score;
}
}