summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-25 02:48:32 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-25 02:48:32 +0100
commit8167d04e4dde6297ad936dca5dc691818a4dae41 (patch)
tree37aac64d82949ac0086d40259ccd06e35e728597 /src/lib/ffmpeg_content.cc
parentd8b6ee12af54a37433e96238bdca29171d6e0eb6 (diff)
11b5bf6229b8713dffde89a777cd5181335136f6 from master; default colour conversions depending on type and resolution
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
-rw-r--r--src/lib/ffmpeg_content.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index a52b53b04..187d61953 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -388,3 +388,19 @@ FFmpegContent::has_subtitles () const
{
return !subtitle_streams().empty ();
}
+
+void
+FFmpegContent::set_default_colour_conversion ()
+{
+ dcp::Size const s = video_size ();
+
+ boost::mutex::scoped_lock lm (_mutex);
+
+ if (s.width < 1080) {
+ _colour_conversion = PresetColourConversion::from_id ("rec601").conversion;
+ } else {
+ _colour_conversion = PresetColourConversion::from_id ("rec709").conversion;
+ }
+}
+
+