thedeemon.com forum
November 21, 2009, 02:19:16 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Last GraphEditPlus version: 1.3.4   Last Video Enhancer version: 1.9.3
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Graph runs then pauses after a few seconds  (Read 265 times)
markr
Newbie
*

Karma: +0/-0
Posts: 23


View Profile
« 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
Logged
Dee Mon
Administrator
Full Member
*****

Karma: +5/-0
Posts: 207



View Profile WWW
« Reply #1 on: August 04, 2009, 07:09:51 AM »

There was a topic here with similar problem. The issue is that generated code currently doesn't process window messages (since it's a simple console app). You need to add a message processing loop. See the old topic for code.
Logged
markr
Newbie
*

Karma: +0/-0
Posts: 23


View Profile
« Reply #2 on: August 05, 2009, 08:45:29 PM »

Thank you for that information.  I generated a standard C# Windows app and it's working perfectly.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!