X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fffmpeg_content.cc;h=234c792fd3ddfff4c7915fa54bbcaca0dca22cda;hp=6f3aceff8609da3cea061be3858edcd60ac9a3b2;hb=a5d004b0773f633401528392fc28e66d70e13ac8;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26 diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 6f3aceff8..234c792fd 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -41,7 +41,6 @@ extern "C" { #include } #include -#include #include #include "i18n.h" @@ -202,7 +201,7 @@ FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const if (audio) { audio->as_xml (node); - BOOST_FOREACH (AudioStreamPtr i, audio->streams ()) { + for (auto i: audio->streams ()) { shared_ptr f = dynamic_pointer_cast (i); DCPOMATIC_ASSERT (f); f->as_xml (node->add_child("AudioStream")); @@ -296,7 +295,7 @@ FFmpegContent::examine (shared_ptr film, shared_ptr job) if (!examiner->audio_streams().empty ()) { audio.reset (new AudioContent (this)); - BOOST_FOREACH (shared_ptr i, examiner->audio_streams ()) { + for (auto i: examiner->audio_streams ()) { audio->add_stream (i); } @@ -345,7 +344,7 @@ string FFmpegContent::technical_summary () const { string as = ""; - BOOST_FOREACH (shared_ptr i, ffmpeg_audio_streams ()) { + for (auto i: ffmpeg_audio_streams ()) { as += i->technical_summary () + " " ; } @@ -408,7 +407,7 @@ FFmpegContent::full_length (shared_ptr film) const if (audio) { DCPTime longest; - BOOST_FOREACH (AudioStreamPtr i, audio->streams()) { + for (auto i: audio->streams()) { longest = max (longest, DCPTime::from_frames(llrint(i->length() / frc.speed_up), i->frame_rate())); } return longest; @@ -429,7 +428,7 @@ FFmpegContent::approximate_length () const DCPOMATIC_ASSERT (audio); Frame longest = 0; - BOOST_FOREACH (AudioStreamPtr i, audio->streams ()) { + for (auto i: audio->streams()) { longest = max (longest, Frame(llrint(i->length()))); } @@ -670,7 +669,7 @@ FFmpegContent::ffmpeg_audio_streams () const vector > fa; if (audio) { - BOOST_FOREACH (AudioStreamPtr i, audio->streams()) { + for (auto i: audio->streams()) { fa.push_back (dynamic_pointer_cast (i)); } }