PDA

View Full Version : application problems



Pixel
January 23, 2005, 00:56:59
Hello,
I wrote an application to sink video into an avi file, display other info (like local system time, frame number) on GUI and write these data into a log file. A listener is added to grabber and the overlay callback function is attached to guarantee that I got a trigger every time a new frame is streaming into avi. The overlay callback funtion sends a message to GUI thread to display and logging data. The application starts fine. But it stops at the time 'StopLive()' is called. In debug mode, the program refused to go to the next line. If I skip the display codes, it works but only when the avi sinking lasts less than 3 minutes.

1. Any idea why I got these problems happened?

2. Should I use 'grabber->setCallback(..)' to set a callback function instead of using overly callback?

3. Because I do not need to process video, I didn't allocate memory buffer to grabber. Is it an issue?

Thank you very much

Stefan Geissler
January 24, 2005, 12:12:08
Hello,

The stopAVICapture problem was an issue of IC Imaging Control 1.4. We fixed it in version 1.41. I suggest to update to version 2.1. Please send a request to support@imagingcontrol.com.

Pixel
January 24, 2005, 20:02:29
Thanks for your reply, Stefan
The IC control that I am using is version 2.0. Do you think the stoplive problem wasn't resolved in IC 2.0 ?

Stefan Geissler
January 25, 2005, 09:30:47
Hello,

I must surrender, i misunderstood your problem. The stopAVICapture problem is no issue of IC Imaging Control 2.0.

First of all, it is a problem, when a message is send from the overlay callback to another thread. I suggest to pass the handles of the controls, that display information during the video capture, into the grabber listener object. In the overlay callback, you can call the SetWindowText() or similar functions of these controls directly. You may declare these handles as public attributes of your grabber listener class e.g.
CStatic *m_pcTimeDisplay
CStatic *m_pcFrameCountDisplay

The message loop of your main program is not affected, so there are no messages pending. (I know, SetWindowText() also sends messages to controls...)

If this does not help, you may zip a project that creates the same problem and send it to support@imagingcontrol.com, so i can have a look on it.