--- /dev/null
+/*
+ Copyright (C) 2012-2014 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.
+
+*/
+
+/** @file src/sound_processor.cc
+ * @brief CinemaSoundProcessor class.
+ */
+
+#include <iostream>
+#include <cassert>
+#include "cinema_sound_processor.h"
+#include "dolby_cp750.h"
+
+using namespace std;
+
+vector<CinemaSoundProcessor const *> CinemaSoundProcessor::_cinema_sound_processors;
+
+/** @param i Our id.
+ * @param n User-visible name.
+ */
+CinemaSoundProcessor::CinemaSoundProcessor (string i, string n)
+ : _id (i)
+ , _name (n)
+{
+
+}
+
+/** @return All available sound processors */
+vector<CinemaSoundProcessor const *>
+CinemaSoundProcessor::all ()
+{
+ return _cinema_sound_processors;
+}
+
+/** Set up the static _sound_processors vector; must be called before from_*
+ * methods are used.
+ */
+void
+CinemaSoundProcessor::setup_cinema_sound_processors ()
+{
+ _cinema_sound_processors.push_back (new DolbyCP750);
+}
+
+/** @param id One of our ids.
+ * @return Corresponding sound processor, or 0.
+ */
+CinemaSoundProcessor const *
+CinemaSoundProcessor::from_id (string id)
+{
+ vector<CinemaSoundProcessor const *>::iterator i = _cinema_sound_processors.begin ();
+ while (i != _cinema_sound_processors.end() && (*i)->id() != id) {
+ ++i;
+ }
+
+ if (i == _cinema_sound_processors.end ()) {
+ return 0;
+ }
+
+ return *i;
+}
+
+/** @param s A sound processor from our static list.
+ * @return Index of the sound processor with the list, or -1.
+ */
+int
+CinemaSoundProcessor::as_index (CinemaSoundProcessor const * s)
+{
+ vector<CinemaSoundProcessor*>::size_type i = 0;
+ while (i < _cinema_sound_processors.size() && _cinema_sound_processors[i] != s) {
+ ++i;
+ }
+
+ if (i == _cinema_sound_processors.size ()) {
+ return -1;
+ }
+
+ return i;
+}
+
+/** @param i An index returned from as_index().
+ * @return Corresponding sound processor.
+ */
+CinemaSoundProcessor const *
+CinemaSoundProcessor::from_index (int i)
+{
+ assert (i <= int(_cinema_sound_processors.size ()));
+ return _cinema_sound_processors[i];
+}
--- /dev/null
+/*
+ Copyright (C) 2012-2014 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.
+
+*/
+
+/** @file src/cinema_sound_processor.h
+ * @brief CinemaSoundProcessor class
+ */
+
+#ifndef DCPOMATIC_CINEMA_SOUND_PROCESSOR_H
+#define DCPOMATIC_CINEMA_SOUND_PROCESSOR_H
+
+#include <string>
+#include <vector>
+#include <boost/utility.hpp>
+
+/** @class CinemaSoundProcessor
+ * @brief Class to describe a cimema's sound processor.
+ *
+ * In other words, the box in the rack that handles sound decoding and processing
+ * in a cinema.
+ */
+class CinemaSoundProcessor : public boost::noncopyable
+{
+public:
+ CinemaSoundProcessor (std::string i, std::string n);
+
+ virtual float db_for_fader_change (float from, float to) const = 0;
+
+ /** @return id for our use */
+ std::string id () const {
+ return _id;
+ }
+
+ /** @return user-visible name for this sound processor */
+ std::string name () const {
+ return _name;
+ }
+
+ static std::vector<CinemaSoundProcessor const *> all ();
+ static void setup_cinema_sound_processors ();
+ static CinemaSoundProcessor const * from_id (std::string id);
+ static CinemaSoundProcessor const * from_index (int);
+ static int as_index (CinemaSoundProcessor const *);
+
+private:
+ /** id for our use */
+ std::string _id;
+ /** user-visible name for this sound processor */
+ std::string _name;
+
+ /** sll available cinema sound processors */
+ static std::vector<CinemaSoundProcessor const *> _cinema_sound_processors;
+};
+
+#endif
#include "filter.h"
#include "ratio.h"
#include "dcp_content_type.h"
-#include "sound_processor.h"
+#include "cinema_sound_processor.h"
#include "colour_conversion.h"
#include "cinema.h"
#include "util.h"
, _server_port_base (6192)
, _use_any_servers (true)
, _tms_path (".")
- , _sound_processor (SoundProcessor::from_id (N_("dolby_cp750")))
+ , _cinema_sound_processor (CinemaSoundProcessor::from_id (N_("dolby_cp750")))
, _allow_any_dcp_frame_rate (false)
, _default_still_length (10)
, _default_container (Ratio::from_id ("185"))
c = f.optional_string_child ("SoundProcessor");
if (c) {
- _sound_processor = SoundProcessor::from_id (c.get ());
+ _cinema_sound_processor = CinemaSoundProcessor::from_id (c.get ());
+ }
+ c = f.optional_string_child ("CinemaSoundProcessor");
+ if (c) {
+ _cinema_sound_processor = CinemaSoundProcessor::from_id (c.get ());
}
_language = f.optional_string_child ("Language");
} else if (k == N_("tms_password")) {
_tms_password = v;
} else if (k == N_("sound_processor")) {
- _sound_processor = SoundProcessor::from_id (v);
+ _cinema_sound_processor = CinemaSoundProcessor::from_id (v);
} else if (k == "language") {
_language = v;
} else if (k == "default_container") {
root->add_child("TMSPath")->add_child_text (_tms_path);
root->add_child("TMSUser")->add_child_text (_tms_user);
root->add_child("TMSPassword")->add_child_text (_tms_password);
- if (_sound_processor) {
- root->add_child("SoundProcessor")->add_child_text (_sound_processor->id ());
+ if (_cinema_sound_processor) {
+ root->add_child("CinemaSoundProcessor")->add_child_text (_cinema_sound_processor->id ());
}
if (_language) {
root->add_child("Language")->add_child_text (_language.get());
class ServerDescription;
class Scaler;
class Filter;
-class SoundProcessor;
+class CinemaSoundProcessor;
class DCPContentType;
class Ratio;
class Cinema;
return _tms_password;
}
- /** @return The sound processor that we are using */
- SoundProcessor const * sound_processor () const {
- return _sound_processor;
+ /** @return The cinema sound processor that we are using */
+ CinemaSoundProcessor const * cinema_sound_processor () const {
+ return _cinema_sound_processor;
}
std::list<boost::shared_ptr<Cinema> > cinemas () const {
std::string _tms_user;
/** Password to log into the TMS with */
std::string _tms_password;
- /** Our sound processor */
- SoundProcessor const * _sound_processor;
+ /** Our cinema sound processor */
+ CinemaSoundProcessor const * _cinema_sound_processor;
std::list<int> _allowed_dcp_frame_rates;
/** Allow any video frame rate for the DCP; if true, overrides _allowed_dcp_frame_rates */
bool _allow_any_dcp_frame_rate;
using namespace std;
DolbyCP750::DolbyCP750 ()
- : SoundProcessor ("dolby_cp750", _("Dolby CP650 and CP750"))
+ : CinemaSoundProcessor ("dolby_cp750", _("Dolby CP650 and CP750"))
{
}
*/
-#include "sound_processor.h"
+#include "cinema_sound_processor.h"
-class DolbyCP750 : public SoundProcessor
+class DolbyCP750 : public CinemaSoundProcessor
{
public:
DolbyCP750 ();
+++ /dev/null
-/*
- Copyright (C) 2012 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.
-
-*/
-
-/** @file src/sound_processor.cc
- * @brief A class to describe a sound processor.
- */
-
-#include <iostream>
-#include <cassert>
-#include "sound_processor.h"
-#include "dolby_cp750.h"
-
-using namespace std;
-
-vector<SoundProcessor const *> SoundProcessor::_sound_processors;
-
-/** @param i Our id.
- * @param n User-visible name.
- */
-SoundProcessor::SoundProcessor (string i, string n)
- : _id (i)
- , _name (n)
-{
-
-}
-
-/** @return All available sound processors */
-vector<SoundProcessor const *>
-SoundProcessor::all ()
-{
- return _sound_processors;
-}
-
-/** Set up the static _sound_processors vector; must be called before from_*
- * methods are used.
- */
-void
-SoundProcessor::setup_sound_processors ()
-{
- _sound_processors.push_back (new DolbyCP750);
-}
-
-/** @param id One of our ids.
- * @return Corresponding sound processor, or 0.
- */
-SoundProcessor const *
-SoundProcessor::from_id (string id)
-{
- vector<SoundProcessor const *>::iterator i = _sound_processors.begin ();
- while (i != _sound_processors.end() && (*i)->id() != id) {
- ++i;
- }
-
- if (i == _sound_processors.end ()) {
- return 0;
- }
-
- return *i;
-}
-
-/** @param s A sound processor from our static list.
- * @return Index of the sound processor with the list, or -1.
- */
-int
-SoundProcessor::as_index (SoundProcessor const * s)
-{
- vector<SoundProcessor*>::size_type i = 0;
- while (i < _sound_processors.size() && _sound_processors[i] != s) {
- ++i;
- }
-
- if (i == _sound_processors.size ()) {
- return -1;
- }
-
- return i;
-}
-
-/** @param i An index returned from as_index().
- * @return Corresponding sound processor.
- */
-SoundProcessor const *
-SoundProcessor::from_index (int i)
-{
- assert (i <= int(_sound_processors.size ()));
- return _sound_processors[i];
-}
+++ /dev/null
-/*
- Copyright (C) 2012 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.
-
-*/
-
-/** @file src/sound_processor.h
- * @brief A class to describe a sound processor.
- */
-
-#ifndef DCPOMATIC_SOUND_PROCESSOR_H
-#define DCPOMATIC_SOUND_PROCESSOR_H
-
-#include <string>
-#include <vector>
-#include <boost/utility.hpp>
-
-/** @class SoundProcessor
- * @brief Class to describe a sound processor.
- */
-class SoundProcessor : public boost::noncopyable
-{
-public:
- SoundProcessor (std::string i, std::string n);
-
- virtual float db_for_fader_change (float from, float to) const = 0;
-
- /** @return id for our use */
- std::string id () const {
- return _id;
- }
-
- /** @return user-visible name for this sound processor */
- std::string name () const {
- return _name;
- }
-
- static std::vector<SoundProcessor const *> all ();
- static void setup_sound_processors ();
- static SoundProcessor const * from_id (std::string id);
- static SoundProcessor const * from_index (int);
- static int as_index (SoundProcessor const *);
-
-private:
- /** id for our use */
- std::string _id;
- /** user-visible name for this sound processor */
- std::string _name;
-
- /** sll available sound processors */
- static std::vector<SoundProcessor const *> _sound_processors;
-};
-
-#endif
#include "scaler.h"
#include "dcp_content_type.h"
#include "filter.h"
-#include "sound_processor.h"
+#include "cinema_sound_processor.h"
#include "config.h"
#include "ratio.h"
#include "job.h"
DCPContentType::setup_dcp_content_types ();
Scaler::setup_scalers ();
Filter::setup_filters ();
- SoundProcessor::setup_sound_processors ();
+ CinemaSoundProcessor::setup_cinema_sound_processors ();
AudioProcessor::setup_audio_processors ();
ui_thread = boost::this_thread::get_id ();
audio_mapping.cc
audio_processor.cc
cinema.cc
+ cinema_sound_processor.cc
colour_conversion.cc
config.cc
content.cc
single_stream_audio_content.cc
sndfile_content.cc
sndfile_decoder.cc
- sound_processor.cc
+ sox_audio_processor.cc
subrip.cc
subrip_content.cc
subrip_decoder.cc
#include <boost/lexical_cast.hpp>
#include <wx/spinctrl.h>
#include "lib/config.h"
-#include "lib/sound_processor.h"
#include "lib/ffmpeg_content.h"
#include "lib/ffmpeg_audio_stream.h"
#include "lib/audio_processor.h"
+#include "lib/cinema_sound_processor.h"
#include "audio_dialog.h"
#include "audio_panel.h"
#include "audio_mapping_view.h"
}
_gain->wrapped()->SetValue (
- Config::instance()->sound_processor()->db_for_fader_change (
+ Config::instance()->cinema_sound_processor()->db_for_fader_change (
d->wanted_fader (),
d->actual_fader ()
)
#include "lib/ffmpeg_content.h"
#include "lib/sndfile_content.h"
#include "lib/dcp_content_type.h"
-#include "lib/sound_processor.h"
#include "lib/scaler.h"
#include "lib/playlist.h"
#include "lib/content.h"