/// <summary> /// Plays the previous chapter of the DVD /// </summary> public void PlayPreviousChapter() { VerifyAccess(); if (m_dvdControl == null) { return; } IDvdCmd cmd; m_dvdControl.PlayPrevChapter(DvdCmdFlags.Flush, out cmd); if (cmd != null) { Marshal.ReleaseComObject(cmd); } }
void TestPlayPrevChapter() { int hr; IDvdCmd ppCmd; DvdPlaybackLocation2 pLocation; AllowPlay(); hr = m_idc2.PlayChapterInTitle(1, 2, DvdCmdFlags.Flush | DvdCmdFlags.SendEvents, out ppCmd); DsError.ThrowExceptionForHR(hr); Thread.Sleep(2000); hr = m_idc2.PlayPrevChapter(DvdCmdFlags.Flush | DvdCmdFlags.SendEvents, out ppCmd); DsError.ThrowExceptionForHR(hr); hr = m_idi2.GetCurrentLocation(out pLocation); DsError.ThrowExceptionForHR(hr); hr = m_idc2.Stop(); DsError.ThrowExceptionForHR(hr); Debug.Assert(pLocation.TitleNum == 1, "TestPlayPrevChapter"); Debug.Assert(pLocation.ChapterNum == 1, "TestPlayPrevChapter2"); }
/// <summary> /// Skip to previous chapter. /// </summary> public override void PrevChapter() { IDvdCmd cmd; _dvdCtrl.PlayPrevChapter(DvdCmdFlags.None, out cmd); }