Remove some 3D stuff I think is unnecessary since the changes in 2f12058c535045cecc22...
[dcpomatic.git] / src / lib / writer.cc
index f7665a7a7011f1a01efe0a56ac2ebbe884710bb2..2a2925cf0e1224a0e7776d5884633517833228f1 100644 (file)
@@ -153,19 +153,11 @@ Writer::write (shared_ptr<const Data> encoded, Frame frame, Eyes eyes)
        qi.reel = video_reel (frame);
        qi.frame = frame - _reels[qi.reel].start ();
 
-       if (film()->three_d() && eyes == Eyes::BOTH) {
-               /* 2D material in a 3D DCP; fake the 3D */
-               qi.eyes = Eyes::LEFT;
-               _queue.push_back (qi);
-               ++_queued_full_in_memory;
-               qi.eyes = Eyes::RIGHT;
-               _queue.push_back (qi);
-               ++_queued_full_in_memory;
-       } else {
-               qi.eyes = eyes;
-               _queue.push_back (qi);
-               ++_queued_full_in_memory;
-       }
+       DCPOMATIC_ASSERT((film()->three_d() && eyes != Eyes::BOTH) || (!film()->three_d() && eyes == Eyes::BOTH));
+
+       qi.eyes = eyes;
+       _queue.push_back(qi);
+       ++_queued_full_in_memory;
 
        /* Now there's something to do: wake anything wait()ing on _empty_condition */
        _empty_condition.notify_all ();
@@ -239,17 +231,12 @@ Writer::fake_write (Frame frame, Eyes eyes)
                qi.size = _reels[reel].read_frame_info(info_file, frame_in_reel, eyes).size;
        }
 
+       DCPOMATIC_ASSERT((film()->three_d() && eyes != Eyes::BOTH) || (!film()->three_d() && eyes == Eyes::BOTH));
+
        qi.reel = reel;
        qi.frame = frame_in_reel;
-       if (film()->three_d() && eyes == Eyes::BOTH) {
-               qi.eyes = Eyes::LEFT;
-               _queue.push_back (qi);
-               qi.eyes = Eyes::RIGHT;
-               _queue.push_back (qi);
-       } else {
-               qi.eyes = eyes;
-               _queue.push_back (qi);
-       }
+       qi.eyes = eyes;
+       _queue.push_back(qi);
 
        /* Now there's something to do: wake anything wait()ing on _empty_condition */
        _empty_condition.notify_all ();
@@ -699,7 +686,7 @@ Writer::finish (boost::filesystem::path output_dcp)
        dcp.set_creator(creator);
        dcp.set_annotation_text(film()->dcp_name());
 
-       dcp.write_xml (signer, Config::instance()->dcp_metadata_filename_format());
+       dcp.write_xml(signer, !film()->limit_to_smpte_bv20(), Config::instance()->dcp_metadata_filename_format());
 
        LOG_GENERAL (
                N_("Wrote %1 FULL, %2 FAKE, %3 REPEAT, %4 pushed to disk"), _full_written, _fake_written, _repeat_written, _pushed_to_disk