X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsingle_stream_audio_content.cc;h=4c59420cbfe16b3c350e13235ff01926dbde1251;hb=5b3e3df6c9352e31dd932a5af215eabbf2cf27c8;hp=cf2dcc1bd6210a9e78d4b5ead98c8bbb968aeadf;hpb=e60bb3e51bd1508b149e6b8f6608f09b5196ae26;p=dcpomatic.git diff --git a/src/lib/single_stream_audio_content.cc b/src/lib/single_stream_audio_content.cc index cf2dcc1bd..4c59420cb 100644 --- a/src/lib/single_stream_audio_content.cc +++ b/src/lib/single_stream_audio_content.cc @@ -21,10 +21,16 @@ #include "audio_examiner.h" #include "film.h" #include "raw_convert.h" +#include +#include + +#include "i18n.h" using std::string; using std::cout; using std::vector; +using std::list; +using std::pair; using boost::shared_ptr; SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr film) @@ -60,14 +66,11 @@ SingleStreamAudioContent::as_xml (xmlpp::Node* node) const void SingleStreamAudioContent::take_from_audio_examiner (shared_ptr examiner) { - shared_ptr film = _film.lock (); - DCPOMATIC_ASSERT (film); - { boost::mutex::scoped_lock lm (_mutex); _audio_stream.reset (new AudioStream (examiner->audio_frame_rate(), examiner->audio_channels ())); AudioMapping m = _audio_stream->mapping (); - film->make_audio_mapping_default (m); + film()->make_audio_mapping_default (m); _audio_stream->set_mapping (m); } @@ -81,3 +84,10 @@ SingleStreamAudioContent::audio_streams () const s.push_back (_audio_stream); return s; } + +void +SingleStreamAudioContent::add_properties (list >& p) const +{ + /* XXX: this could be better wrt audio streams */ + p.push_back (make_pair (_("Audio channels"), raw_convert (audio_stream()->channels ()))); +}