void TestPlayForwards() { int hr; IDvdCmd ppCmd; DvdPlaybackLocation2 pLocation; AllowPlay(); hr = m_idc2.PlayTitle(2, DvdCmdFlags.Flush | DvdCmdFlags.SendEvents, out ppCmd); DsError.ThrowExceptionForHR(hr); Thread.Sleep(100); hr = m_idc2.PlayForwards(7.5, DvdCmdFlags.Flush | DvdCmdFlags.SendEvents, out ppCmd); DsError.ThrowExceptionForHR(hr); Thread.Sleep(2000); hr = m_idi2.GetCurrentLocation(out pLocation); DsError.ThrowExceptionForHR(hr); hr = m_idc2.Stop(); DsError.ThrowExceptionForHR(hr); Debug.Assert(pLocation.TimeCode.bSeconds >= 5 && pLocation.TimeCode.bSeconds <= 6, "TestPlayForwards"); }
/// <summary> /// Plays the DVD forward /// </summary> /// <param name="speed">The speed at which the playback is done</param> public void PlayForwards(double speed) { VerifyAccess(); if (m_dvdControl == null) { return; } IDvdCmd cmd; m_dvdControl.PlayForwards(speed, DvdCmdFlags.None, out cmd); if (cmd != null) { Marshal.ReleaseComObject(cmd); } }