Too much CPU in video-capture session

P

Perro Flaco

Hi everybody!

Im developing an application which involves capturing video from a
webcam. I use video for windows API. The program doesn't capture
real-time video, but it only captures still-images from time to time.
When the program is waiting and doing nothing, the CPU is at 50%. I
would like to know if there is any posibility to reduce the amount of
CPU used.

By the way, the code that I used to start the still-image capture
session is the following:

-----

hWndC = capCreateCaptureWindow ("CW",
WS_POPUP,
0,
0,
0,
0,
NULL,
nID);
capDriverConnect(hWndC, 0);

capCaptureGetSetup(hWndC, &Parameters, sizeof(Parameters));
Parameters.fYield = false;
capCaptureSetSetup(hWndC, &Parameters, sizeof(Parameters));

capPreview(hWndC, false);
 
M

mlimber

Perro said:
Hi everybody!

Im developing an application which involves capturing video from a
webcam. I use video for windows API. The program doesn't capture
real-time video, but it only captures still-images from time to time.
When the program is waiting and doing nothing, the CPU is at 50%. I
would like to know if there is any posibility to reduce the amount of
CPU used.

By the way, the code that I used to start the still-image capture
session is the following:

-----

hWndC = capCreateCaptureWindow ("CW",
WS_POPUP,
0,
0,
0,
0,
NULL,
nID);
capDriverConnect(hWndC, 0);

capCaptureGetSetup(hWndC, &Parameters, sizeof(Parameters));
Parameters.fYield = false;
capCaptureSetSetup(hWndC, &Parameters, sizeof(Parameters));

capPreview(hWndC, false);

----

Any advice?

Thank you very much for your help!

I'd suggest you post on a Microsoft newsgroup like
comp.os.ms-windows.programmer.win32, as the present newsgroup is for
standard C++ language issues, not OS-specific APIs.

Cheers! --M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top