void TestWaitForStart() { int hr; IDvdCmd ppCmd = null; AllowPlay(); hr = m_idc2.PlayTitle(2, DvdCmdFlags.Flush | DvdCmdFlags.SendEvents, out ppCmd); DsError.ThrowExceptionForHR(hr); // Only takes fraction of a second hr = ppCmd.WaitForStart(); DsError.ThrowExceptionForHR(hr); hr = m_idc2.Stop(); DsError.ThrowExceptionForHR(hr); }
/// <summary> /// Stops the playback and the input handling. /// </summary> public override void Stop() { lock (_dvdStopSyncObj) { if (_stopping == false) { _stopping = true; } else { return; } } ServiceRegistration.Get <ILogger>().Debug("DvdPlayer: Stop"); if (_dvdCtrl != null) { _dvdCtrl.Stop(); } base.Stop(); lock (_dvdStopSyncObj) { _stopping = false; } }
void TestState() { int hr; IDvdCmd ppCmd; IDvdState dss; long diskid; int pl; AllowPlay(); hr = m_idc2.PlayChapterInTitle(1, 2, DvdCmdFlags.Flush | DvdCmdFlags.SendEvents, out ppCmd); DsError.ThrowExceptionForHR(hr); Thread.Sleep(500); hr = m_idi2.GetState(out dss); DsError.ThrowExceptionForHR(hr); hr = m_idc2.Stop(); DsError.ThrowExceptionForHR(hr); hr = dss.GetDiscID(out diskid); DsError.ThrowExceptionForHR(hr); // supposed to be a fixed number Debug.Assert(diskid == 6633412489990086489, "GetDiscID for testme.iso"); hr = dss.GetParentalLevel(out pl); DsError.ThrowExceptionForHR(hr); // no parental level set Debug.Assert(pl == -1, "GetParentalLevel"); }
void TestGetCurrentDomain() { int hr; DvdDomain dvdd; hr = m_idi2.GetCurrentDomain(out dvdd); DsError.ThrowExceptionForHR(hr); Debug.Assert(dvdd == DvdDomain.VideoManagerMenu, "GetCurrentDomain"); hr = m_idc2.Stop(); DsError.ThrowExceptionForHR(hr); hr = m_idi2.GetCurrentDomain(out dvdd); DsError.ThrowExceptionForHR(hr); Debug.Assert(dvdd == DvdDomain.Stop, "GetCurrentDomain2"); }
/// <summary> /// Stops the playback and the input handling. /// </summary> public override void Stop() { ServiceRegistration.Get <ILogger>().Debug("DvdPlayer: Stop"); if (_dvdCtrl != null) { _dvdCtrl.Stop(); } base.Stop(); }
void TestPlayTitle() { int hr; IDvdCmd ppCmd = null; DvdPlaybackLocation2 pLocation; AllowPlay(); hr = m_idc2.PlayTitle(2, 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.TitleNum == 2, "PlayTitle"); }