Esempio n. 1
0
        void TestPlayBackwards()
        {
            int     hr;
            IDvdCmd ppCmd = null;
            DvdPlaybackLocation2 pLocation;

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

            Thread.Sleep(100);

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

            // S_False means it can't play backwards (I'm guessing)
            if (hr != 1)
            {
                Thread.Sleep(2000);

                hr = m_idi2.GetCurrentLocation(out pLocation);
                DsError.ThrowExceptionForHR(hr);

                Debug.Assert(pLocation.TimeCode.bSeconds == 0, "TestPlayBackwards");
            }

            hr = m_idc2.Stop();
            DsError.ThrowExceptionForHR(hr);
        }
Esempio n. 2
0
        /// <summary>
        /// Plays the DVD backwards
        /// </summary>
        /// <param name="speed">The speed at the playback is done</param>
        public void PlayBackwards(double speed)
        {
            VerifyAccess();

            if (m_dvdControl == null)
            {
                return;
            }

            IDvdCmd cmd;

            m_dvdControl.PlayBackwards(speed, DvdCmdFlags.None, out cmd);

            if (cmd != null)
            {
                Marshal.ReleaseComObject(cmd);
            }
        }