markr
Newbie
Karma: +0/-0
Posts: 23
|
 |
« on: August 03, 2009, 07:24:36 AM » |
|
I downloaded the trial version of GraphEditPlus and like it's abilities, especially to export the source code. I created a simple graph containing an IP camera source filter and rendered it with the DirectShow default color space converter and video renderer filters. When I run the graph in GraphEditPlus, the video appears in the ActiveMovie window and runs until I explicitly stop it. The source filter is receiving a continuous MPEG4 stream from the camera at 8 FPS.
However, even though I could not copy the C# code produced by GraphEditPlus - since it's the trial version - I meticulously copied it manually into a new C# Windows Console Project in VS 2005. The graph runs and the video appears in a window, but only for about 5 seconds, then the ActiveWindow does not show the frames any more. The Console Window continues after that to display a "." every 500ms due to the Thread.Sleep(500) until the variable "n" reaches it set value, then the program terminates as expected. The code produced by GraphEditPlus checks for the mediaEvent.GetEvent. Within that GetEvent, I simply write out to the console the value of type of event (ev.ToString()). I get a VMRRenderDeviceSet event, followed by a VideoSizeChanged event, followed by a ClockChanged event, followed by a Paused event, then no more events. As each event occurs, the Console is still displaying the "." every 500ms. After the Paused event is displayed, the dots "." tick for about 5 times (2 1/2 seconds) before the video no longer is displayed.
I don't explicitly send a Pause command to the mediaControl object, so I'm not sure about that. I suppose the buffer is flushed which could be the reason the video still displays for about 2 1/2 seconds after the pause. I hope I have supplied enough info.
Does anyone have any ideas as to why the video only shows for about 5 seconds instead of continuously?
Thanks,
Mark R
|