* @brief Class holding configuration.
*/
-#ifndef DVDOMATIC_CONFIG_H
-#define DVDOMATIC_CONFIG_H
+#ifndef DCPOMATIC_CONFIG_H
+#define DCPOMATIC_CONFIG_H
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/signals2.hpp>
+#include <libdcp/metadata.h>
#include "dci_metadata.h"
class ServerDescription;
class Scaler;
class Filter;
class SoundProcessor;
+class DCPContentType;
+class Ratio;
/** @class Config
* @brief A singleton class holding configuration.
*/
-class Config
+class Config : public boost::noncopyable
{
public:
return _servers;
}
- Scaler const * reference_scaler () const {
- return _reference_scaler;
- }
-
- std::vector<Filter const *> reference_filters () const {
- return _reference_filters;
- }
-
/** @return The IP address of a TMS that we can copy DCPs to */
std::string tms_ip () const {
return _tms_ip;
return _language;
}
+ int default_still_length () const {
+ return _default_still_length;
+ }
+
+ Ratio const * default_container () const {
+ return _default_container;
+ }
+
+ DCPContentType const * default_dcp_content_type () const {
+ return _default_dcp_content_type;
+ }
+
+ libdcp::XMLMetadata dcp_metadata () const {
+ return _dcp_metadata;
+ }
+
+ int default_j2k_bandwidth () const {
+ return _default_j2k_bandwidth;
+ }
+
/** @param n New number of local encoding threads */
void set_num_local_encoding_threads (int n) {
_num_local_encoding_threads = n;
void unset_language () {
_language = boost::none;
}
+
+ void set_default_still_length (int s) {
+ _default_still_length = s;
+ }
+
+ void set_default_container (Ratio const * c) {
+ _default_container = c;
+ }
+
+ void set_default_dcp_content_type (DCPContentType const * t) {
+ _default_dcp_content_type = t;
+ }
+
+ void set_dcp_metadata (libdcp::XMLMetadata m) {
+ _dcp_metadata = m;
+ }
+
+ void set_default_j2k_bandwidth (int b) {
+ _default_j2k_bandwidth = b;
+ }
void write () const;
private:
Config ();
- std::string file () const;
+ std::string file (bool) const;
+ void read ();
+ void read_old_metadata ();
/** number of threads to use for J2K encoding on the local machine */
int _num_local_encoding_threads;
/** Default DCI metadata for newly-created Films */
DCIMetadata _default_dci_metadata;
boost::optional<std::string> _language;
+ int _default_still_length;
+ Ratio const * _default_container;
+ DCPContentType const * _default_dcp_content_type;
+ libdcp::XMLMetadata _dcp_metadata;
+ int _default_j2k_bandwidth;
/** Singleton instance, or 0 */
static Config* _instance;