X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_content.cc;h=e843e1e168c3fbb71e561279b9babe2debf6b376;hb=c3da7c64f01420447dbab7f5c2ea42ff1b911cc5;hp=35f9f71f2fc98806c4d13089db93c34cb090b2dc;hpb=b655bd3359e9a014da68cd9f61e2a5b1d233247d;p=dcpomatic.git diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 35f9f71f2..e843e1e16 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -26,6 +26,7 @@ #include "filter.h" #include "film.h" #include "log.h" +#include "exceptions.h" #include "i18n.h" @@ -34,8 +35,10 @@ using std::stringstream; using std::vector; using std::list; using std::cout; +using std::pair; using boost::shared_ptr; using boost::lexical_cast; +using boost::dynamic_pointer_cast; int const FFmpegContentProperty::SUBTITLE_STREAMS = 100; int const FFmpegContentProperty::SUBTITLE_STREAM = 101; @@ -58,8 +61,8 @@ FFmpegContent::FFmpegContent (shared_ptr f, shared_ptr > c = node->node_children ("SubtitleStream"); - for (list >::const_iterator i = c.begin(); i != c.end(); ++i) { + list c = node->node_children ("SubtitleStream"); + for (list::const_iterator i = c.begin(); i != c.end(); ++i) { _subtitle_streams.push_back (shared_ptr (new FFmpegSubtitleStream (*i))); if ((*i)->optional_number_child ("Selected")) { _subtitle_stream = _subtitle_streams.back (); @@ -67,7 +70,7 @@ FFmpegContent::FFmpegContent (shared_ptr f, shared_ptrnode_children ("AudioStream"); - for (list >::const_iterator i = c.begin(); i != c.end(); ++i) { + for (list::const_iterator i = c.begin(); i != c.end(); ++i) { _audio_streams.push_back (shared_ptr (new FFmpegAudioStream (*i))); if ((*i)->optional_number_child ("Selected")) { _audio_stream = _audio_streams.back (); @@ -75,24 +78,38 @@ FFmpegContent::FFmpegContent (shared_ptr f, shared_ptrnode_children ("Filter"); - for (list >::iterator i = c.begin(); i != c.end(); ++i) { + for (list::iterator i = c.begin(); i != c.end(); ++i) { _filters.push_back (Filter::from_id ((*i)->content ())); } - _first_video = node->optional_number_child