SetHeartbeatTimeoutCallback
|
|
[in] void* context
|
Address of the context in which the callback function will be called.
|
|
[in] HeartbeatTimeoutCallback callback
|
Address of the callback function
|
|
[in] bool connected
|
TRUE when the client application connects to the virtual camera, FALSE when disconnects.
|
|
S_OK
|
Success
|
E_FAIL
|
Failure
|
void heartbeatTimeoutCallback(void* context, bool connected)
|
{
|
return dlg->onHeartbeatTimeout(connected);
|
}
|
bool CGigemuDlg::onHeartbeatTimeout(bool connected)
|
{
|
if(connected)
|
printf("External client connected to virtual camera\n");
|
else
|
printf("External client disconnected from virtual camera\n");
|
|
return true;
|
}
|
....
|
static CGevCamera* m_pCamera;
|
m_pCamera = createCamera();
|
m_pCamera->SetHeartbeatTimeoutCallback(this, &::heartbeatTimeoutCallback);
|
....
|
}
|
|