Comments.
[dcpomatic.git] / src / tools / dcpomatic_player.cc
index 4b63441f753451728b520253598cf7dc1f96cd49..cb81c5b89d7aaa24a2fc4bdfc4aee7cd97f5ac49 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2017-2019 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2017-2020 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -28,6 +28,7 @@
 #include "wx/player_config_dialog.h"
 #include "wx/verify_dcp_dialog.h"
 #include "wx/standard_controls.h"
+#include "wx/playlist_controls.h"
 #ifdef DCPOMATIC_VARIANT_SWAROOP
 #include "wx/swaroop_controls.h"
 #endif
@@ -100,6 +101,7 @@ using dcp::raw_convert;
 using namespace dcpomatic;
 
 #ifdef DCPOMATIC_PLAYER_STRESS_TEST
+/* Interval to check what to do next with the stress checker, in milliseconds */
 #define STRESS_TEST_CHECK_INTERVAL 20
 
 class Command
@@ -250,7 +252,13 @@ public:
                _controls = sc;
                sc->ResetFilm.connect (bind(&DOMFrame::reset_film_weak, this, _1));
 #else
-               _controls = new StandardControls (_overall_panel, _viewer, false);
+               if (Config::instance()->player_mode() == Config::PLAYER_MODE_DUAL) {
+                       PlaylistControls* pc = new PlaylistControls (_overall_panel, _viewer);
+                       _controls = pc;
+                       pc->ResetFilm.connect (bind(&DOMFrame::reset_film_weak, this, _1));
+               } else {
+                       _controls = new StandardControls (_overall_panel, _viewer, false);
+               }
 #endif
                _viewer->set_dcp_decode_reduction (Config::instance()->decode_reduction ());
                _viewer->PlaybackPermitted.connect (bind(&DOMFrame::playback_permitted, this));
@@ -329,6 +337,7 @@ public:
                                ++_current_command;
                                break;
                        case Command::WAIT:
+                               /* int_param here is the number of milliseconds to wait */
                                if (_wait_remaining) {
                                        _wait_remaining = *_wait_remaining - STRESS_TEST_CHECK_INTERVAL;
                                        if (_wait_remaining < 0) {
@@ -1131,6 +1140,7 @@ private:
        wxTimer _timer;
        list<Command> _commands;
        list<Command>::const_iterator _current_command;
+       /** Remaining time that the script must wait, in milliseconds */
        optional<int> _wait_remaining;
 #endif
 };