public void SetAnchorTime()
        {
            TestRuntime.AssertSystemVersion(PlatformName.MacOSX, 10, 8, throwIfOtherPlatform: false);

            using (var tb = new CMTimebase(CMClock.HostTimeClock)) {
                Assert.AreEqual(CMTimebaseError.None, tb.SetAnchorTime(new CMTime(1000000, 200), new CMTime(-1, -2)));
                var cmt = tb.GetTime(new CMTimeScale(int.MaxValue), CMTimeRoundingMethod.QuickTime);
                Assert.AreEqual(5000, cmt.Seconds);
            }
        }
예제 #2
0
        public void SetAnchorTime()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(6, 0))
            {
                Assert.Inconclusive("CMTimebase is new in 6.0");
            }

            using (var tb = new CMTimebase(CMClock.HostTimeClock)) {
                Assert.AreEqual(CMTimebaseError.None, tb.SetAnchorTime(new CMTime(1000000, 200), new CMTime(-1, -2)));
                var cmt = tb.GetTime(new CMTimeScale(int.MaxValue), CMTimeRoundingMethod.QuickTime);
                Assert.AreEqual(5000, cmt.Seconds);
            }
        }