diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-04 21:32:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-07 23:27:56 +0100 |
| commit | a5d004b0773f633401528392fc28e66d70e13ac8 (patch) | |
| tree | 9f83ff2ab353f5a63918210d4930d0ead228375e /src/lib/ffmpeg_content.cc | |
| parent | dd9be86db6cde0afa5da0d1d1ac43b42e05dca26 (diff) | |
BOOST_FOREACH.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 13 |
1 files changed, 6 insertions, 7 deletions
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 <libavutil/pixdesc.h> } #include <libxml++/libxml++.h> -#include <boost/foreach.hpp> #include <iostream> #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<FFmpegAudioStream> f = dynamic_pointer_cast<FFmpegAudioStream> (i); DCPOMATIC_ASSERT (f); f->as_xml (node->add_child("AudioStream")); @@ -296,7 +295,7 @@ FFmpegContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job) if (!examiner->audio_streams().empty ()) { audio.reset (new AudioContent (this)); - BOOST_FOREACH (shared_ptr<FFmpegAudioStream> 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<FFmpegAudioStream> i, ffmpeg_audio_streams ()) { + for (auto i: ffmpeg_audio_streams ()) { as += i->technical_summary () + " " ; } @@ -408,7 +407,7 @@ FFmpegContent::full_length (shared_ptr<const Film> 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<shared_ptr<FFmpegAudioStream> > fa; if (audio) { - BOOST_FOREACH (AudioStreamPtr i, audio->streams()) { + for (auto i: audio->streams()) { fa.push_back (dynamic_pointer_cast<FFmpegAudioStream> (i)); } } |
