projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into fix-early-audio-take2
[dcpomatic.git]
/
src
/
lib
/
format.h
diff --git
a/src/lib/format.h
b/src/lib/format.h
index 35dd4fb856ac4ed86e8ba31c7d503e63c5e97eb6..783ff25ce455b31dd207fa4f37026d8fee132a1d 100644
(file)
--- a/
src/lib/format.h
+++ b/
src/lib/format.h
@@
-31,7
+31,7
@@
class Film;
class Format
{
public:
class Format
{
public:
- Format (Size dcp, std::string id, std::string n, std::string d)
+ Format (
libdcp::
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)
@@
-41,18
+41,21
@@
public:
/** @return the aspect ratio multiplied by 100
* (e.g. 239 for Cinemascope 2.39:1)
*/
/** @return the aspect ratio multiplied by 100
* (e.g. 239 for Cinemascope 2.39:1)
*/
- virtual int ratio_as_integer (
Film const *
f) const = 0;
+ virtual int ratio_as_integer (
boost::shared_ptr<const Film>
f) const = 0;
/** @return the ratio as a floating point number */
/** @return the ratio as a floating point number */
- virtual float ratio_as_float (
Film const *
f) const = 0;
+ virtual float ratio_as_float (
boost::shared_ptr<const Film>
f) const = 0;
- int dcp_padding (Film const * f) const;
+ /** @return the ratio of the container (including any padding) as a floating point number */
+ float container_ratio_as_float () const;
+
+ int dcp_padding (boost::shared_ptr<const Film> f) const;
/** @return size in pixels of the images that we should
* put in a DCP for this ratio. This size will not correspond
* to the ratio when we are doing things like 16:9 in a Flat frame.
*/
/** @return size in pixels of the images that we should
* put in a DCP for this ratio. This size will not correspond
* to the ratio when we are doing things like 16:9 in a Flat frame.
*/
- Size dcp_size () const {
+
libdcp::
Size dcp_size () const {
return _dcp_size;
}
return _dcp_size;
}
@@
-81,11
+84,11
@@
public:
static void setup_formats ();
protected:
static void setup_formats ();
protected:
- /** Size in pixels of the images that we should
+ /**
libdcp::
Size in pixels of the images that we should
* put in a DCP for this ratio. This size will not correspond
* to the ratio when we are doing things like 16:9 in a Flat frame.
*/
* put in a DCP for this ratio. This size will not correspond
* to the ratio when we are doing things like 16:9 in a Flat frame.
*/
- Size _dcp_size;
+
libdcp::
Size _dcp_size;
/** id for use in metadata */
std::string _id;
/** nickname (e.g. Flat, Scope) */
/** id for use in metadata */
std::string _id;
/** nickname (e.g. Flat, Scope) */
@@
-104,13
+107,13
@@
private:
class FixedFormat : public Format
{
public:
class FixedFormat : public Format
{
public:
- FixedFormat (int, Size, std::string, std::string, std::string);
+ FixedFormat (int,
libdcp::
Size, std::string, std::string, std::string);
- int ratio_as_integer (
Film const *
) const {
+ int ratio_as_integer (
boost::shared_ptr<const Film>
) const {
return _ratio;
}
return _ratio;
}
- float ratio_as_float (
Film const *
) const {
+ float ratio_as_float (
boost::shared_ptr<const Film>
) const {
return _ratio / 100.0;
}
return _ratio / 100.0;
}
@@
-125,10
+128,10
@@
private:
class VariableFormat : public Format
{
public:
class VariableFormat : public Format
{
public:
- VariableFormat (Size, std::string, std::string, std::string);
+ VariableFormat (
libdcp::
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 (
boost::shared_ptr<const Film>
f) const;
+ float ratio_as_float (
boost::shared_ptr<const Film>
f) const;
std::string name () const;
};
std::string name () const;
};