summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-04-01 10:02:09 +0100
committerCarl Hetherington <cth@carlh.net>2014-04-01 10:02:09 +0100
commit07f3a8fccdf9127b2eaf4a6f3425185dba73a23f (patch)
tree6c09a684a005597ae83b113d7fa038b3dfb87737 /src/lib
parentf8cf68ca666e016d0e5d3834f7a006f93d803e73 (diff)
Basic support for separate 3D left/right sources.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/types.h6
-rw-r--r--src/lib/video_content.cc2
-rw-r--r--src/lib/video_content.h2
-rw-r--r--src/lib/video_decoder.cc8
4 files changed, 15 insertions, 3 deletions
diff --git a/src/lib/types.h b/src/lib/types.h
index 8a16818bd..c255bd0d8 100644
--- a/src/lib/types.h
+++ b/src/lib/types.h
@@ -70,7 +70,11 @@ enum VideoFrameType
VIDEO_FRAME_TYPE_2D,
VIDEO_FRAME_TYPE_3D_LEFT_RIGHT,
VIDEO_FRAME_TYPE_3D_TOP_BOTTOM,
- VIDEO_FRAME_TYPE_3D_ALTERNATE
+ VIDEO_FRAME_TYPE_3D_ALTERNATE,
+ /** This content is all the left frames of some 3D */
+ VIDEO_FRAME_TYPE_3D_LEFT,
+ /** This content is all the right frames of some 3D */
+ VIDEO_FRAME_TYPE_3D_RIGHT
};
enum Eyes
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc
index 4a1ef95ac..b704b6447 100644
--- a/src/lib/video_content.cc
+++ b/src/lib/video_content.cc
@@ -330,6 +330,8 @@ VideoContent::video_size_after_3d_split () const
switch (video_frame_type ()) {
case VIDEO_FRAME_TYPE_2D:
case VIDEO_FRAME_TYPE_3D_ALTERNATE:
+ case VIDEO_FRAME_TYPE_3D_LEFT:
+ case VIDEO_FRAME_TYPE_3D_RIGHT:
return s;
case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT:
return libdcp::Size (s.width / 2, s.height);
diff --git a/src/lib/video_content.h b/src/lib/video_content.h
index f846b7ac9..fbba9c09d 100644
--- a/src/lib/video_content.h
+++ b/src/lib/video_content.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc
index 3ae963a20..2a33a8c3a 100644
--- a/src/lib/video_decoder.cc
+++ b/src/lib/video_decoder.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,6 +57,12 @@ VideoDecoder::video (shared_ptr<const Image> image, bool same, VideoContent::Fra
Video (image->crop (Crop (0, 0, half, 0), true), EYES_RIGHT, same, frame);
break;
}
+ case VIDEO_FRAME_TYPE_3D_LEFT:
+ Video (image, EYES_LEFT, same, frame);
+ break;
+ case VIDEO_FRAME_TYPE_3D_RIGHT:
+ Video (image, EYES_RIGHT, same, frame);
+ break;
}
_video_position = frame + 1;