Merge master.
[dcpomatic.git] / src / lib / writer.cc
index b08b9caf18a0d7f3f7166f959662c0dd16fbffc9..7258826ba1774f5a9fd3e32656bb32a2a761edd3 100644 (file)
 #include <libdcp/sound_asset.h>
 #include <libdcp/picture_frame.h>
 #include <libdcp/reel.h>
+#include <libdcp/dcp.h>
 #include "writer.h"
 #include "compose.hpp"
 #include "film.h"
 #include "format.h"
 #include "log.h"
 #include "dcp_video_frame.h"
-#include "playlist.h"
+#include "dcp_content_type.h"
+#include "player.h"
+#include "audio_mapping.h"
 
 #include "i18n.h"
 
@@ -75,15 +78,13 @@ Writer::Writer (shared_ptr<Film> f)
 
        _picture_asset_writer = _picture_asset->start_write (_first_nonexistant_frame > 0);
 
-       AudioMapping m (_film->audio_channels ());
-       
-       if (m.dcp_channels() > 0) {
+       if (_film->audio_channels() > 0) {
                _sound_asset.reset (
                        new libdcp::SoundAsset (
                                _film->dir (_film->dcp_name()),
                                N_("audio.mxf"),
                                _film->dcp_frame_rate (),
-                               m.dcp_channels (),
+                               _film->audio_mapping().dcp_channels (),
                                dcp_audio_sample_rate (_film->audio_frame_rate())
                                )
                        );