ZCL API – Software Chart

ZCL API – Software Chart. Sony XCD. Low-level Driver. H/W. IEEE1394 I/F Board (OHCI). User Application. API. Viewer. Application. ZCL Driver (Doesn't ...
35KB taille 35 téléchargements 75 vues
Sony ZCL API

ZCL API – Software Chart User Application Viewer Application

New Viewer Application ActiveX COM component

API

ZCL Camera Control Library (C++) Low-level Driver

H/W

Key

ZCL Driver (Doesn’t depend on MS) IEEE1394 I/F Board (OHCI)

Sony XCD

ZCL API – Flow Chart Start

Retrieve and open cameras Setup video output Allocate resources Request image Capture image No

Stop

Yes

Release resources

End

ZCL API – Retrieve Cameras Count • Retrieve cameras count ZCL_LIST *pList; ULONG Count; Count = 0; if( !ZCLGetList((pZCLLIST)&Count)) { // Failed to get the number of cameras return; } // Success

ZCL API – Retrieve Cameras List • Allocate the ZCL_LIST structure pList = (pZCL_LIST)malloc(sizeof(ZCL_LIST) + sizeof(pList->Info[0] * Count); pList->CameraCount = Count;

• Get the cameras list if ( !ZCLGetList( pList )) { // Failed to get the list return; } // Success!

ZCL API – Open Camera • Open the first available camera HCAMERA hCamera; UINT64 UID; UID = -1; if( !ZCLOpen( UID, &hCamera ) { // Failed to open the camera return; } // Success!

ZCL API – Open Cameras from NUID • Open cameras from the ZCL_LIST output P_hCamera = new HCAMERA [Count]; for( i=0; i