summaryrefslogtreecommitdiff
path: root/src/lib/dcp_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-15 01:56:31 +0200
committerCarl Hetherington <cth@carlh.net>2020-05-22 00:27:06 +0200
commit93a706be8996dadfd6d307a942f304d4948d6020 (patch)
tree1cf4e7dae8d325de2829f81dc39ef0c7a0866dae /src/lib/dcp_content.cc
parente3f056b2c857c0428d9eaca73639b34333311767 (diff)
Provide better information on what will happen to JPEG2000 content in inputs (part of #1471).j2k-passthru-information
Diffstat (limited to 'src/lib/dcp_content.cc')
-rw-r--r--src/lib/dcp_content.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index ca210b558..07bd946b0 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -760,3 +760,31 @@ DCPContent::resolution () const
return RESOLUTION_2K;
}
+string
+DCPContent::video_processing_description (shared_ptr<const Film> film) const
+{
+ /* This and PlayerVideo::has_j2k() need to be kept in sync */
+
+ if (!video) {
+ return "";
+ }
+
+ string s = video->processing_description (film);
+
+ /* XXX: overlapping burnt subs... */
+
+ if (video->crop() != Crop()) {
+ s += _("JPEG2000 video will be re-compressed because the image is cropped.");
+ } else if (film->frame_size() != video->size()) {
+ s += _("JPEG2000 video will be re-compressed because the project's container is different to the DCP's.");
+ } else if (video->fade_in() || video->fade_out()) {
+ s += _("JPEG2000 video will be re-compressed because fades have been set up.");
+ } else if (video->colour_conversion()) {
+ s += _("JPEG2000 video will be re-compressed because the colour conversion is not set to 'None'");
+ } else {
+ s += _("JPEG2000 video will be passed through without any change.");
+ }
+
+ return s;
+}
+