Automatic camera detection with Zebra Clarity UHD
With Zebra Clarity UHD, Aurora Imaging Library provides autodetect DCFs and specific resolution DCFs. To use an autodetect DCF when allocating a digitizer, a camera must be connected to the specified acquisition path (M_DEVn). To use a specific resolution DCF, a camera does not necessarily need to be connected before the allocation.
You can hook a function to the event that occurs when a camera is connected or disconnected from the board using MsysHookFunction with the M_CAMERA_PRESENThook type. In the hook-handler function, you can inquire whether the event occurred upon the connection or disconnection of the camera using MsysGetHookInfo with M_CAMERA_PRESENT; you can establish to which acquisition path the camera was connected or disconnected from using MsysGetHookInfo withM_NUMBER. Based on this information, you can allocate or free the digitizer for the camera in the hook-handler function.
The following example demonstrates how to use automatic camera detection with Zebra Clarity UHD: MultiCameraDisplay.cpp. To run the example, you can use Example Launcher.