Move make_default into AudioMapping.
[dcpomatic.git] / src / lib / dcp_content.cc
index 62284e4333e06a1ceb62bfaebc99fd83a41a7ab4..c89eadc3c97d89a49f6b133ea28462b3777c16e1 100644 (file)
@@ -29,6 +29,7 @@
 #include "compose.hpp"
 #include "dcp_decoder.h"
 #include "log.h"
+#include "dcpomatic_log.h"
 #include "text_content.h"
 #include <dcp/dcp.h>
 #include <dcp/raw_convert.h>
@@ -64,8 +65,6 @@ int const DCPContentProperty::NAME               = 605;
 int const DCPContentProperty::TEXTS              = 606;
 int const DCPContentProperty::CPL                = 607;
 
-#define LOG_GENERAL(...) dcpomatic_log->log(String::compose(__VA_ARGS__), LogEntry::TYPE_GENERAL);
-
 DCPContent::DCPContent (boost::filesystem::path p)
        : _encrypted (false)
        , _needs_assets (false)
@@ -213,7 +212,7 @@ DCPContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job)
                AudioStreamPtr as (new AudioStream (examiner->audio_frame_rate(), examiner->audio_length(), examiner->audio_channels()));
                audio->set_stream (as);
                AudioMapping m = as->mapping ();
-               film->make_audio_mapping_default (m);
+               m.make_default (film->audio_processor());
                as->set_mapping (m);
        }
 
@@ -342,7 +341,7 @@ DCPContent::full_length (shared_ptr<const Film> film) const
        if (!video) {
                return DCPTime();
        }
-       FrameRateChange const frc (active_video_frame_rate(film), film->video_frame_rate());
+       FrameRateChange const frc (film, shared_from_this());
        return DCPTime::from_frames (llrint(video->length() * frc.factor()), film->video_frame_rate());
 }