コード例 #1
0
        /// <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);
            }
        }
コード例 #2
0
        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");
        }
コード例 #3
0
ファイル: DvdPlayer.cs プロジェクト: git-thinh/MediaPortal-2
        /// <summary>
        /// Skip to previous chapter.
        /// </summary>
        public override void PrevChapter()
        {
            IDvdCmd cmd;

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