1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
graphBuilder[i] = (IGraphBuilder)new FilterGraph();
//Create the Capture Graph Builder
ICaptureGraphBuilder2 captureGraphBuilder = null;
captureGraphBuilder = (ICaptureGraphBuilder2)new CaptureGraphBuilder2();
//Create the media control for controlling the graph
mediaControl[i] = (IMediaControl)this.graphBuilder[i];
// Attach the filter graph to the capture graph
int hr = captureGraphBuilder.SetFiltergraph(this.graphBuilder[i]);
DsError.ThrowExceptionForHR(hr);
//Add the Video input device to the graph
hr = graphBuilder[i].AddFilter(theDevice[0], "source filter");
DsError.ThrowExceptionForHR(hr); |
Partager