summaryrefslogtreecommitdiff
path: root/src/lib/content.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/content.cc')
-rw-r--r--src/lib/content.cc28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc
index 2a69adefd..067086509 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -26,7 +26,6 @@
#include "audio_content.h"
#include "change_signaller.h"
-#include "compose.hpp"
#include "content.h"
#include "content_factory.h"
#include "exceptions.h"
@@ -139,7 +138,7 @@ Content::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour path_beh
auto path = _paths[i];
if (path_behaviour == PathBehaviour::MAKE_RELATIVE) {
DCPOMATIC_ASSERT(film_directory);
- path = boost::filesystem::relative(path, *film_directory);
+ path = relative_path(path, *film_directory);
}
auto p = cxml::add_child(element, "Path");
p->add_child_text(path.string());
@@ -168,12 +167,8 @@ Content::calculate_digest() const
void
-Content::examine(shared_ptr<const Film>, shared_ptr<Job> job, bool)
+Content::examine(shared_ptr<const Film>, shared_ptr<Job>, bool)
{
- if (job) {
- job->sub(_("Computing digest"));
- }
-
auto const d = calculate_digest();
boost::mutex::scoped_lock lm(_mutex);
@@ -193,9 +188,9 @@ Content::signal_change(ChangeType c, int p)
{
try {
if (c == ChangeType::PENDING || c == ChangeType::CANCELLED) {
- Change(c, shared_from_this(), p, _change_signals_frequent);
+ Change(c, p, _change_signals_frequent);
} else {
- emit(boost::bind(boost::ref(Change), c, shared_from_this(), p, _change_signals_frequent));
+ emit(boost::bind(boost::ref(Change), c, p, _change_signals_frequent));
}
} catch (std::bad_weak_ptr &) {
/* This must be during construction; never mind */
@@ -296,9 +291,9 @@ Content::clone() const
string
Content::technical_summary() const
{
- auto s = String::compose("%1 %2 %3", path_summary(), digest(), position().seconds());
+ auto s = fmt::format("{} {} {}", path_summary(), digest(), position().seconds());
if (_video_frame_rate) {
- s += String::compose(" %1", *_video_frame_rate);
+ s += fmt::format(" {}", *_video_frame_rate);
}
return s;
}
@@ -436,7 +431,7 @@ Content::active_video_frame_rate(shared_ptr<const Film> film) const
prepared for any concurrent video content or perhaps
just the DCP rate.
*/
- return film->active_frame_rate_change(position()).source;
+ return film->active_frame_rate_change(position()).source();
}
@@ -452,7 +447,7 @@ Content::add_properties(shared_ptr<const Film>, list<UserProperty>& p) const
}
}
if (paths_to_show < number_of_paths()) {
- paths += String::compose("... and %1 more", number_of_paths() - paths_to_show);
+ paths += fmt::format("... and {} more", number_of_paths() - paths_to_show);
}
p.push_back(
UserProperty(
@@ -593,3 +588,10 @@ Content::replace_font_path(boost::filesystem::path old_path, boost::filesystem::
}
}
+
+boost::filesystem::path
+Content::path_for_display() const
+{
+ return path(0);
+}
+