summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-03-31 16:23:01 +0100
committerCarl Hetherington <cth@carlh.net>2013-03-31 16:23:01 +0100
commit640c53f0a5f178a894ff2718bf6d74e9e977eb80 (patch)
tree111388daecf0f7e75f05c603ceecc9221c00c31c /src/lib
parentd5a4d9632b352192027700dbb1f59827216b16e8 (diff)
A little tidying up.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/film.cc20
-rw-r--r--src/lib/film.h14
2 files changed, 15 insertions, 19 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 0e57cf8eb..d22f67e67 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -87,7 +87,7 @@ int const Film::state_version = 4;
Film::Film (string d, bool must_exist)
: _use_dci_name (true)
- , _trust_content_header (true)
+ , _trust_content_headers (true)
, _dcp_content_type (0)
, _format (0)
, _scaler (Scaler::from_id ("bicubic"))
@@ -149,7 +149,7 @@ Film::Film (Film const & o)
, _directory (o._directory)
, _name (o._name)
, _use_dci_name (o._use_dci_name)
- , _trust_content_header (o._trust_content_header)
+ , _trust_content_headers (o._trust_content_headers)
, _dcp_content_type (o._dcp_content_type)
, _format (o._format)
, _crop (o._crop)
@@ -321,7 +321,7 @@ Film::analyse_audio ()
void
Film::examine_content (shared_ptr<Content> c)
{
- shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c, trust_content_header ()));
+ shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c, trust_content_headers ()));
j->Finished.connect (bind (&Film::examine_content_finished, this));
JobManager::instance()->add (j);
}
@@ -391,7 +391,7 @@ Film::write_metadata () const
f << "name " << _name << endl;
f << "use_dci_name " << _use_dci_name << endl;
// f << "content " << _content << endl;
- f << "trust_content_header " << (_trust_content_header ? "1" : "0") << endl;
+ f << "trust_content_headers " << (_trust_content_headers ? "1" : "0") << endl;
if (_dcp_content_type) {
f << "dcp_content_type " << _dcp_content_type->dci_name () << endl;
}
@@ -495,8 +495,8 @@ Film::read_metadata ()
_use_dci_name = (v == "1");
} else if (k == "content") {
// _content = v;
- } else if (k == "trust_content_header") {
- _trust_content_header = (v == "1");
+ } else if (k == "trust_content_headers") {
+ _trust_content_headers = (v == "1");
} else if (k == "dcp_content_type") {
if (version < 3) {
_dcp_content_type = DCPContentType::from_pretty_name (v);
@@ -792,16 +792,16 @@ Film::set_use_dci_name (bool u)
}
void
-Film::set_trust_content_header (bool t)
+Film::set_trust_content_headers (bool t)
{
{
boost::mutex::scoped_lock lm (_state_mutex);
- _trust_content_header = t;
+ _trust_content_headers = t;
}
- signal_changed (TRUST_CONTENT_HEADER);
+ signal_changed (TRUST_CONTENT_HEADERS);
- if (!_trust_content_header && !content().empty()) {
+ if (!_trust_content_headers && !content().empty()) {
/* We just said that we don't trust the content's header */
/* XXX */
// examine_content ();
diff --git a/src/lib/film.h b/src/lib/film.h
index afd57b7c2..928866161 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -114,7 +114,7 @@ public:
NONE,
NAME,
USE_DCI_NAME,
- TRUST_CONTENT_HEADER,
+ TRUST_CONTENT_HEADERS,
CONTENT,
DCP_CONTENT_TYPE,
FORMAT,
@@ -155,9 +155,9 @@ public:
return _use_dci_name;
}
- bool trust_content_header () const {
+ bool trust_content_headers () const {
boost::mutex::scoped_lock lm (_state_mutex);
- return _trust_content_header;
+ return _trust_content_headers;
}
std::list<boost::shared_ptr<Content> > content () const {
@@ -255,7 +255,7 @@ public:
void set_directory (std::string);
void set_name (std::string);
void set_use_dci_name (bool);
- void set_trust_content_header (bool);
+ void set_trust_content_headers (bool);
void add_content (boost::shared_ptr<Content>);
void set_dcp_content_type (DCPContentType const *);
void set_format (Format const *);
@@ -314,11 +314,7 @@ private:
bool _use_dci_name;
typedef std::list<boost::shared_ptr<Content> > ContentList;
ContentList _content;
- /** If this is true, we will believe the length specified by the content
- * file's header; if false, we will run through the whole content file
- * the first time we see it in order to obtain the length.
- */
- bool _trust_content_header;
+ bool _trust_content_headers;
/** The type of content that this Film represents (feature, trailer etc.) */
DCPContentType const * _dcp_content_type;
/** The format to present this Film in (flat, scope, etc.) */