2 Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef DCPOMATIC_SINGLE_STREAM_AUDIO_CONTENT_H
21 #define DCPOMATIC_SINGLE_STREAM_AUDIO_CONTENT_H
23 #include "audio_content.h"
27 class SingleStreamAudioContent : public AudioContent
30 SingleStreamAudioContent (boost::shared_ptr<const Film>);
31 SingleStreamAudioContent (boost::shared_ptr<const Film>, boost::filesystem::path);
32 SingleStreamAudioContent (boost::shared_ptr<const Film> f, cxml::ConstNodePtr node, int version);
34 void as_xml (xmlpp::Node* node) const;
37 int audio_channels () const {
38 boost::mutex::scoped_lock lm (_mutex);
39 return _audio_channels;
42 ContentTime audio_length () const {
43 boost::mutex::scoped_lock lm (_mutex);
47 int audio_frame_rate () const {
48 boost::mutex::scoped_lock lm (_mutex);
49 return _audio_frame_rate;
52 AudioMapping audio_mapping () const {
53 boost::mutex::scoped_lock lm (_mutex);
54 return _audio_mapping;
57 void set_audio_mapping (AudioMapping);
59 void take_from_audio_examiner (boost::shared_ptr<AudioExaminer>);
63 ContentTime _audio_length;
64 int _audio_frame_rate;
65 AudioMapping _audio_mapping;