private void BridgeCallback(MediaBridge.MediaBridgeGraphInfo GraphInfo) { try { int hr = 0; //Convert pointer of filter graph to an object we can use graph = (IFilterGraph)Marshal.GetObjectForIUnknown(GraphInfo.FilterGraph); graphBuilder = (IGraphBuilder)graph; hr = graphBuilder.RenderFile(filepath, null); DsError.ThrowExceptionForHR(hr); } catch (Exception ex) { Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (ThreadStart)delegate() { ErrorException("BridgeCallback: " + ex.Message, ex.StackTrace); PreviewError(Languages.Translate("Error") + "...", Brushes.Red); }); } }
private void BridgeCallback(MediaBridge.MediaBridgeGraphInfo GraphInfo) { try { int hr = 0; //Convert pointer of filter graph to an object we can use graph = (IFilterGraph)Marshal.GetObjectForIUnknown(GraphInfo.FilterGraph); graphBuilder = (IGraphBuilder)graph; hr = graphBuilder.RenderFile(filepath, null); DsError.ThrowExceptionForHR(hr); } catch (Exception ex) { ErrorException("BridgeCallback: " + ex.Message, ex.StackTrace); } }