summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-02-13 00:17:10 +0000
committerCarl Hetherington <cth@carlh.net>2019-02-13 00:17:10 +0000
commit27fbe80bccafe744ca3f96129c9e582f39921891 (patch)
tree7f6b9e8f16c375d7cdc009a2b2e557462b964def /test
parent53a0e90c6bfa97d00dcec950e6109586c8676401 (diff)
Fixes to 3D shuffler to fix #1463.
Make the shuffler longer; I've seen examples where the video and sound are over a second apart within the muxed file. Allow the shuffler to pass through complete missed frames; e.g. if the input is L1 R1 L3 R3 we can pass that through without worrying about the missing frame #2. Add a log warning if the shuffler fills: at this point, 3D sync may be lost.
Diffstat (limited to 'test')
-rw-r--r--test/shuffler_test.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/shuffler_test.cc b/test/shuffler_test.cc
index 440d014cf..a8b45930f 100644
--- a/test/shuffler_test.cc
+++ b/test/shuffler_test.cc
@@ -143,3 +143,27 @@ BOOST_AUTO_TEST_CASE (shuffler_test5)
push (s, 9, EYES_LEFT);
check (1, EYES_LEFT, __LINE__);
}
+
+/** One complete frame (L+R) missing.
+ Shuffler should carry on, skipping this frame, as the player will cope with it.
+*/
+BOOST_AUTO_TEST_CASE (shuffler_test6)
+{
+ Shuffler s;
+ s.Video.connect (boost::bind (&receive, _1, _2));
+
+ push (s, 0, EYES_LEFT);
+ check (0, EYES_LEFT, __LINE__);
+ push (s, 0, EYES_RIGHT);
+ check (0, EYES_RIGHT, __LINE__);
+
+ push (s, 2, EYES_LEFT);
+ push (s, 2, EYES_RIGHT);
+ check (2, EYES_LEFT, __LINE__);
+ check (2, EYES_RIGHT, __LINE__);
+
+ push (s, 3, EYES_LEFT);
+ check (3, EYES_LEFT, __LINE__);
+ push (s, 3, EYES_RIGHT);
+ check (3, EYES_RIGHT, __LINE__);
+}