diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-24 14:51:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-24 14:51:43 +0100 |
| commit | 2dce4be6728fcb58170c7c8ef824c674d7462f63 (patch) | |
| tree | 9b0bcc394eaecde25a7747e9ed7bfa4bc6914e61 /src/lib/format.h | |
| parent | 5ece2775cee162d7523a5318663a6dd8f7e52651 (diff) | |
Remove unused bits of Format.
Diffstat (limited to 'src/lib/format.h')
| -rw-r--r-- | src/lib/format.h | 53 |
1 files changed, 5 insertions, 48 deletions
diff --git a/src/lib/format.h b/src/lib/format.h index 29347a3fd..06423d2b1 100644 --- a/src/lib/format.h +++ b/src/lib/format.h @@ -31,21 +31,14 @@ class Film; class Format { public: - Format (libdcp::Size dcp, std::string id, std::string n, std::string d) + Format (libdcp::Size dcp, std::string id, std::string n) : _dcp_size (dcp) , _id (id) , _nickname (n) - , _dci_name (d) {} - /** @return the ratio of the container (including any padding) */ - float container_ratio () const; - - int dcp_padding (boost::shared_ptr<const Film>) 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. + * put in a DCP for this format. */ libdcp::Size dcp_size () const { return _dcp_size; @@ -56,17 +49,13 @@ public: } /** @return Full name to present to the user */ - virtual std::string name () const = 0; + std::string name () const; /** @return Nickname (e.g. Flat, Scope) */ std::string nickname () const { return _nickname; } - std::string dci_name () const { - return _dci_name; - } - static Format const * from_nickname (std::string n); static Format const * from_id (std::string i); static std::vector<Format const *> all (); @@ -74,50 +63,18 @@ public: protected: /** @return the ratio */ - virtual float ratio (boost::shared_ptr<const Film> f) const = 0; + float ratio () const; /** 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 format. */ libdcp::Size _dcp_size; /** id for use in metadata */ std::string _id; /** nickname (e.g. Flat, Scope) */ std::string _nickname; - std::string _dci_name; private: /** all available formats */ static std::vector<Format const *> _formats; }; - -/** @class FixedFormat - * @brief Class to describe a format whose ratio is fixed regardless - * of source size. - */ -class FixedFormat : public Format -{ -public: - FixedFormat (float, libdcp::Size, std::string, std::string, std::string); - - float ratio (boost::shared_ptr<const Film>) const { - return _ratio; - } - - std::string name () const; - -private: - - float _ratio; -}; - -class VariableFormat : public Format -{ -public: - VariableFormat (libdcp::Size, std::string, std::string, std::string); - - float ratio (boost::shared_ptr<const Film> f) const; - - std::string name () const; -}; |
