X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_content.cc;h=bb4e022308dc9882dff57d5a0959d0a014cf9cab;hb=39029279954b1f346d3ba28ec12c58211bfa7436;hp=9b2bfc60649c6b9e58b11905ed3216063e6148df;hpb=a8af9a0b57b853b8a8cd8fa35adb3fc967d59ee7;p=dcpomatic.git diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 9b2bfc606..bb4e02230 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -34,13 +34,13 @@ extern "C" { #include "log.h" #include "exceptions.h" #include "frame_rate_change.h" +#include "safe_stringstream.h" #include "i18n.h" #define LOG_GENERAL(...) film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); using std::string; -using std::stringstream; using std::vector; using std::list; using std::cout; @@ -110,7 +110,7 @@ FFmpegContent::FFmpegContent (shared_ptr f, vector fc = dynamic_pointer_cast (c[i]); - if (fc->subtitle_use() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) { + if (fc->use_subtitles() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) { throw JoinError (_("Content to be joined must use the same subtitle stream.")); } @@ -235,7 +235,7 @@ FFmpegContent::information () const return ""; } - stringstream s; + SafeStringStream s; s << String::compose (_("%1 frames; %2 frames per second"), video_length_after_3d_combine().frames (video_frame_rate()), video_frame_rate()) << "\n"; s << VideoContent::information (); @@ -284,7 +284,7 @@ FFmpegContent::audio_channels () const return 0; } - return _audio_stream->channels; + return _audio_stream->channels (); } int @@ -296,7 +296,7 @@ FFmpegContent::audio_frame_rate () const return 0; } - return _audio_stream->frame_rate; + return _audio_stream->frame_rate (); } bool @@ -328,7 +328,7 @@ FFmpegContent::audio_mapping () const return AudioMapping (); } - return _audio_stream->mapping; + return _audio_stream->mapping (); } void @@ -345,14 +345,14 @@ FFmpegContent::set_filters (vector const & filters) void FFmpegContent::set_audio_mapping (AudioMapping m) { - audio_stream()->mapping = m; + audio_stream()->set_mapping (m); AudioContent::set_audio_mapping (m); } string FFmpegContent::identifier () const { - stringstream s; + SafeStringStream s; s << VideoContent::identifier();