summaryrefslogtreecommitdiff
path: root/src/lib/single_stream_audio_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-13 18:39:56 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commit6dd3777a0074f6f97c7f7286621006a1c14376e8 (patch)
treef151d71e7d5616e87d1b1d087e4a3034d676dee7 /src/lib/single_stream_audio_content.cc
parentc5dab5fdc0edde080e408a6d24fa059e27106ef5 (diff)
Copy SingleStreamAudioContent into DCPContent and SndfileContent.
Diffstat (limited to 'src/lib/single_stream_audio_content.cc')
-rw-r--r--src/lib/single_stream_audio_content.cc87
1 files changed, 0 insertions, 87 deletions
diff --git a/src/lib/single_stream_audio_content.cc b/src/lib/single_stream_audio_content.cc
deleted file mode 100644
index b1291df45..000000000
--- a/src/lib/single_stream_audio_content.cc
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#include "single_stream_audio_content.h"
-#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> film)
- : Content (film)
- , AudioContent (film)
-{
-
-}
-
-SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> film, boost::filesystem::path p)
- : Content (film, p)
- , AudioContent (film, p)
-{
-
-}
-
-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)))
-{
-
-}
-
-void
-SingleStreamAudioContent::as_xml (xmlpp::Node* node) const
-{
- AudioContent::as_xml (node);
- node->add_child("AudioFrameRate")->add_child_text (raw_convert<string> (audio_stream()->frame_rate ()));
- audio_stream()->mapping().as_xml (node->add_child("AudioMapping"));
-}
-
-void
-SingleStreamAudioContent::take_from_audio_examiner (shared_ptr<AudioExaminer> examiner)
-{
- {
- 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);
- _audio_stream->set_mapping (m);
- }
-
- signal_changed (AudioContentProperty::AUDIO_STREAMS);
-}
-
-vector<AudioStreamPtr>
-SingleStreamAudioContent::audio_streams () const
-{
- vector<AudioStreamPtr> s;
- s.push_back (_audio_stream);
- return s;
-}
-