projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use more local methods rather than calling out to Film in the Decoder.
[dcpomatic.git]
/
src
/
lib
/
format.h
diff --git
a/src/lib/format.h
b/src/lib/format.h
index fd6cdbece31b1ffb51db910fa77493a98228aa38..35dd4fb856ac4ed86e8ba31c7d503e63c5e97eb6 100644
(file)
--- a/
src/lib/format.h
+++ b/
src/lib/format.h
@@
-31,10
+31,11
@@
class Film;
class Format
{
public:
class Format
{
public:
- Format (Size dcp, std::string id, std::string n)
+ Format (Size dcp, std::string id, std::string n
, std::string d
)
: _dcp_size (dcp)
, _id (id)
, _nickname (n)
: _dcp_size (dcp)
, _id (id)
, _nickname (n)
+ , _dci_name (d)
{}
/** @return the aspect ratio multiplied by 100
{}
/** @return the aspect ratio multiplied by 100
@@
-67,6
+68,10
@@
public:
return _nickname;
}
return _nickname;
}
+ std::string dci_name () const {
+ return _dci_name;
+ }
+
std::string as_metadata () const;
static Format const * from_nickname (std::string n);
std::string as_metadata () const;
static Format const * from_nickname (std::string n);
@@
-85,6
+90,7
@@
protected:
std::string _id;
/** nickname (e.g. Flat, Scope) */
std::string _nickname;
std::string _id;
/** nickname (e.g. Flat, Scope) */
std::string _nickname;
+ std::string _dci_name;
private:
/** all available formats */
private:
/** all available formats */
@@
-98,7
+104,7
@@
private:
class FixedFormat : public Format
{
public:
class FixedFormat : public Format
{
public:
- FixedFormat (int, Size, std::string, std::string);
+ FixedFormat (int, Size, std::string, std::string
, std::string
);
int ratio_as_integer (Film const *) const {
return _ratio;
int ratio_as_integer (Film const *) const {
return _ratio;
@@
-119,7
+125,7
@@
private:
class VariableFormat : public Format
{
public:
class VariableFormat : public Format
{
public:
- VariableFormat (Size, std::string, std::string);
+ VariableFormat (Size, std::string, std::string
, std::string
);
int ratio_as_integer (Film const * f) const;
float ratio_as_float (Film const * f) const;
int ratio_as_integer (Film const * f) const;
float ratio_as_float (Film const * f) const;