X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_content.h;h=eec67b2010a29fd723e8a9c1fb0848e040e28008;hb=5302f2cda0afd16d714ab898549c7cd278196473;hp=cfce3fb835c5ae75c52a6b63a011c5d4ecdf7458;hpb=8008b81c0ccee843263e2a648707b71cc3ae081f;p=dcpomatic.git diff --git a/src/lib/audio_content.h b/src/lib/audio_content.h index cfce3fb83..eec67b201 100644 --- a/src/lib/audio_content.h +++ b/src/lib/audio_content.h @@ -1,19 +1,20 @@ /* Copyright (C) 2013-2016 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic 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, + DCP-o-matic 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. + along with DCP-o-matic. If not, see . */ @@ -37,18 +38,17 @@ public: static int const STREAMS; static int const GAIN; static int const DELAY; - static int const VIDEO_FRAME_RATE; }; class AudioContent : public ContentPart { public: - AudioContent (Content* parent, boost::shared_ptr); - AudioContent (Content* parent, boost::shared_ptr, cxml::ConstNodePtr); - AudioContent (Content* parent, boost::shared_ptr, std::vector >); + explicit AudioContent (Content* parent); + AudioContent (Content* parent, std::vector >); void as_xml (xmlpp::Node *) const; std::string technical_summary () const; + void take_settings_from (boost::shared_ptr c); AudioMapping mapping () const; void set_mapping (AudioMapping); @@ -69,9 +69,6 @@ public: return _delay; } - double video_frame_rate () const; - void set_video_frame_rate (double r); - std::string processing_description () const; std::vector streams () const { @@ -86,13 +83,19 @@ public: void add_properties (std::list &) const; + void modify_position (DCPTime& pos) const; + void modify_trim_start (ContentTime& pos) const; + + static boost::shared_ptr from_xml (Content* parent, cxml::ConstNodePtr, int version); + private: + AudioContent (Content* parent, cxml::ConstNodePtr); + /** Gain to apply to audio in dB */ double _gain; /** Delay to apply to audio (positive moves audio later) in milliseconds */ int _delay; - boost::optional _video_frame_rate; std::vector _streams; };