summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-01 01:25:27 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-01 01:25:27 +0200
commit981ffdc9db4a84c614b3186a0fb27136fe6feb37 (patch)
tree9027b208a4eaeccd8a2e8ff3af375d49976f7915 /src/lib
parent0a1aa72f11b7d5109caaa5d3ae0068e18dea6b56 (diff)
Move 3D-to-2D check (#1941).
We were checking for 3D content going into a 2D project in the DCPEncoder, but we also need to do the same thing when exporting. Moving the check into Player::emit_video() means that it is applied to both DCP transcoding and export.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dcp_encoder.cc10
-rw-r--r--src/lib/player.cc10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/dcp_encoder.cc b/src/lib/dcp_encoder.cc
index c5bcf31f2..f1c412539 100644
--- a/src/lib/dcp_encoder.cc
+++ b/src/lib/dcp_encoder.cc
@@ -132,16 +132,6 @@ DCPEncoder::go ()
void
DCPEncoder::video (shared_ptr<PlayerVideo> data, DCPTime time)
{
- if (!_film->three_d()) {
- if (data->eyes() == Eyes::LEFT) {
- /* Use left-eye images for both eyes... */
- data->set_eyes (Eyes::BOTH);
- } else if (data->eyes() == Eyes::RIGHT) {
- /* ...and discard the right */
- return;
- }
- }
-
_j2k_encoder->encode (data, time);
}
diff --git a/src/lib/player.cc b/src/lib/player.cc
index a5538d9a6..0bdf46f4a 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -1199,6 +1199,16 @@ Player::seek (DCPTime time, bool accurate)
void
Player::emit_video (shared_ptr<PlayerVideo> pv, DCPTime time)
{
+ if (!_film->three_d()) {
+ if (pv->eyes() == Eyes::LEFT) {
+ /* Use left-eye images for both eyes... */
+ pv->set_eyes (Eyes::BOTH);
+ } else if (pv->eyes() == Eyes::RIGHT) {
+ /* ...and discard the right */
+ return;
+ }
+ }
+
/* We need a delay to give a little wiggle room to ensure that relevent subtitles arrive at the
player before the video that requires them.
*/