PDA

View Full Version : Using MemorySnapImageSequence to capture stills



surban28210
January 7, 2005, 14:45:31
I am using a ring buffer to capture a series of 10 still images. I am having trouble with the .MemorySnapTimeout property and with the allocation time required by the initial call to .MemorySnapImageSequence(IMAGE_COUNT).

As background, since the .MemorySnapImageSequence(IMAGE_COUNT) call blocks, I spawn a thread prior to calling it. My thread uses WinIO and the parallel port to trigger the sony camera.

If I capture 10 images with a timeout set to 500, shouldn't the blocking capture call fall through after 5 seconds? It never does.

Also, When I call the .MemorySnapImageSequence(IMAGE_COUNT) instruction, I assume there is some processing time to allocate buffers. How do I know when it is done? Otherwise my trigger thread triggers too soon.

Stefan Geissler
January 10, 2005, 13:58:33
Hello,



If I capture 10 images with a timeout set to 500, shouldn't the blocking capture call fall through after 5 seconds? It never does.

The “500” are milliseconds, this means this is a half of a second until the timeout occurs. But you are right, MemorySnapImageSequence does not react on a timeout. MemorySnapImage does.



Also, When I call the .MemorySnapImageSequence(IMAGE_COUNT) instruction, I assume there is some processing time to allocate buffers. How do I know when it is done? Otherwise my trigger thread triggers too soon.

If .LiveStart has not been called before, it will be called from .MemorySnapImageSequence internally. This will take some time. If your application calles .LiveStart and calls .MemorySnapImageSequence while the live video is running, no time should be used for initialization.