Hello
I am using a web cam service that saves images every five minutes based
off the example given by Ken Tucker. (hopefully I can catch him!) It
works great for the most part.
I need to handle a situation if the camera, or connection to the camera
become interupted. I am connecting through a device called a "dazzle"
which for some reason or another causes a few connection problems here
and there.
If the camera goes offline the image does not update, and the preview
window becomes frozen with the last frame before the connection was
interupted.
I noticed in the CAPSTATUS structure a few properties I could test for
to see if the image is "live". The problem is that "fLiveWindow" always
returns 1...even on a preview window with a still image. There is
another property "fCapturingNow" but it always returns 0. I could even
use "dwCurrentVideoFrame" and see if the count stopped but that too
always returns 0. What am I missing? How can I test if the preview
window has a live or moving image?
Public Structure CAPSTATUS
Dim uiImageWidth As Integer
Dim uiImageHeight As Integer
Dim fLiveWindow As Integer
Dim fOverlayWindow As Integer
Dim fScale As Integer
Dim ptScroll As POINTAPI
Dim fUsingDefaultPalette As Integer
Dim fAudioHardware As Integer
Dim fCapFileExists As Integer
Dim dwCurrentVideoFrame As Integer
Dim dwCurrentVideoFramesDropped As Integer
Dim dwCurrentWaveSamples As Integer
Dim dwCurrentTimeElapsedMS As Integer
Dim hPalCurrent As Integer
Dim fCapturingNow As Integer
Dim dwReturn As Integer
Dim wNumVideoAllocated As Integer
Dim wNumAudioAllocated As Integer
End Structure
I use the following to access the structure...
Dim s As CAPSTATUS
bReturn = SendMessage(hHwnd, WM_CAP_GET_STATUS, Marshal.SizeOf(s), s)
Thanks a million for any assistance!
Thanks,
Jeremy