summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-12-12 00:30:33 +0000
committerCarl Hetherington <cth@carlh.net>2018-12-12 00:30:33 +0000
commit3c414bf90d4cfcfe342c0b057b5134f72485fe32 (patch)
tree543e3635577f04a58f1dc252fa0b888a4daeb005 /src/lib
parentf851a375fc5bb9095def34c05a61f69e33139426 (diff)
Fix content properties (#1428).
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/content.cc6
-rw-r--r--src/lib/content.h4
-rw-r--r--src/lib/dcp_content.cc2
-rw-r--r--src/lib/ffmpeg_content.cc2
-rw-r--r--src/lib/image_content.cc4
-rw-r--r--src/lib/image_content.h2
-rw-r--r--src/lib/video_mxf_content.cc3
-rw-r--r--src/lib/video_mxf_content.h2
8 files changed, 13 insertions, 12 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc
index 1e73418b6..b288580cb 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -356,10 +356,10 @@ Content::path_summary () const
/** @return a list of properties that might be interesting to the user */
list<UserProperty>
-Content::user_properties () const
+Content::user_properties (shared_ptr<const Film> film) const
{
list<UserProperty> p;
- add_properties (p);
+ add_properties (film, p);
return p;
}
@@ -423,7 +423,7 @@ Content::active_video_frame_rate (shared_ptr<const Film> film) const
}
void
-Content::add_properties (list<UserProperty>& p) const
+Content::add_properties (shared_ptr<const Film>, list<UserProperty>& p) const
{
p.push_back (UserProperty (UserProperty::GENERAL, _("Filename"), path(0).string ()));
diff --git a/src/lib/content.h b/src/lib/content.h
index bb66bc141..55cf4acae 100644
--- a/src/lib/content.h
+++ b/src/lib/content.h
@@ -180,7 +180,7 @@ public:
_change_signals_frequent = f;
}
- std::list<UserProperty> user_properties () const;
+ std::list<UserProperty> user_properties (boost::shared_ptr<const Film> film) const;
std::string calculate_digest () const;
@@ -196,7 +196,7 @@ public:
protected:
- virtual void add_properties (std::list<UserProperty> &) const;
+ virtual void add_properties (boost::shared_ptr<const Film> film, std::list<UserProperty> &) const;
/** _mutex which should be used to protect accesses, as examine
* jobs can update content state in threads other than the main one.
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index 419ffe69c..8a2e2050d 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -421,7 +421,7 @@ DCPContent::directories () const
void
DCPContent::add_properties (shared_ptr<const Film> film, list<UserProperty>& p) const
{
- Content::add_properties (p);
+ Content::add_properties (film, p);
if (video) {
video->add_properties (p);
}
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index f4e4beba9..02d7a9ff6 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -507,7 +507,7 @@ FFmpegContent::set_default_colour_conversion ()
void
FFmpegContent::add_properties (shared_ptr<const Film> film, list<UserProperty>& p) const
{
- Content::add_properties (p);
+ Content::add_properties (film, p);
if (video) {
video->add_properties (p);
diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc
index 8902798a4..1515c8b76 100644
--- a/src/lib/image_content.cc
+++ b/src/lib/image_content.cc
@@ -182,8 +182,8 @@ ImageContent::set_default_colour_conversion ()
}
void
-ImageContent::add_properties (list<UserProperty>& p) const
+ImageContent::add_properties (shared_ptr<const Film> film, list<UserProperty>& p) const
{
- Content::add_properties (p);
+ Content::add_properties (film, p);
video->add_properties (p);
}
diff --git a/src/lib/image_content.h b/src/lib/image_content.h
index e2a2ec366..959923a51 100644
--- a/src/lib/image_content.h
+++ b/src/lib/image_content.h
@@ -51,7 +51,7 @@ public:
bool still () const;
private:
- void add_properties (std::list<UserProperty>& p) const;
+ void add_properties (boost::shared_ptr<const Film> film, std::list<UserProperty>& p) const;
boost::optional<boost::filesystem::path> _path_to_scan;
};
diff --git a/src/lib/video_mxf_content.cc b/src/lib/video_mxf_content.cc
index 9d2af1a32..436046890 100644
--- a/src/lib/video_mxf_content.cc
+++ b/src/lib/video_mxf_content.cc
@@ -130,7 +130,8 @@ VideoMXFContent::approximate_length () const
}
void
-VideoMXFContent::add_properties (list<UserProperty>& p) const
+VideoMXFContent::add_properties (shared_ptr<const Film> film, list<UserProperty>& p) const
{
+ Content::add_properties (film, p);
video->add_properties (p);
}
diff --git a/src/lib/video_mxf_content.h b/src/lib/video_mxf_content.h
index 25da0def4..27dce1fb7 100644
--- a/src/lib/video_mxf_content.h
+++ b/src/lib/video_mxf_content.h
@@ -41,7 +41,7 @@ public:
void as_xml (xmlpp::Node* node, bool with_paths) const;
DCPTime full_length (boost::shared_ptr<const Film> film) const;
DCPTime approximate_length () const;
- void add_properties (std::list<UserProperty>& p) const;
+ void add_properties (boost::shared_ptr<const Film> film, std::list<UserProperty>& p) const;
static bool valid_mxf (boost::filesystem::path path);
};