Lots of #include <iostream>s for Arch.
[dcpomatic.git] / src / lib / single_stream_audio_content.cc
index f978fa423150f912eee111a23a5b3e505c10c303..05b055865fbef18a414f29b744f6a7bbcce441e6 100644 (file)
 #include "audio_examiner.h"
 #include "film.h"
 #include "raw_convert.h"
+#include <libxml++/libxml++.h>
+#include <iostream>
+
+#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<const Film> f)
-       : Content (f)
-       , AudioContent (f)
+SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> film)
+       : Content (film)
+       , AudioContent (film)
 {
 
 }
 
-SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> f, boost::filesystem::path p)
-       : Content (f, p)
-       , AudioContent (f, p)
+SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> film, boost::filesystem::path p)
+       : Content (film, p)
+       , AudioContent (film, p)
 {
 
 }
 
-SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version)
-       : Content (f, node)
-       , AudioContent (f, node)
+SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
+       : Content (film, node)
+       , AudioContent (film, node)
        , _audio_stream (new AudioStream (node->number_child<int> ("AudioFrameRate"), AudioMapping (node->node_child ("AudioMapping"), version)))
 {
 
@@ -62,7 +68,7 @@ SingleStreamAudioContent::take_from_audio_examiner (shared_ptr<AudioExaminer> ex
 {
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       
+
        {
                boost::mutex::scoped_lock lm (_mutex);
                _audio_stream.reset (new AudioStream (examiner->audio_frame_rate(), examiner->audio_channels ()));
@@ -81,3 +87,10 @@ SingleStreamAudioContent::audio_streams () const
        s.push_back (_audio_stream);
        return s;
 }
+
+void
+SingleStreamAudioContent::add_properties (list<pair<string, string> >& p) const
+{
+       /* XXX: this could be better wrt audio streams */
+       p.push_back (make_pair (_("Audio channels"), raw_convert<string> (audio_stream()->channels ())));
+}