Bonjour,

Voilà je commence depuis peu à appréhender la librairie directshowlib, j'aimerai charger un .grf un graph dans mon code c# utilisant directshow mais pas réussi pour le moment.

Je peux ajouter un filtre si je veux comme ca :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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);
Mais j'ai creer plusieurs filtres dans graphedit et j'aimerai le charger, on fait comment ? merci.