Esempio n. 1
0
        /// <summary>
        /// Plays the next chapter of the DVD
        /// </summary>
        public void PlayNextChapter()
        {
            VerifyAccess();

            if (m_dvdControl == null)
            {
                return;
            }

            IDvdCmd cmd;

            m_dvdControl.PlayNextChapter(DvdCmdFlags.Flush, out cmd);

            if (cmd != null)
            {
                Marshal.ReleaseComObject(cmd);
            }
        }
Esempio n. 2
0
        void TestPlayNextChapter()
        {
            int     hr;
            IDvdCmd ppCmd;
            DvdPlaybackLocation2 pLocation;

            AllowPlay();
            hr = m_idc2.PlayChapterInTitle(1, 1, DvdCmdFlags.Flush | DvdCmdFlags.SendEvents, out ppCmd);
            DsError.ThrowExceptionForHR(hr);

            Thread.Sleep(2000);

            hr = m_idc2.PlayNextChapter(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, "TestPlayNextChapter");
            Debug.Assert(pLocation.ChapterNum == 2, "TestPlayNextChapter2");
        }
Esempio n. 3
0
        /// <summary>
        /// Skip to next chapter.
        /// </summary>
        public override void NextChapter()
        {
            IDvdCmd cmd;

            _dvdCtrl.PlayNextChapter(DvdCmdFlags.None, out cmd);
        }