public override void Dispose(bool disposing) { if (disposing) { if (_sink != null) { Marshal.ReleaseComObject(_sink); _sink = null; Marshal.ReleaseComObject(_sinkControl); _sinkControl = null; } if (_mux != null) { Marshal.ReleaseComObject(_mux); _mux = null; } } base.Dispose(disposing); }
public BaseDVRSinkGraph(StreamSourceInfo sourceConfig, OpenGraphRequest openGraphRequest) : base(sourceConfig, openGraphRequest) { _mux = AddFilterByName(FilterCategory.LegacyAmFilterCategory, @"LEAD MPEG2 Transport Multiplexer"); _sink = AddFilterByName(FilterCategory.LegacyAmFilterCategory, "LEAD DVR Sink"); _sinkControl = (ILMDVRSink)_sink; }