All audio content should resample if the output frame rate and content
[dcpomatic.git] / src / lib / ffmpeg_content.cc
index f810d53be21374e27cd3e929214d04130fcb98b6..4ea6dbc6ac4c23f9c3f2cefd747848968b8a3749 100644 (file)
@@ -34,6 +34,8 @@ extern "C" {
 
 #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;
@@ -171,7 +173,7 @@ FFmpegContent::examine (shared_ptr<Job> job)
 
        VideoContent::Frame video_length = 0;
        video_length = examiner->video_length ();
-       film->log()->log (String::compose ("Video length obtained from header as %1 frames", video_length));
+       LOG_GENERAL ("Video length obtained from header as %1 frames", video_length);
 
        {
                boost::mutex::scoped_lock lm (_mutex);
@@ -307,30 +309,6 @@ FFmpegContent::content_audio_frame_rate () const
        return _audio_stream->frame_rate;
 }
 
-int
-FFmpegContent::output_audio_frame_rate () const
-{
-       shared_ptr<const Film> film = _film.lock ();
-       assert (film);
-       
-       /* Resample to a DCI-approved sample rate */
-       double t = dcp_audio_frame_rate (content_audio_frame_rate ());
-
-       FrameRateConversion frc (video_frame_rate(), film->video_frame_rate());
-
-       /* Compensate if the DCP is being run at a different frame rate
-          to the source; that is, if the video is run such that it will
-          look different in the DCP compared to the source (slower or faster).
-          skip/repeat doesn't come into effect here.
-       */
-
-       if (frc.change_speed) {
-               t *= video_frame_rate() * frc.factor() / film->video_frame_rate();
-       }
-
-       return rint (t);
-}
-
 bool
 operator== (FFmpegStream const & a, FFmpegStream const & b)
 {