public void Close() { logger.Debug("MfH264Dxva2Decoder::Close()"); if (InputMediaType != null) { InputMediaType.Dispose(); InputMediaType = null; } if (OutputMediaType != null) { OutputMediaType.Dispose(); OutputMediaType = null; } if (decoder != null) { decoder.Dispose(); decoder = null; } }
public void Close() { logger.Debug("MfVideoProcessor::Close()"); if (InputMediaType != null) { InputMediaType.Dispose(); InputMediaType = null; } if (OutputMediaType != null) { OutputMediaType.Dispose(); OutputMediaType = null; } if (processor != null) { processor.Dispose(); processor = null; } }
public void Close() { logger.Debug("MfEncoderAsync::Close()"); closing = true; if (InputMediaType != null) { InputMediaType.Dispose(); InputMediaType = null; } if (OutputMediaType != null) { OutputMediaType.Dispose(); OutputMediaType = null; } if (encoder != null) { //using (var shutdown = encoder.QueryInterface<Shutdownable>()) //{ // shutdown.Shutdown(); // //while(shutdown.ShutdownStatus != ShutdownStatus.Completed) // //{ // // logger.Warn("shutdown.ShutdownStatus " + shutdown.ShutdownStatus); // // Thread.Sleep(100); // //} //} encoder.Dispose(); encoder = null; } if (bufSample != null) { bufSample.Dispose(); bufSample = null; } if (bufTexture != null) { bufTexture.Dispose(); bufTexture = null; } if (eventHandler != null) { eventHandler.EventReceived -= HandleMediaEvent; eventHandler.Dispose(); eventHandler = null; } if (mediaEventGenerator != null) { mediaEventGenerator.Dispose(); mediaEventGenerator = null; } // logger.Info(SharpDX.Diagnostics.ObjectTracker.ReportActiveObjects()); }