National Instruments NI-IMAQ Digital Camera User Manual


 
Chapter 3 Programming with NI-IMAQ for 1394
NI-IMAQ for IEEE-1394 Cameras User Manual 3-10 ni.com
Performing an Asynchronous Snap Using Low-Level Functions
The Low-Level Snap1394 Async example demonstrates howto perform an
asynchronous acquisition using low-level calls. The example sets up a
single-frame acquisition to a buffer.
In an asynchronous snap, the program installs a callback function using the
imaq1394InstallCallback
function and starts the acquisition with the
imaq1394StartAcquisition
function. When the buffer is ready, the
driver calls the callback function, allowing you to retrieve the image using
the
imaq1394GetBuffer
function.
One advantage of an asynchronous snap is that you canstart the acquisition
and then perform other tasks while waiting for the signal that the image is
ready.
Note
Since the callback function is called in a different thread than the main program, you
should make sure that all of your processing is thread-safe.
Performing an Asynchronous Grab using Low-Level Functions
The
Low-LevelGrab1394 Async
example demonstrates how to perform
an asynchronous grab acquisition using low-level calls. The example sets
up a continuous acquisition to a buffer.
The programinstalls a callbackfunction which iscalled each timean image
is acquired until the acquisition is stopped or until the callback function
returns FALSE.
Note
Because the callback function is called in a different thread than the main program,
you should make sure that all of your processing is thread-safe.