/// <summary> /// Stop sending the data stream. /// </summary> public virtual void Stop() { if (fgm != null) { fgm.Stop(); } }
/// <summary> /// Call the graphmanager stop method. /// </summary> /// <returns></returns> public bool Stop() { if (!playing) { Debug.WriteLine("Graph is not running."); return(false); } playing = false; if (fgm == null) { return(true); } try { //If stream is paused Stop will hang unless we first call //RtpStream.UnblockNextFrame if (this.stream != null) { this.stream.UnblockNextFrame(); } fgm.Stop(); } catch (Exception e) { eventLog.WriteEntry("Failed to stop graph: " + e.ToString(), EventLogEntryType.Error, 1001); Debug.WriteLine("Failed to stop graph: " + e.ToString()); return(false); } return(true); }
public override bool RemoveCapability(ICapability capability) { bool ret = base.RemoveCapability(capability); if (ret) { if (fgm != null) { fgm.Stop(); FilterGraph.RemoveFromRot(rotID); FilterGraph.RemoveAllFilters(fgm); fgm = null; } if (fgmEventMonitor != null) { fgmEventMonitor.FgmEvent -= new FgmEventMonitor.FgmEventHandler(FgmEvent); fgmEventMonitor.Dispose(); fgmEventMonitor = null; } wmf = null; } return(ret); }
public override bool RemoveCapability(ICapability capability) { bool ret = base.RemoveCapability(capability); if (ret) { ssc = null; fgm.Stop(); FilterGraph.RemoveAllFilters(fgm); fgm = null; } return(ret); }
// CF3, CF2, CF1 private void Cleanup() { // CF3, Quit processing received data if (fgm != null) { rtpStream.UnblockNextFrame(); fgm.Stop(); FilterGraph.RemoveAllFilters(fgm); fgm = null; } DisposeDevice(); // CF2 LeaveRtpSession(); // CF1 }