From 595f564a52d69d0401f5622c7d81cacda679005c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 24 Jul 2013 23:27:09 +0100 Subject: Fix video information with 3D. --- src/lib/video_content.cc | 14 ++++++++++++++ src/lib/video_content.h | 2 ++ 2 files changed, 16 insertions(+) (limited to 'src/lib') diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index d70ece340..f61518ec0 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -243,3 +243,17 @@ VideoContent::technical_summary () const { return String::compose ("video: length %1, size %2x%3, rate %4", video_length(), video_size().width, video_size().height, video_frame_rate()); } + +libdcp::Size +VideoContent::video_size_after_3d_split () const +{ + libdcp::Size const s = video_size (); + switch (video_frame_type ()) { + case VIDEO_FRAME_TYPE_2D: + return s; + case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT: + return libdcp::Size (s.width / 2, s.height); + } + + assert (false); +} diff --git a/src/lib/video_content.h b/src/lib/video_content.h index 513e1f598..97ef6a9fa 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -88,6 +88,8 @@ public: return _ratio; } + libdcp::Size video_size_after_3d_split () const; + protected: void take_from_video_examiner (boost::shared_ptr); -- cgit v1.2.3