X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fffmpeg_content.cc;h=d5fd592d6c9a11cf726cf596c4eea01916aa3a1c;hp=bb4e022308dc9882dff57d5a0959d0a014cf9cab;hb=68f662ac50a00ad986e3bd258c3f7daac374ab26;hpb=f4030653da8f5a0b3daebe640f485b3daf9ef091 diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index bb4e02230..d5fd592d6 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -106,7 +106,7 @@ FFmpegContent::FFmpegContent (shared_ptr f, vector ref = dynamic_pointer_cast (c[0]); - assert (ref); + DCPOMATIC_ASSERT (ref); for (size_t i = 0; i < c.size(); ++i) { shared_ptr fc = dynamic_pointer_cast (c[i]); @@ -163,17 +163,17 @@ FFmpegContent::as_xml (xmlpp::Node* node) const } void -FFmpegContent::examine (shared_ptr job) +FFmpegContent::examine (shared_ptr job, bool calculate_digest) { job->set_progress_unknown (); - Content::examine (job); + Content::examine (job, calculate_digest); - shared_ptr examiner (new FFmpegExaminer (shared_from_this ())); + shared_ptr examiner (new FFmpegExaminer (shared_from_this (), job)); take_from_video_examiner (examiner); shared_ptr film = _film.lock (); - assert (film); + DCPOMATIC_ASSERT (film); { boost::mutex::scoped_lock lm (_mutex); @@ -228,21 +228,6 @@ FFmpegContent::technical_summary () const ); } -string -FFmpegContent::information () const -{ - if (video_length() == ContentTime (0) || video_frame_rate() == 0) { - return ""; - } - - 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 (); - - return s.str (); -} - void FFmpegContent::set_subtitle_stream (shared_ptr s) { @@ -315,7 +300,7 @@ DCPTime FFmpegContent::full_length () const { shared_ptr film = _film.lock (); - assert (film); + DCPOMATIC_ASSERT (film); return DCPTime (video_length_after_3d_combine(), FrameRateChange (video_frame_rate (), film->video_frame_rate ())); } @@ -382,7 +367,7 @@ FFmpegContent::audio_analysis_path () const */ boost::filesystem::path p = film->audio_analysis_dir (); - string name = digest (); + string name = digest().get_value_or ("X"); if (audio_stream ()) { name += "_" + audio_stream()->identifier (); }