PVCAM  3.9.x
Programmable Virtual Camera Access Method library
Callbacks

Typedefs

typedef void(PV_DECL * PL_CALLBACK_SIG_LEGACY) (void)
 
typedef void(PV_DECL * PL_CALLBACK_SIG_EX) (void *pContext)
 
typedef void(PV_DECL * PL_CALLBACK_SIG_EX2) (const FRAME_INFO *pFrameInfo)
 
typedef void(PV_DECL * PL_CALLBACK_SIG_EX3) (const FRAME_INFO *pFrameInfo, void *pContext)
 

Detailed Description

Use these callback function signatures with corresponding callback registering functions to register for various camera notifications.

C++ code example: (Proper error handling and other camera initialization omitted for clarity)

void MyCamera::initialize()
{
// Register for the End-Of-Frame notifications, passing 'this' as a context
// in order to properly forward the notification to this class.
pl_cam_register_callback_ex3(m_hCam, PL_CALLBACK_EOF, (void*)pvcamCallbackEofEx3, this);
}
void MyCamera::handleEofCallback(const FRAME_INFO* pFrameInfo)
{
uns16* pFrameData = NULL;
pl_exp_get_latest_frame(m_hCam, (void**)&pFrameData);
// The displayFrame() should not do any lengthy processing, we need to
// release the callback routine as quickly as possible.
displayFrame(pFrameData, pFrameInfo);
}
// Using the PL_CALLBACK_SIG_EX3 function signature. This function is declared
// as static in the header file.
void PV_DECL MyCamera::pvcamCallbackEofEx3(const FRAME_INFO* pFrameInfo, void* pContext)
{
MyCamera* pCamera = static_cast<MyCamera*>(pContext);
pCamera->handleEofCallback(pFrameInfo);
}

Typedef Documentation

◆ PL_CALLBACK_SIG_EX

typedef void(PV_DECL * PL_CALLBACK_SIG_EX) (void *pContext)

A callback function signature for the pl_cam_register_callback_ex function.

Parameters
[in]pContextA pointer to the user defined context that was previously passed into the pl_cam_register_callback_ex function.

◆ PL_CALLBACK_SIG_EX2

typedef void(PV_DECL * PL_CALLBACK_SIG_EX2) (const FRAME_INFO *pFrameInfo)

A callback function signature for the pl_cam_register_callback_ex2 function.

Parameters
[in]pFrameInfoA pointer to a FRAME_INFO structure uniquely identifying the incoming frame.

◆ PL_CALLBACK_SIG_EX3

typedef void(PV_DECL * PL_CALLBACK_SIG_EX3) (const FRAME_INFO *pFrameInfo, void *pContext)

A callback function signature for the pl_cam_register_callback_ex3 function.

Parameters
[in]pFrameInfoA pointer to a FRAME_INFO structure uniquely identifying the incoming frame.
[in]pContextA pointer to the user defined context that was previously passed into the pl_cam_register_callback_ex3 function.

◆ PL_CALLBACK_SIG_LEGACY

typedef void(PV_DECL * PL_CALLBACK_SIG_LEGACY) (void)

A callback function signature for the pl_cam_register_callback function.