- return can_reference (bind (&Content::video, _1), _("There is other video content overlapping this DCP; remove it."), why_not);
+ if (!video) {
+ why_not = _("There is no video in this DCP");
+ return false;
+ }
+
+ if (film->resolution() != resolution()) {
+ if (resolution() == RESOLUTION_4K) {
+ /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
+ why_not = _("it is 4K and the film is 2K.");
+ } else {
+ /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
+ why_not = _("it is 2K and the film is 4K.");
+ }
+ return false;
+ } else if (film->frame_size() != video->size()) {
+ /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
+ why_not = _("its video frame size differs from the film's.");
+ return false;
+ }
+
+ /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
+ return can_reference (film, bind (&check_video, _1), _("it overlaps other video content; remove the other content."), why_not);
+}
+
+static
+bool check_audio (shared_ptr<const Content> c)
+{
+ return static_cast<bool>(c->audio);