2

I am using DirectShow.Net in C#. I made a player that will stream video from a usb device to a video screen and to an avi file at the same time.

I want to have a button so the video will preview on the screen but not capture until a button is pressed. currently to do this, i have to redo the graph and add in the capture filter renderstream.

is it possible to create 2 different graphs off of 1 input? so I would have my usb camera that is displaying to a video window and then when i press a button i can create a second graph that will save the video from the camera to a file while its still playing on screen?

Grant
  • 684
  • 1
  • 7
  • 26
  • possible duplicate: http://stackoverflow.com/questions/6203651/directshow-recording-preview-problem – yms Jun 09 '11 at 22:28
  • mine is C# theres is C++ – Grant Jun 09 '11 at 22:44
  • The answer you should look at on that question does not have any code, you just need to follow the guidelines explained there: http://stackoverflow.com/questions/6203651/directshow-recording-preview-problem/6256459#6256459 – yms Jun 09 '11 at 22:54
  • 2
    There's a C# version of the GMFPreview sample in the DirectShowNET library. – Geraint Davies Jun 15 '11 at 15:41
  • How does the code of the GMFPreview work differently than the code from the actual GMF.DLL from the website? the code is calling previewercontroller etc while the GMF.dll from the website doesnt contain that. – Grant Jun 20 '11 at 23:39
  • http://stackoverflow.com/questions/6432578/am-i-using-the-gmfbuilder-dll-to-preview-capture-a-stream-correctly – Grant Jun 21 '11 at 22:04

1 Answers1

1

As mentioned by @Geraint, you can use GMFBridge with DirectShow.Net. DirectShow.Net website states:

Samples\Misc\GMFPreview -----------------------
A sample showing how to use Geraint's indispensible GMFBridge tool to allow part of a graph to be stopped while another part keeps running. This is useful to allow preview windows to keep running while you start/stop capturing to disk.

yms
  • 10,361
  • 3
  • 38
  • 68
  • I am confused how to use the GMF tools. on the website they offer a DLL download for GMFBuilder which i have and tried to use in C#. The containers dont match the documentation and the examples of it i've seen on stackoverflow don't match either. I was looking at http://stackoverflow.com/questions/6095452/gmfbridge-usage-in-directshow and another example but the functions dont have the same arguments and its leaving me puzzled. The code in the previews is different too, its not using the DLL its using its own classes that are defined in the code. – Grant Jun 21 '11 at 17:06
  • http://stackoverflow.com/questions/6432578/am-i-using-the-gmfbuilder-dll-to-preview-capture-a-stream-correctly – Grant Jun 21 '11 at 22:04