diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-05-31 22:20:30 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-31 22:20:30 +0100 |
| commit | 291e2fe2e7df95019feba8097b68b31ec64be794 (patch) | |
| tree | cdac55d0ed47721190529b3443664bd3f64aa862 /src/lib | |
| parent | 7d9321ff829498c2c87d924a9b660acbfdafa6b3 (diff) | |
Restore some missing stuff to the content properties dialogue.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/content.cc | 10 | ||||
| -rw-r--r-- | src/lib/content.h | 2 | ||||
| -rw-r--r-- | src/lib/dcp_content.cc | 2 | ||||
| -rw-r--r-- | src/lib/image_content.cc | 10 | ||||
| -rw-r--r-- | src/lib/image_content.h | 3 |
5 files changed, 25 insertions, 2 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index 107a95644..7afbf924f 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -339,3 +339,13 @@ Content::active_video_frame_rate () const DCPOMATIC_ASSERT (film); return film->active_frame_rate_change(position()).source; } + +void +Content::add_properties (list<UserProperty>& p) const +{ + p.push_back (UserProperty (_("General"), _("Filename"), path(0).string ())); + + if (_video_frame_rate) { + p.push_back (UserProperty (_("General"), _("Video frame rate"), raw_convert<string> (_video_frame_rate.get(), 5), _("frames per second"))); + } +} diff --git a/src/lib/content.h b/src/lib/content.h index ea2aaf8d4..6b647790f 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -185,7 +185,7 @@ public: protected: - virtual void add_properties (std::list<UserProperty> &) const {} + virtual void add_properties (std::list<UserProperty> &) const; boost::weak_ptr<const Film> _film; diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index a01f0effd..d23b4e351 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -275,6 +275,8 @@ DCPContent::directory () const void DCPContent::add_properties (list<UserProperty>& p) const { + Content::add_properties (p); + video->add_properties (p); audio->add_properties (p); } diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc index e26eed3d0..d4e736771 100644 --- a/src/lib/image_content.cc +++ b/src/lib/image_content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -37,6 +37,7 @@ using std::string; using std::cout; +using std::list; using boost::shared_ptr; ImageContent::ImageContent (shared_ptr<const Film> film, boost::filesystem::path p) @@ -169,3 +170,10 @@ ImageContent::set_default_colour_conversion () video->set_colour_conversion (PresetColourConversion::from_id ("rec709").conversion); } } + +void +ImageContent::add_properties (list<UserProperty>& p) const +{ + Content::add_properties (p); + video->add_properties (p); +} diff --git a/src/lib/image_content.h b/src/lib/image_content.h index 1ebd1b08b..edcbec6dd 100644 --- a/src/lib/image_content.h +++ b/src/lib/image_content.h @@ -44,6 +44,9 @@ public: void set_default_colour_conversion (); bool still () const; + +private: + void add_properties (std::list<UserProperty>& p) const; }; #endif |
