ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is...

326
1 SDK V4.6.0 API Document Ver. 2.0.0.110302.003

Transcript of ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is...

Page 1: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

1

SDK V4.6.0

API Document

Ver. 2.0.0.110302.003

Page 2: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

2

Revision HistoryVersion Number

Date Author Note

2.0 2011/03/31 Shawn Ho First draft of the ATL sample code manual2.0.1 2011/04/28 Rafael Chen First draft of the API interface manul2.1.0 2011/5/12 Rafael Chen 1. Add new comment for

LiveView_AttachSession and PlayBack_OpenRecord

2. Revise sample code description2.2.0 2011/10/11 Gami Yang 1. Add comment for new supported APIs :

(Querying records/event logs, PTZ preset, ...etc.)

2.3.0 2011/12/08 Mike Su 1. Modify comment due to Titan support2. Add comment for new supported APIS(

C#/VS 2010 compatible APIs, Evport video)2.4.0 2012/02/16 Gami Yang 1. Add comment for Playback_Seek2.5.0 2012/08/30 Gami Yang 1. Add comment for new supported APIs(Talk

and event notification, etc.)3.0.0 2013/03/22 Gami Yang 1. Add comment for new supported

APIS(Getting the associated device of digital input and image scaling)

3.1.0 2013/8/12 Gami Yang 1. Add comment for new supported APIS(Metadata, backup. Open sequenced record)

4.0.0 2014/04/30 Eugen Chen 1. Support Crystal TiTan NVR4.1.0 2014/05/22 Eugen Chen 1. Support 64 Channel LiveView

2. Support 5x5 LiveView in ActiveX4.2.0 2014/09/05 Eugen Chen 1. Support dual record4.3.0 2015/02/12 Eugen Chen/

Jeff Hsu1. Mainconsole privacy mask

4.4.0 2015/03/16 Jeff Hsu 1. Manconsole 96 channel LiveView4.5.0 2015/07/24 Jeff Hsu 1. Support Crystal 3.04.5.1 2015/07/31 Jeff Hsu 1. Support ActiveX OSD time format 12 or 24

2. Add new interface : Create_Handle_With_DeviceInfo, Info_UpdateDeviceInfo

4.5.2 2015/08/27 Jeff Hsu 1. Add event filter4.6.0 2016/01/25 Rocking 1. Query metadata device from crystal

2. Query metadata log from crystal3. Download playback raw video as soon as

possible from Mainconsole:

Page 3: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

3

Support server versionMainConsole 5.0.31 or aboveMini2 02.02.0001.0004 or aboveSolo 02.02.0002.0004 or aboveTitan 01.06.0000.0213 or aboveCrystal 03.00.0000.0033 or above

Add interface from 4.5.2 to 4.6.0Info_GetMetadataSourceList_ExtInfo_ReleaseMetadataSourceList_ExtInfo_GetMetadataLog_ExtInfo_ReleaseMetadataLog_ExtPlayBack_GetRawFrameDirectlyPlayBack_StopGetRawFrameDirectlyInfo_QueryRecordLogsExt

ContentScope Introduction...................................................................................................................................1API Interface...........................................................................................................................................2

Create_HandleWChar......................................................................................................2 Create_Handle_And_Event_Subscribe...........................................................................4 Create_Handle_With_DeviceInfo...................................................................................6 Destroy_Handle...............................................................................................................7 Info_GetServerInfo..........................................................................................................9 Info_ReleaseServerInfo.................................................................................................10 Info_GetDeviceList_CS................................................................................................11 Info_ReleaseDeviceList_CS..........................................................................................11 Info_GetDeviceList_Ext................................................................................................12 Info_ReleaseDeviceList_Ext.........................................................................................14 Info_GetDeviceCapability_Ext.....................................................................................15 Info_GetDeviceOrder....................................................................................................16 Info_GetDIOStatus_Ext................................................................................................17 Info_GetDOPrivilegeExt...............................................................................................18 Info_GetDIAssociatedDevice........................................................................................19 Info_GetPTZPreset_CS_Ext.........................................................................................20 Info_ReleasePTZPreset_CS_Ext...................................................................................21 Info_GetPTZInfo_CS....................................................................................................22 Info_ReleasePTZInfo_CS.............................................................................................23 Info_GetPTZCapabilityExt...........................................................................................24 Info_GetSensorProfileList_CS1....................................................................................25 Info_ReleaseSensorProfileList_CS1.............................................................................26 Info_GetSensorProfileList_Ext.....................................................................................26 Info_ReleaseSensorProfileList_CS...............................................................................28 Info_GetRecordDateList...............................................................................................29 Info_GetRangedRecordDateList...................................................................................30 Info_ReleaseRecordDateList.........................................................................................32 Info_GetRecordDateListExt..........................................................................................33 Info_GetScheduleLogs..................................................................................................33 Info_ReleaseScheduleLogs...........................................................................................35

Page 4: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

4

Info_GetScheduleLogsList............................................................................................36 Info_ReleaseScheduleLogsList.....................................................................................37 Info_GetRecordLogsExt................................................................................................38 Info_QueryRecordLogsExt...........................................................................................39 Info_ReleaseRecordLogsExt.........................................................................................41 Info_GetRecordLogsListExt.........................................................................................42 Info_ReleaseRecordLogsListExt...................................................................................43 Info_GetSequencedRecord............................................................................................43 Info_ReleaseSequencedRecord.....................................................................................45 Info_QueryEvents..........................................................................................................46 Info_ReleaseEvents.......................................................................................................48 Info_QueryEventExt......................................................................................................49 Info_ReleaseEventsExt..................................................................................................50 Info_GetMetadataLog...................................................................................................51 Info_ReleaseMetadataLog.............................................................................................53 Info_GetMetadataLog_Ext............................................................................................54 Info_ReleaseMetadataLog_Ext.....................................................................................56 Info_GetMetadataSourceList........................................................................................57 Info_ReleaseMetadataSourceList..................................................................................58 Info_GetMetadataSourceList_Ext.................................................................................59 Info_ReleaseMetadataSourceList_Ext..........................................................................60 Info_GetBackupFileSize...............................................................................................61 Info_UpdateDeviceInfo.................................................................................................63 Control_PTZ_CS_Ext...................................................................................................63 Control_PTZ_PTZDeviceID_CS_Ext...........................................................................65 Control_DigitalOutput_Ext...........................................................................................66 Control_SetPatrol..........................................................................................................67 Talk_Enable...................................................................................................................68 Talk_Disable..................................................................................................................70 Talk_SendAudioPacket.................................................................................................71 Talk_GetEnableID.........................................................................................................73 Event_Subscribe............................................................................................................74 Event_Unsubscribe........................................................................................................76 Event_SubscribeExt......................................................................................................77Event_UnsubscribeExt..................................................................................................................78Event_DuplicateFilter....................................................................................................................79 LiveView_CreatePlayer.................................................................................................80 LiveView_DestroyPlayer..............................................................................................81 LiveView_AttachSessionExtExt...................................................................................82 LiveView_DetachSessionExtExt...................................................................................84 LiveView_AttachRawVideoSession..............................................................................85 LiveView_SetAudioOn.................................................................................................87 LiveView_SetAudioOff.................................................................................................88 LiveView_GetSessionAudioStatus................................................................................89 LiveView_GetSessionCurrentImage.............................................................................90 LiveView_ReleaseSessionCurrentImage.......................................................................91 LiveView_SubscribeMetadata.......................................................................................92 LiveView_UnsubscribeMetadata..................................................................................94 Playback_CreatePlayer..................................................................................................94 Playback_DestroyPlayer................................................................................................96 PlayBack_AttachSession1ExtExt..................................................................................97 PlayBack_DetachSessionExtExt...................................................................................99

Page 5: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

5

PlayBack_AttachRawVideoSession............................................................................100 PlayBack_Seek............................................................................................................102 PlayBack_OpenRecord................................................................................................103 PlayBack_OpenSequencedRecord..............................................................................104 PlayBack_GetRawFrameDirectly...............................................................................106 PlayBack_StopGetRawFrameDirectly........................................................................108 PlayBack_Play.............................................................................................................109 PlayBack_ReversePlay................................................................................................110 PlayBack_Pause...........................................................................................................111 PlayBack_StepForward...............................................................................................112 PlayBack_StepBackward.............................................................................................113 PlayBack_Next............................................................................................................114 PlayBack_Previous......................................................................................................115 PlayBack_SetSpeed.....................................................................................................116 PlayBack_GetSpeed....................................................................................................117 PlayBack_GetTime......................................................................................................118 PlayBack_GetPlayerState............................................................................................119 PlayBack_ExportVideo...............................................................................................120 PlayBack_StopExport..................................................................................................122 PlayBack_ExportVideo_Ext........................................................................................123 PlayBack_StopExport_Ext..........................................................................................124 PlayBack_GetExportFormatList.................................................................................125 PlayBack_ReleaseExportFormatList...........................................................................127 Playback_GetSessionCurrentImage............................................................................128 PlayBack_ReleaseSessionCurrentImage.....................................................................129 Backup_Initial.............................................................................................................130 Backup_Uninit.............................................................................................................132 Backup_GetBackupFileItemList.................................................................................133 Backup_ReleaseBackupFileItemList..........................................................................134 Backup_SetBackupDestinationDir..............................................................................135 Backup_Start...............................................................................................................136 Backup_Pause..............................................................................................................137 Backup_Resume..........................................................................................................138 Backup_Abort..............................................................................................................139 Utility_SaveSnapShotImage........................................................................................140 Utility_AddImageWaterMark......................................................................................142 Utility_AddVideoWaterMark......................................................................................143 Utility_ScaleImage......................................................................................................144 Np_DateTime..............................................................................................................146 Np_Frame....................................................................................................................148 Np_ID..........................................................................................................................149 Np_ID_Ext..................................................................................................................150 Np_IDList....................................................................................................................151 Np_IDList_Ext............................................................................................................152 Np_Period....................................................................................................................153 Np_SensorProfile........................................................................................................154 Np_SubDevice.............................................................................................................155 Np_Device...................................................................................................................156 Np_DeviceGroup.........................................................................................................157 Np_DeviceList.............................................................................................................158 Np_LogConditions......................................................................................................159 Np_OperationLog........................................................................................................160

Page 6: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

6

Np_ConfigurationLog.................................................................................................161 Np_Log........................................................................................................................162 Np_ScheduleLogItem..................................................................................................163 Np_RecordLogItem.....................................................................................................164 Np_RecordLogItemExt...............................................................................................165 Np_ScheduleLogList...................................................................................................165 Np_ScheduleLogListList.............................................................................................167 Np_RecordLogList......................................................................................................167Np_RecordLogListExt................................................................................................................168 Np_SequencedRecordList...........................................................................................168 Np_SequencedRecord.................................................................................................170 Np_Event.....................................................................................................................171 Np_EventList...............................................................................................................172 Np_RecordDateList.....................................................................................................173 Np_MetadatalogList....................................................................................................174 Np_MetadatalogItem...................................................................................................175 Np_MetadataSearchCriterion......................................................................................176 Np_MetadataSourceList..............................................................................................177 Np_MetadataSource....................................................................................................178 Np_MetadataChannelList............................................................................................179 Np_MetadataChannel..................................................................................................180 Np_MetadatalogList_Ext............................................................................................182 Np_MetadatalogItem_Ext...........................................................................................183 Np_MetadataSearchCriterion_Ext..............................................................................184 Np_MetadataSourceList_Ext......................................................................................185 Np_MetadataSource_Ext.............................................................................................186 Np_MetadataChannelList_Ext....................................................................................187 Np_MetadataChannel_Ext..........................................................................................188 Np_PTZContinuousMove...........................................................................................189 Np_PTZRectangle.......................................................................................................191 Np_PTZPreset.............................................................................................................192 Np_PTZParameter.......................................................................................................193 Np_PTZControlParam.................................................................................................194 Np_TalkAudioFormat..................................................................................................195 Np_ServerInfo_MainConsole......................................................................................196 Np_ServerInfo.............................................................................................................198 Np_ExportContent.......................................................................................................199 Np_ExportProfile........................................................................................................200 Np_ExportProfileList..................................................................................................201 Np_ExportFormat........................................................................................................202 Np_ExportFormatList..................................................................................................203 Np_SensorProfile........................................................................................................204 Np_SensorProfile_CS..................................................................................................205 Np_SensorProfile_CS1................................................................................................205 Np_SensorProfile_CS_List.........................................................................................207 Np_SensorProfile_CS1_List.......................................................................................208 Np_SubDevice_CS......................................................................................................208 Np_SubDevice_Ext.....................................................................................................210 Np_SubDevice_CS_List..............................................................................................211 Np_SubDevice_Ext_List.............................................................................................212 Np_Device_CS............................................................................................................213 Np_Device_Ext...........................................................................................................214

Page 7: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

7

Np_Device_CS_List....................................................................................................215 Np_Device_Ext_List...................................................................................................216 Np_DeviceGroup_CS..................................................................................................217 Np_DeviceGroup_Ext.................................................................................................218 Np_DeviceGroup_CS_List..........................................................................................219 Np_DeviceGroup_Ext_List.........................................................................................220 Np_DeviceList_CS......................................................................................................221 Np_DeviceList_Ext.....................................................................................................222 Np_PTZPreset_CS......................................................................................................223 Np_PTZPreset_CS_List..............................................................................................224 Np_PTZInfo_CS..........................................................................................................225 Np_PTZPresetType_CS...............................................................................................226 Np_PTZPatrol_CS.......................................................................................................227 Np_PatrolGroup_CS....................................................................................................228 Np_PTZParameter_CS................................................................................................229 Np_PTZControlParam_CS..........................................................................................230 RecordingLog_Subscribe............................................................................................231 RecordingLog_Unsubscribe........................................................................................232 Np_SourceType...........................................................................................................233 Np_ScheduleLogItem..................................................................................................234

Sample code.........................................................................................................................................235 Liveview Streaming.....................................................................................................235 PTZ Control.................................................................................................................238 View recorded stream..................................................................................................240 Playback control..........................................................................................................243

Page 8: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

1

Scope Introduction

SDK 4.0 is capable of retrieving information from all recording servers, including

MainConsole, NVR mini2, NVRSolo, NVRTitan, and Crystal Titan NVR. This release includes

features for LiveStreaming, Recorded video query, PTZ control, Digital Output control and

Digital Input status. This document provides a introduction for API interface.

Page 9: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

2

API Interface

Create_HandleWChar

Purpose Compatibility

Initialize connection to a specific recording server

For all platform

Syntax:

Np_Result_t Create_HandleWChar (void** handle, Np_ServerType type, const wchar_t* username, const wchar_t* passwd, const wchar_t* ipaddress, WORD port, const wchar_t* cachepath);Parameters:

Name Meaning

[OUT] handleHandle pointer (will be used in later

API)

[IN] type

Server type. Supported value in this version is

kMainConsoleLiveview :MainConsole Liveview

kMainConsolePlayback :MainConsole Playback

kCrystal:Titan/Crystal Server

[IN] username User name for server login

[IN] passwd Password for server login

Page 10: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

3

[IN] ipaddress Server IP address

[IN] port Server port

[IN] cachepath (option)Set a specific folder to be

cachepath (Crystal Family only)

Return Value:Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:

It is programmer’s responsibility to release the allocated memory by calling Destroy_Handle function.

Page 11: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

4

Create_Handle_And_Event_Subscribe

Purpose Compatibility

Initialize connection and subscribe event notification to a

specific recording server.Mainconsole Family only

Syntax:

Np_Result_t Create_Handle_And_Event_Subscrivbe (void** handle, Np_ServerType type, const wchar_t* username, const wchar_t* passwd, const wchar_t* ipaddress, WORD port, fnEventHandle callback, void* ctx); Parameters:

Name Meaning

[OUT] handleHandle pointer (will be used in later

API)

[IN] type

Server type. Supported value in this version is

kMainConsoleLiveview : MainConsole Liveview

[IN] username User name for server login

[IN] passwd Password for server login

[IN] ipaddress Server IP address

[IN] port Server port

[IN] callbackCallback function, called when

event present.

[IN] ctx Extra information which will be

Page 12: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

5

carried to each callback function call as a parameter. Reserved for

programmer’s usage.

Return Value:Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:

It is programmer’s responsibility to release the allocated memory by calling Destroy_Handle function.

Page 13: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

6

Create_Handle_With_DeviceInfo

Purpose Compatibility

Initialize connection to a specific recording server with updating

device list.Mainconsole Family only

Syntax:

Np_Result_t Create_HandleWChar (void** handle, Np_ServerType type, const wchar_t* username, const wchar_t* passwd, const wchar_t* ipaddress, WORD port, Np_DeviceCapability deviceCapability, const wchar_t* cachepath);

Parameters:

Name Meaning

[OUT] handleHandle pointer (will be used in later

API)

[IN] type

Server type. Supported value in this version is

kMainConsoleLiveview :MainConsole Liveview

kMainConsolePlayback :MainConsole Playback

kCrystal:Titan/Crystal Server

[IN] username User name for server login

[IN] passwd Password for server login

[IN] ipaddress Server IP address

Page 14: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

7

[IN] port Server port

[IN] deviceCapability

The bit wise combination of flags for the supported capabilities, see

the enum “Np_DeviceCapability” in NpClient.h for the meaning of each

flag.

[IN] cachepath (option)Set a specific folder to be

cachepath (Crystal Family only)

Return Value:Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:

It is programmer’s responsibility to release the allocated memory by calling Destroy_Handle function.

Destroy_Handle

Purpose Compatibility

Release the memory allocated by Create_HandleWChar /

Create_Handle_And_Event_SubscribeFor all platform

Syntax:

Np_Result_t Destroy_Handle (void* handle)Parameters:

Name Meaning

[IN] handleHandle pointer returned by

Create_HandleWChar / Create_Handle_And_Event_Subscribe

Page 15: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

8

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 16: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

9

Info_GetServerInfo

Purpose Compatibility

Get the information of server such as version, type, … etc.

Mainconsole Family only.

Syntax:

Np_Result_t Info_GetServerInfo (void* handle, Np_ServerInfo& serverInfo);Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT] serverInfoThe information of the server. Ctrl+Click the Np_ServerInfo listed above to check

its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created

Remarks:

It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseServerInfo function.

Page 17: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

10

Info_ReleaseServerInfo

Purpose Compatibility

Release the resources allocated by Info_GetServerInfo

Mainconsole Family only.

Syntax:

Np_Result_t Info_ReleaseServerInfo (void* handle, Np_ServerInfo& serverInfo);Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT] serverInfo

The info structure passed to previous successful call of Info_GetServerInfo.

After calling this function, the info will be released and should never be used

again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 18: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

11

Info_GetDeviceList_CS

Purpose Compatibility

Get the device list from the server, including cameras, PTZ

device, and I/O device.For all platform.

Syntax:

Np_Result_t Info_GetDeviceList_CS (void* handle, Np_DeviceList_CS & deviceList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT] deviceListThe device list of the server. Ctrl+Click the Np_DeviceList_ CS listed above to check its

structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseDeviceList_CS function.

Page 19: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

12

Info_ReleaseDeviceList_CS

Purpose Compatibility

Release all the resources allocated by

Info_GetDeviceList_ CS .For all platform.

Syntax:

Np_Result_t Info_ReleaseDeviceList_Ext (void* handle, Np_DeviceList_Ext& deviceList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT] deviceList

The device list passed to previous successful call of Info_GetDeviceList_CS. After calling this function, the list will be

released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Info_GetDeviceList_Ext

Purpose Compatibility

Page 20: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

13

Get the device list from the server, including cameras, PTZ

device, and I/O device.For all platform.

Syntax:

Np_Result_t Info_GetDeviceList_Ext (void* handle, Np_DeviceList_Ext & deviceList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT] deviceListThe device list of the server. Ctrl+Click the Np_DeviceList_Ext listed above to check

its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseDeviceList_Ext function.

Page 21: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

14

Info_ReleaseDeviceList_Ext

Purpose Compatibility

Release all the resources allocated by

Info_GetDeviceList_Ext.For all platform.

Syntax:

Np_Result_t Info_ReleaseDeviceList_Ext (void* handle, Np_DeviceList_Ext& deviceList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT] deviceList

The device list passed to previous successful call of Info_GetDeviceList_Ext. After calling this function, the list will be

released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 22: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

15

Info_GetDeviceCapability_Ext

Purpose Compatibility

Get capability of a device For all platform

Syntax:

Np_Result_t Info_GetDeviceCapability_Ext (void* handle,Np_ID_Ext id, long long& capability);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identification of device, which can be

referred from Np_Device_Ext.

[OUT]status

The bit wise combination of flags for the supported capabilities, see the enum

“Np_DeviceCapability” in NpClient.h for the meaning of each flag.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 23: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

16

Info_GetDeviceOrder

Purpose Compatibility

Get the order of the specified device

For Titan/Crystal only

Syntax:

Np_Result_t Info_GetDeviceOrder(void *handle,Np_ID_Ext id,int &order);

Parameters:

Name Meaning

[IN] handleThe handle allocated by Create_HandleWChar

[IN] idThe identification of the device, which can be referred from Np_Device_Ext .

[OUT] order The order of the device.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 24: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

17

Info_GetDIOStatus_Ext

Purpose Compatibility

Get status of a single I/O device For all platform.

Syntax:

Np_Result_t Info_GetDIOStatus_Ext (void* handle,Np_ID_Ext id, Np_DIOStatus& status);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identification of I/O device, which can

be referred from Np_Device_Ext.

[OUT]status

The status of I/O status. The value is possible

kDIO_OFF kDIO_ON

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 25: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

18

Info_GetDOPrivilegeExt

Purpose Compatibility

Get privilege information of controlling output pins on specific

deviceFor all platform.

Syntax:

Np_Result_t Info_GetDOPrivilegeExt (void* handle,Np_ID_Ext id, DWORD& dwDOPrivilege);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identification of I/O device, which can

be referred from Np_Device_Ext.

[OUT]dwDOPrivilegeThe bit wise combination of flag for

privilege of each output pin, first bit for the first pin and so on.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 26: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

19

Info_GetDIAssociatedDevice

Purpose Compatibility

Get the identification of the associated device on the specific

digital input.Mainconsole Family only.

Syntax:

Np_Result_t Info_GetDIAssocaitedDevice (void* handle,Np_ID id, Np_ID& associatedDevice);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identification of digital input device,

which can be referred fromNp_Device_CS.

[OUT]associatedDeviceThe identification of the associated

device.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 27: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

20

Info_GetPTZPreset_CS_Ext

Purpose Compatibility

Get the list of PTZ presets for specific device.

For all platform.

Syntax:

Np_Result_t Info_GetPTZPreset_CS_Ext (void* handle, Np_ID_Ext id, Np_PTZPreset_CS_List& ptzPresetList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identification of PTZ device, which can be referred from Np_Device_Ext .

[OUT]ptzPresetListList of PTZ presets. Ctrl+Click the

Np_PTZPreset_CS_List listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.It is programmer’s responsibility to release the allocated memory by calling Info_ReleasePTZPreset_CS_Ext function.

Page 28: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

21

Info_ReleasePTZPreset_CS_Ext

Purpose Compatibility

Release all the resources allocated by Info_GetPTZPreset_CS_Ext .

For all platform.

Syntax:

Np_Result_t Info_ReleasePTZPreset_CS_Ext (void* handle, Np_PTZPreset_CS_List& ptzPresetList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT]ptzPresetList

The list passed to previous successful call of Info_GetPTZPreset_CS_Ext. After calling this function, the list will be

released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 29: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

22

Info_GetPTZInfo_CS

Purpose Compatibility

Get PTZ information for specific device.

Mainconsole Family only.

Syntax:

Np_Result_t Info_GetPTZInfo_CS (void* handle, Np_ID id, Np_PTZInfo_CS & ptzInfo);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identification of PTZ device, which can be referred from Np_Device_CS.

[OUT]ptzPresetListPTZ information. Ctrl+Click the

Np_PTZInfo_CS listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 30: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

23

Info_ReleasePTZInfo_CS

Purpose Compatibility

Release all the resources allocated by Info_GetPTZInfo_CS .

Mainconsole Family only.

Syntax:

Np_Result_t Info_ReleasePTZInfo_CS (void* handle, Np_PTZInfo_CS& ptzInfo);Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT]ptzPresetList

The list passed to previous successful call of Info_GetPTZInfo_CS. After calling this

function, the list will be released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 31: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

24

Info_GetPTZCapabilityExt

Purpose Compatibility

Get capability of PTZ operation for specific device

For all platform.

Syntax:

Np_Result_t Info_GetPTZCapabilityExt (void* handle, Np_ID_Ext id, long long& ptzCapability);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identification of PTZ device, which can be referred from Np_Device_Ext.

[OUT]ptzCapability

The bit wise combination of flags for the supported capabilities, see the enum

“Np_PTZCap” in NpClient.h for the meaning of each flag.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 32: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

25

Info_GetSensorProfileList_CS1

Purpose Compatibility

Get supported sensor (quality) profile list for specific device.(Dual

record)Mainconsole Family only.

Syntax:

Np_Result_t Info_GetSensorProfileList_CS1 (void* handle,Np_ID id,Np_SensorProfile_CS1_List& sensorProfileList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identification of sensor device, which

can be referred from Np_Device_CS.

[OUT]sensorProfileListList of supported sensor profile. Ctrl+Click

the Np_SensorProfile_CS1_List listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.It is programmer’s responsibility to release the allocated memory by calling

Page 33: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

26

Info_ReleaseSensorProfileList_CS1 function.

Info_ReleaseSensorProfileList_CS1

Purpose Compatibility

Release all the resources allocated by Info_GetSensorProfileList_CS1.

Mainconsole Family only.

Syntax:

Np_Result_t Info_ReleaseSensorProfileList_CS1 (void* handle,Np_SensorProfile_CS1_List& sensorProfileList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT]sensorProfileList

The list passed to previous successful call of Info_GetSensorProfileList_CS1. After

calling this function, the list will be released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h. Info_GetSensorProfileList_Ext

Purpose Compatibility

Get supported sensor (quality) profile list for specific device.

For all platform.

Page 34: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

27

Syntax:

Np_Result_t Info_GetSensorProfileList_Ext (void* handle,Np_ID_Ext id,

Np_SensorProfile_CS_List& sensorProfileList);Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identification of sensor device, which

can be referred from Np_Device_Ext.

[OUT]sensorProfileListList of supported sensor profile. Ctrl+Click

the Np_SensorProfile_CS_List listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseSensorProfileList_CS function.

Page 35: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

28

Info_ReleaseSensorProfileList_CS

Purpose Compatibility

Release all the resources allocated by Info_GetSensorProfileList_Ext.

For all platform.

Syntax:

Np_Result_t Info_ReleaseSensorProfileList_CS (void* handle,Np_SensorProfile_CS_List& sensorProfileList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT]sensorProfileList

The list passed to previous successful call of Info_GetSensorProfileList_Ext. After

calling this function, the list will be released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 36: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

29

Info_GetRecordDateList

Purpose Compatibility

Get list of date in which video(s) are recorded

Mainconsole Family only.

Syntax:

Np_Result_t Info_GetRecordDateList (void* handle, Np_RecordDateList& recordDateList);

Parameters:

Name Meaning

[IN] handleThe handle allocated by Create_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT]recordDateListList of dates in which videos are

recorded.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseRecordDateList function

Deprecated, this function only supported under MainConsole Playback, use Info_GetRangedRecordDateList instead.

Page 37: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

30

Info_GetRangedRecordDateList

Purpose Compatibility

Get list of date during a specified period(time range) in which

video(s) are recordedMainconsole Family only.

Syntax:

Np_Result_t Info_GetRangedRecordDateList (void* handle, Np_DateTime* startDate, Np_DateTime* endDate, Np_RecordDateList& recordDateList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] startDateStart date of the query, could be passed

as NULL only under MainConsole Playback mode.

[IN] endDateEnd date of the query, could be passed as NULL only under MainConsole Playback

mode.

[OUT]recordDateList List of dates in which videos are recorded.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and

Page 38: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

31

a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseRecordDateList function

Page 39: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

32

Info_ReleaseRecordDateList

Purpose Compatibility

Release all the resources allocated by Info_GetRecordDateList /

Info_GetRangedRecordDateList.Mainconsole Family only.

Syntax:

Np_Result_t Info_ReleaseRecordDateList (void* handle, Np_RecordDateList& recordDateList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT]recordDateList

The list passed to previous successful call of Info_GetRecordDateList. After calling

this function, the list will be released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 40: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

33

Info_GetRecordDateListExt

Purpose Compatibility

Get list of date in which video(s) are recorded

For Titan/Crystal only

Syntax:

Np_Result_t Info_GetRecordDateList (void* handle, Np_DateTime& query_month);

Parameters:

Name Meaning

[IN] handleThe handle allocated by Create_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] query_month Query a monthly log.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Info_GetScheduleLogs

Purpose Compatibility

Get list of recording schedules in specific date.

Mainconsole Family only.

Syntax:

Np_Result_t Info_GetScheduleLogs (void* handle,

Page 41: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

34

Np_DateTime date, Np_ScheduleLogList& scheduleLogList);

Parameters:

Name Meaning

[IN] handleThe handle allocated by Create_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] dateDate to query, while only the

year/month/day fields are referred.

[OUT]scheduleLogListList of recording schedules. Ctrl+Click

the Np_ScheduleLogList listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:

This function is MainConsole Playback only. Titan/Corporate don’t have schedule log.

If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseScheduleLogs function

Page 42: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

35

Info_ReleaseScheduleLogs

Purpose Compatibility

Release the resources allocated by Info_GetScheduleLogs.

Mainconsole Family only.

Syntax:

Np_Result_t Info_ReleaseScheduleLogs (void* handle, Np_ScheduleLogList& scheduleLogList);

Parameters:

Name Meaning

[IN] handleThe handle allocated by Create_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT]scheduleLogList

The list passed to previous successful call of Info_GetScheduleLogs. After calling this function, the list will be released and should never be used

again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:

This function is MainConsole Playback only. Titan/Corporate servers don’t have schedule log.

Page 43: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

36

Info_GetScheduleLogsList

Purpose Compatibility

Get list of recording schedules in specific date for dual record.

Mainconsole Family only.

Syntax:

Np_Result_t Info_GetScheduleLogsList (void* handle, Np_DateTime date, Np_ScheduleLogListList& scheduleLogListList);

Parameters:

Name Meaning

[IN] handleThe handle allocated by Create_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] dateDate to query, while only the

year/month/day fields are referred.

[OUT]scheduleLogListListList of recording schedules. Ctrl+Click

the Np_ScheduleLogListList listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:

This function is MainConsole Playback only. Titan/Corporate don’t have schedule log.

If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 44: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

37

It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseScheduleLogsList function

Info_ReleaseScheduleLogsList

Purpose Compatibility

Release the resources allocated by Info_GetScheduleLogsList.

Mainconsole Family only.

Syntax:

Np_Result_t Info_ReleaseScheduleLogs (void* handle, Np_ScheduleLogListList& scheduleLogListList);

Parameters:

Name Meaning

[IN] handleThe handle allocated by Create_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT]scheduleLogList

The list passed to previous successful call of Info_GetScheduleLogsListList. After calling this function, the list will be released and should never be used

again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:

This function is MainConsole Playback only. Titan/Corporate servers don’t have schedule log.

Page 45: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

38

Page 46: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

39

Info_GetRecordLogsExt

Purpose Compatibility

Get list of recorded videos in specific date.

For all platform.

Syntax:Np_Result_t Info_GetRecordLogsExt (void* handle,

Np_DateTime date, Np_RecordLogListExt& scheduleLogList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] dateDate to query, while only the

year/month/day fields are referred.

[OUT] recordLogListList of the recorded videos. Ctrl+Click the

Np_RecordLogListExt listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseRecordLogsExt function

Page 47: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

40

Info_QueryRecordLogsExt

Purpose Compatibility

Query list of recorded videos for specific camera and time.

For all version of crystal & Titan.For MainConsole greater or equal than

6.8.Mini & solo does not support.

Syntax:Np_Result_t Info_GetRecordLogsExt (void* handle,

Np_IDList_Ext idListNp_DateTime startTime,Np_DateTime endTime Np_RecordLogListExt& recordLogList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idListThe list of camera sensor. This id list

information can be referred from Np_IDList_Ext.

[IN] startTime StartTime to query

[IN] endTime EndTime to query

[OUT] recordLogListList of the recorded videos. Ctrl+Click the

Np_RecordLogListExt listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is

Page 48: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

41

defined at NpClientDefine.h.

Remarks:

1. MainConsole will return all the record log for the date in parameter (time is ignored). Date in the startTime and endTime should be the same. Ex:2016/10/17 14:00 ~ 2016/10/17 15:00 will return the all record log in 2016/10/17 (time is ignored)

2016/10/17 14:00 ~ 2016/10/18 15:00 is invalid argument

While in Crystal, there are no such limitation.

2. If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created. It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseRecordLogsExt function

Page 49: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

42

Info_ReleaseRecordLogsExt

Purpose Compatibility

Release the resources allocated by Info_GetRecordLogsExt.

For all platform.

Syntax:

Np_Result_t Info_ReleaseRecordLogsExt (void* handle, Np_RecordLogListExt& recordLogList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT]recordLogList

The list passed to previous successful call of Info_GetRecordLogsExt. After calling

this function, the list will be released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 50: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

43

Info_GetRecordLogsListExt

Purpose Compatibility

Get list of recorded videos in specific date for dual record.

For all platform.

Syntax:Np_Result_t Info_GetRecordLogsListExt (void* handle,

Np_DateTime date, Np_RecordLogsListExt& scheduleLogList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] dateDate to query, while only the

year/month/day fields are referred.

[OUT] scheduleLogListList of the recorded videos. Ctrl+Click the

Np_RecordLogListExt listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseRecordLogsListExt function

Page 51: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

44

Info_ReleaseRecordLogsListExt

Purpose Compatibility

Release the resources allocated by Info_GetRecordLogsListExt.

For all platform.

Syntax:

Np_Result_t Info_ReleaseRecordLogsListExt (void* handle, Np_RecordLogListExt& recordLogListList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT]recordLogListList

The list passed to previous successful call of Info_GetRecordLogsListExt. After calling this function, the list will be

released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Info_GetSequencedRecord

Purpose Compatibility

Get list of recorded videos with sequence number in specific date.

Mainconsole Family only.

Page 52: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

45

Syntax:

Np_Result_t Info_GetSequencedRecord (void* handle, Np_DateTime startTime, Np_DateTime endTime, Np_IDList idList, Np_SequencedRecordList &options)

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[IN] startTime Start date of the query interval

[IN] endTime End date of the query interval

[IN] idList The id list to be queried

[OUT] options

List of the recorded videos with sequence number. Ctrl+Click the

Np_SequencedRecordList listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseSequencedRecord function

This function is MainConsole Playback only.

Page 53: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

46

Page 54: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

47

Info_ReleaseSequencedRecord

Purpose Compatibility

Release the resources allocated by Info_GetSequencedRecord.

Mainconsole Family only.

Syntax:

Np_Result_t Info_ReleaseSequencedRecord (void* handle, Np_SequencedRecordList &options);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT] options

The list passed to previous successful call of Info_GetSequencedRecord. After calling this function, the list will be

released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

This function is MainConsole Playback only.

Page 55: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

48

Info_QueryEvents

Purpose Compatibility

Ouery the list of recording events during specific time range.

Mainconsole Family only.

Syntax:

Np_Result_t Info_QueryEvents (void* handle, Np_DateTime* startTime, Np_DateTime* endTime, int* deviceTypeID, Np_ID* deviceID, int* eventID, Np_EventList& eventList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[IN] startTimeStart time of the range to query. Set it to

NULL for ignoring this criteria

[IN] endTimeEnd time of the range to query, Set it to

NULL for ignoring this criteria

[IN] deviceTypeID

Set to one of the possible value of the source device type id to narrow down the

result to specific event type. Set it to NULL for all events. The source device

type id was defined at NpClientDefine.h.

[IN] deviceIDID of the source device to query, set it to

NULL for all devices.[IN]eventID Set to one of the possible value of the

eventID field in Np_Event to narrow down the result to specific event type. Set it to

Page 56: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

49

NULL for all events

[OUT]eventList List of the events.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:The query citeria deviceTypeID is only supported by Corporate and Titan recording servers.

If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseEvents function

The event possible values are(defined in NpClientDefine.h):MainConsoleNp_EVENT_GENERAL_MOTION1Np_EVENT_GENERAL_MOTION2Np_EVENT_GENERAL_MOTION3Np_EVENT_GENERAL_MOTION4Np_EVENT_GENERAL_MOTION5Np_EVENT_FOREIGN_OBJECTNp_EVENT_MISSING_OBJECTNp_EVENT_FOCUS_LOSTNp_EVENT_CAMERA_OCCLUSIONNp_EVENT_GENERAL_MOTION_DEVICENp_EVENT_SIGNAL_LOSTNp_EVENT_INPUT_OPENEDNp_EVENT_SYSTEM_HEALTH_UNUSUALNp_EVENT_DISK_SPACE_EXHAUSTEDNp_EVENT_RESOURCE_DEPLETED

Page 57: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

50

Np_EVENT_NETWORK_CONGESTION

Mini and Mini2Np_EVENT_SIGNAL_LOSTNp_EVENT_MOTION_STARTNp_EVENT_INPUT_OPENED

Info_ReleaseEvents

Purpose Compatibility

Release the resources allocated by Info_QueryEvents.

Mainconsole Family only.

Syntax:

Np_Result_t Info_ReleaseEvents (void* handle, Np_EventList& eventList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[OUT]eventList

The list passed to previous successful call of Info_QueryEvents. After calling this function, the list will be released and

should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 58: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

51

Info_QueryEventExt

Purpose Compatibility

Ouery the list of recording events during specific time range.

For Titan/Crystal only

Syntax:

Np_Result_t Info_QueryEvents (void* handle, Np_DateTime* startTime, Np_DateTime* endTime, Np_SourceType* p_type, unsigned long long* p_server_id , unsigned long long* p_device_id , int* eventID);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[IN] startTimeStart time of the range to query. Set it to

NULL for ignoring this criteria

[IN] endTimeEnd time of the range to query, Set it to

NULL for ignoring this criteria

[IN] deviceTypeID

Set to one of the possible value of the source device type id to narrow down the

result to specific event type. Set it to NULL for all events. The source device

type id was defined at NpClientDefine.h.

[IN] deviceIDID of the source device to query, set it to

NULL for all devices.[IN]eventID Set to one of the possible value of the

eventID field in Np_Event to narrow down the result to specific event type. Set it to

Page 59: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

52

NULL for all events

[OUT]eventList List of the events.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:The query citeria deviceTypeID is only supported by Corporate and Titan recording servers.

If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseEventsExt function

The event possible values are(defined in NpClientDefine.h):Titan/CrystalNp_EVENT_MOTION_STARTNp_EVENT_CONNECTION_LOSTNp_EVENT_DISK_ABNORMALNp_EVENT_INPUT_OPENED

Info_ReleaseEventsExt

Purpose Compatibility

Release the resources allocated by Info_QueryEvents Ext .

For Titan/Crystal only

Syntax:

Np_Result_t Info_ReleaseEvents (void* handle, Np_EventList& eventList);

Page 60: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

53

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[OUT]eventList

The list passed to previous successful call of Info_QueryEvents Ext . After calling this

function, the list will be released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Info_GetMetadataLog

Purpose Compatibility

Get list of metadata logs from specific criteria.

Mainconsole Family only.

Syntax:

Np_Result_t Info_GetMetadataLog (void* handle, Np_MetadataSearchCriterion criterion, Np_MetadatalogList& list, bool& isLogExceedMaxLimit);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

Page 61: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

54

[IN] criterion

Data structure specify the information of query criteria. See

Np_MetadataSearchCriterion for more detail

[OUT] listList of logs. The maximum number of logs

in each query is 10000.

[OUT] isLogExceedMaxLimitSet this flag to true if the number of

queried logs is larger than 10000

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseMetadataLogs function

This function is MainConsole Playback only.

Page 62: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

55

Info_ReleaseMetadataLog

Purpose Compatibility

Release the resources allocated by Info_GetMetadataLog.

Mainconsole Family only.

Syntax:

Np_Result_t Info_ReleaseMetadataLog (void* handle, Np_MetadatalogList& metadataLogList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

[OUT] options

The list passed to previous successful call of Info_GetMetadataLog. After calling this

function, the list will be released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h

This function is MainConsole Playback only.

Page 63: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

56

Info_GetMetadataLog_Ext

Purpose Compatibility

Get list of metadata logs from specific criteria.

none

Syntax:

Np_Result_t Info_GetMetadataLog (void* handle, Np_MetadataSearchCriterion_Ext criterion, Np_MetadatalogList_Ext& list, bool& isLogExceedMaxLimit);

Parameters:

Name Meaning

[IN] handleThe handle allocated by

Create_Handle /Create_HandleWChar

[IN] criterion

Data structure specify the information of query criteria. See

Np_MetadataSearchCriterion_Ext for more detail

[OUT] listList of logs. The maximum number of logs

in each query is 10000 (Mainconsole only).

[OUT] isLogExceedMaxLimitSet this flag to true if the number of

queried logs is larger than 10000 (Mainconsole only)

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 64: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

57

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseMetadataLogs_Ext function

This function is work for MainConsole and Crystal.

Page 65: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

58

Info_ReleaseMetadataLog_Ext

Purpose Compatibility

Release the resources allocated by Info_GetMetadataLog_Ext.

none

Syntax:

Np_Result_t Info_ReleaseMetadataLog_Ext (void* handle, Np_MetadatalogList_Ext& metadataLogList);

Parameters:

Name Meaning

[IN] handleThe handle allocated by

Create_Handle /Create_HandleWChar /

[OUT] options

The list passed to previous successful call of Info_GetMetadataLog_Ext. After calling this function, the list will be released and

should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h

This function is work for MainConsole and Crystal.

Page 66: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

59

Info_GetMetadataSourceList

Purpose Compatibility

Get list of metadata source. Mainconsole Family only.

Syntax:

Np_Result_t Info_GetMetadataSourceList (void* handle, Np_MetadataSourceList& list);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[OUT] list List of metadata sources

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseMetadataSourceList function

This function is MainConsole Playback only.

Page 67: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

60

Info_ReleaseMetadataSourceList

Purpose Compatibility

Release the resources allocated by Info_GetMetadataSourceList.

Mainconsole Family only.

Syntax:

Np_Result_t Info_ReleaseMetadataSourceList (void* handle, Np_MetadataSourceList& list);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

[OUT] options

The list passed to previous successful call of Info_GetMetadataSourceList. After

calling this function, the list will be released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

This function is MainConsole Playback only.

Page 68: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

61

Info_GetMetadataSourceList_Ext

Purpose Compatibility

Get list of metadata source. none

Syntax:

Np_Result_t Info_GetMetadataSourceList_Ext (void* handle, Np_MetadataSourceList_Ext& list);

Parameters:

Name Meaning

[IN] handleThe handle allocated by

Create_Handle /Create_HandleWChar

[OUT] list List of metadata sources

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.It is programmer’s responsibility to release the allocated memory by calling Info_ReleaseMetadataSourceList_Ext function

Compare with Info_GetMetadataSourceList, This function is work for Crystal/MainConsole.

Page 69: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

62

Info_ReleaseMetadataSourceList_Ext

Purpose Compatibility

Release the resources allocated by Info_GetMetadataSourceList_Ext.

none

Syntax:

Np_Result_t Info_ReleaseMetadataSourceList_Ext (void* handle, Np_MetadataSourceList_Ext& list);

Parameters:

Name Meaning

[IN] handleThe handle allocated by

Create_Handle /Create_HandleWChar /

[OUT] options

The list passed to previous successful call of Info_GetMetadataSourceList_Ext. After

calling this function, the list will be released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

This function is work for Crystal/MainConsole.

Page 70: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

63

Info_GetBackupFileSize

Purpose Compatibility

Preview the total size of backup files

Mainconsole Family only.

Syntax:

Np_Result_t Info_GetBackupFileSize (void* handle, Np_DateTime startTime, Np_DateTime endTime, Np_IDList backupIdList, Np_SequencedRecordList &seqRecordList, bool isIncluedExeFile, unsigned long long& size);;

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[IN] startTime, The start time of interval

[IN] endTime, The end time of interval

[IN] backupIdList, The list of camera device id

[IN] seqRecordList, Records to be backuped.

[IN] isIncluedExeFile, Reserved

[OUT] size The total size of backup files

Return Value:

Np_Result_OK represents the success of the function call. Any positive value

Page 71: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

64

represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

This function is MainConsole Playback only.

Page 72: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

65

Info_UpdateDeviceInfo

Update Device list Mainconsole Family only.

Syntax:

Np_Result_t Control_PTZ_CS_Ext (void* handle, Np_DeviceCapability deviceCapability);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] deviceCapability

The bit wise combination of flags for the supported capabilities, see the enum

“Np_DeviceCapability” in NpClient.h for the meaning of each flag.

Control_PTZ_CS_Ext

Purpose Compatibility

Use PTZ operation of the camera For all platform.

Syntax:

Np_Result_t Control_PTZ_CS_Ext (void* handle, Np_ID_Ext id,Np_PTZControlParam_CS *param);

Parameters:

Page 73: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

66

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identify of Camera device. This id

information can be referred from Np_Device_Ext.

[IN] param The operation of PTZ. Ctrl+click

Np_PTZControlParam_CS for its definition.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:1. If speed(pan, tile or zoom) is not zero, this API will trigger joystick PTZ control. Otherwise, noraml PTZ will trigger.2. If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 74: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

67

Control_PTZ_PTZDeviceID_CS_Ext

Purpose Compatibility

Use PTZ operation of the camera by the ID of “PTZ device”

For all platform.

Syntax:

Np_Result_t Control_PTZ_PTZDeviceID_CS_Ext (void* handle, Np_ID_Ext id,Np_PTZControlParam_CS *param);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[IN] idThe identity of PTZ device. This id

information is retrieved from the devices in PTZDevices field of Np_Device_Ext.

[IN] param The operation of PTZ. Ctrl+click

Np_PTZControlParam_CS for its definition.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:1. If speed(pan, tile or zoom) is not zero, this API will trigger joystick PTZ control. Otherwise, noraml PTZ will trigger.2. If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 75: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

68

Control_DigitalOutput_Ext

Purpose Compatibility

Set/unset the digital output pin For all platform.

Syntax:

Np_Result_t Control_DigitalOutput_Ext (void* handle, Np_ID_Ext id, bool turnOn);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[IN] id

The identity of digital ouput device(pin). This id information is retrieved from the

devices in DODevices field of Np_Device_Ext.

[IN] turnOnFlag indicating the pin should be set or

unset.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 76: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

69

Control_SetPatrol

Purpose Compatibility

Change the patrol setting Mainconsole Family only.

Syntax:

Np_Result_t Control_SetPatrol( void *handle, Np_ID id, const Np_PTZPatrol_CS &info);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identity of PTZ device. This id

information is retrieved from the devices in PTZDevices field of Np_Device_CS.

[IN] info The patrol setting.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 77: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

70

Talk_Enable

Purpose Compatibility

Get the supported audio format of the device, and initialize to

send audio packet to it.Mainconsole Family only.

Syntax:

Np_Result_t Talk_Enable (void* handle, Np_ID* id, Np_TalkAudioFormat &fmt );

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] idThe identification of camera device, which

can be referred from Np_Device_CS

[OUT] fmtThe audio format that device supports.

Ctrl+Click the Np_TalkAudioFormat listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:SDK will stop this function automatically while users don’t call Talk_SendAudioPacket function to send a audio packet to the device in one minute or there are client to enable Talk function.If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 78: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

71

Only supported on win32 platform.

Page 79: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

72

Talk_Disable

Purpose Compatibility

Stop sending the audio packet to the device. Mainconsole Family only.

Syntax:

Np_Result_t Talk_Disable (void* handle );

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Only supported on win32 platform.

Page 80: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

73

Talk_SendAudioPacket

Purpose Compatibility

Send the audio packet to the device. Mainconsole Family only.

Syntax:

Np_Result_t Talk_SendAudioPacket (void* handle, char* buf, int size);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] buf The buffer of the audio packet.

[IN] size The size of the audio packet.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:This function only supported PCM audio format.

Talk will be disabled if users don’t call Talk_SendAudioPacket function to send audio packets to the device in a minute or there are other clients enabled Talk.

If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 81: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

74

If the return value is Np_Result_SOCKET_ERROR, it means that Talk was disabled and need to enable again.

Only supported on win32 platform.

Page 82: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

75

Talk_GetEnableID

Purpose Compatibility

Get the identification of the camera device that is enabled to receive

audio from SDK.Mainconsole Family only.

Syntax:

Np_Result_t Talk_GetEnableID (void* handle,Np_ID& id);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT] idThe identification of camera device,

which can be referred from Np_Device_CS .

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Only supported on win32 platform.

Page 83: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

76

Event_Subscribe

Purpose Compatibility

Subscribe event notification from server.

Mainconsole Family only.

Syntax:

Np_Result_t Event_Subscribe (void* handle, void** session, fnEventHandle callback,void* ctx);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT] session Session of the subscriber.

[IN] callbackCallback function, called when event

present.

[IN]ctxExtra information which will be carried to each callback function call as a parameter.

Reserved for programmer’s usage.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and

Page 84: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

77

a new handle is required to be re-created.

The event possible values are(defined in NpClientDefine.h):MainConsoleNp_EVENT_SMART_GUARD_ON_SCREEN_DISPLAY_STARTNp_EVENT_SMART_GUARD_ON_SCREEN_DISPLAY_STOPNp_EVENT_SMART_GUARD_SOUND_ALERT_STARTNp_EVENT_SMART_GUARD_SOUND_ALERT_STOPNp_EVENT_RECORD_STATUS_UPDATENp_EVENT_COUNTINGNp_EVENT_COUNTING_STOPNp_EVENT_SERVER_CONNECTION_LOSTNp_EVENT_DEVICE_TREELIST_UPDATEDNp_EVENT_SYSTEM_HEALTH_UNUSUALNp_EVENT_DISK_SPACE_EXHAUSTEDNp_EVENT_RESOURCE_DEPLETEDNp_EVENT_NETWORK_CONGESTIONNp_EVENT_TALK_BE_RESERVEDNp_EVENT_EMAP_POPUP_AND_UPDATE_EVENT_STARTNp_EVENT_EMAP_POPUP_AND_UPDATE_EVENT_STOP

Mini and Mini2Np_EVENT_RECORD_STATUS_UPDATENp_EVENT_SIGNAL_LOSTNp_EVENT_SIGNAL_RESTORENp_EVENT_MOTION_STARTNp_EVENT_MOTION_STOPNp_EVENT_SERVER_CONNECTION_LOST:Np_EVENT_INPUT_OPENEDNp_EVENT_INPUT_CLOSEDNp_EVENT_CONNECTION_LOSTNp_EVENT_DEVICE_TREELIST_UPDATEDNp_EVENT_DISK_ABNORMALNp_EVENT_DISK_SPACE_EXHAUSTEDNp_EVENT_DAILY_REPORTNp_UNABLE_ACCESS_FTPNp_UNFINISHED_BACKUPNp_EVENT_EMAP_POPUP_AND_UPDATE_EVENT_START

Page 85: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

78

Np_EVENT_EMAP_POPUP_AND_UPDATE_EVENT_STOP

Event_Unsubscribe

Purpose Compatibility

Unsubscribe the event notification.

Mainconsole Family only.

Syntax:

Np_Result_t Event_Unsubscribe (void* session);

Parameters:

Name Meaning

[IN] sessionSession created by the call of

Event_Subscribe.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 86: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

79

Event_SubscribeExt

Purpose Compatibility

Subscribe event notification from server.

For Titan/Crystal only

Syntax:

Np_Result_t Event_Subscribe (void* handle, void** session, fnEventHandle callback,void* ctx);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[OUT] session Session of the subscriber.

[IN] callbackCallback function, called when event

present.

[IN]ctxExtra information which will be carried to each callback function call as a parameter.

Reserved for programmer’s usage.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 87: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

80

The event possible values are(defined in NpClientDefine.h):Titan/CrystalNp_EVENT_MOTION_STARTNp_EVENT_CONNECTION_LOSTNp_EVENT_INPUT_OPENEDNp_EVENT_SERVER_CONNECTION_LOSTNp_EVENT_DEVICE_TREELIST_UPDATEDNp_EVENT_DISK_ABNORMAL

Event_UnsubscribeExt

Purpose Compatibility

Unsubscribe the event notification.

For Titan/Crystal only

Syntax:

Np_Result_t Event_Unsubscribe (void* session);

Parameters:

Name Meaning

[IN] sessionSession created by the call of

Event_SubscribeExt.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and

Page 88: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

81

a new handle is required to be re-created.Event_DuplicateFilter

Filter same event won’t callback during the timer.

Mainconsole Family only.

Syntax:

Np_Result_t Event_DuplicateFilter (void* handle, Int timer);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] timerSet the time to make sure the same event

won’t callback.

Page 89: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

82

LiveView_CreatePlayer

Purpose Compatibility

Build the player for the server, the player can own multiple camera

sessionFor all platform.

Syntax:

Np_Result_t LiveView_CreatePlayer (void* handle, void** player);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[OUT] player The player of liveview

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling LiveView_DestroyPlayer function.

Page 90: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

83

LiveView_DestroyPlayer

Purpose Compatibility

Destroy the player For all platform.

Syntax:

Np_Result_t LiveView_DestroyPlayer (void* player);

Parameters:

Name Meaning

[IN] playerThe player that created by

LiveView_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 91: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

84

LiveView_AttachSessionExtExt

Purpose Compatibility

See the live image of the camera with specific pixel format

For all platform.

Syntax:

Np_Result_t LiveView_AttachSessionExtExt (void* player, void** session, Np_ID_Ext id,Np_StreamProfile profile, Np_PixelFormat videoPixalFormat,fnVideoHandle vcb, void* vctx, fnAudioHandle acb, void* actx, fnErrorHandle ecb, void* ectx);

Parameters:

[IN] playerPlayer allocated by

LiveView_CreatePlayer

[OUT] session Session of the camera

[IN] idThis id information is retrieved from the devices in SensorDevices field of

Np_Device_Ext.

[IN] videoPixelFormat

Pixel format, possible values are: kPixelFormatYUV420P kPixelFormatRGB24 kPixelFormatBGR24

[IN] profile

Desired stream profile. The supported values are

kProfileNormal kProfileOriginal

Page 92: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

85

kProfileLow kProfileMinimum

[IN] vcb Callback function for receiving image

[IN] vctx Reserved for programmer’s usage

[IN] acb Callback function for audio retrieval

[IN] actx Reserved for programmer’s usage

[IN] ecb Callback function for receive image

[IN] ectx Reserved for programmer’s usage

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling LiveView_DetachSessionExtExt function.

fnVideoHandle , fnAudioHandle, and fnErrorHandle are function pointers and their definition can be found at NpClient.h.

If there are many channels need to display in the UI, please use OpenGL or DirectX3D to display the frame. Otherwise, the FPS may be low.

Page 93: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

86

LiveView_DetachSessionExtExt

Purpose Compatibility

Disconnect the specified camera For all platform.

Syntax:

Np_Result_t LiveView_DetachSessionExtExt (void* player,void* session);

Parameters:

Name Meaning

[IN] playerThe player created by

LiveView_CreatePlayer

[IN] sessionThe session the returned by

LiveView_AttachSessionExtExt

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 94: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

87

LiveView_AttachRawVideoSession

Purpose Compatibility

See the live image of the camera in raw data(not decoded),

allowing programmer to decode image frame via their own

decoder.

Mainconsole Family only.

Syntax:

Np_Result_t LiveView_AttachRawVideoSession (void* player, void** session, Np_ID id,Np_StreamProfile profile, fnRawVideoHandle vcb, void* vctx, fnAudioHandle acb, void* actx, fnErrorHandle ecb, void* ectx);

Parameters:Only describe id, vcb here, for the rest, please refer to LiveView_AttachSession ExtExt .

Name Meaning

[IN] idThis id information is retrieved from the devices in SensorDevices field

of Np_Device_CS.

[IN] vcbCallback function for receiving raw

image

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 95: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

88

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling LiveView_DetachSessionExtExt function.

fnRawVideoHandle , fnAudioHandle, and fnErrorHandle are function pointers and their definition can be found at NpClient.h.

Page 96: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

89

LiveView_SetAudioOn

Purpose Compatibility

Turn on audio for specific LiveView session, default is off.

For all platform.

Syntax:

Np_Result_t LiveView_SetAudioOn (void* player, void* session);

Parameters:

Name Meaning

[IN] playerThe player that created by

LiveView_CreatePlayer

[IN] sessionThe session that created by

LiveView_AttachSessionExtExt

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Only one session can be set audio on at a time. Therefore, If turn one on, others will be set audio off automatically.

Page 97: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

90

LiveView_SetAudioOff

Purpose Compatibility

Turn off audio for all LiveView sessions.

For all platform.

Syntax:

Np_Result_t LiveView_SetAudioOff (void* player);

Parameters:

Name Meaning

[IN] playerThe player that created by

LiveView_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 98: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

91

LiveView_GetSessionAudioStatus

Purpose Compatibility

Get audio status of a session. Mainconsole Family only.

Syntax:

Np_Result_t LiveView_GetSessionAudioStatus (void* player, void* session. Np_AudioStatus &status );

Parameters:

Name Meaning

[IN] playerThe player that created by

LiveView_CreatePlayer

[IN] sessionThe session that created by

LiveView_AttachSessionExtExtLiveView_AttachRawVideoSession

[OUT] status

Audio status of session. The value is possible

kAUDIO_OFF kAUDIO_ON

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 99: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

92

LiveView_GetSessionCurrentImage

Purpose Compatibility

Get the latest image of a session. For all platform.

Syntax:

Np_Result_t LiveView_GetSessionCurrentImage (void* player, void* session. Np_Frame &frame );

Parameters:

Name Meaning

[IN] playerThe player that created by

LiveView_CreatePlayer

[IN] sessionThe session that created by

LiveView_AttachSessionExtExtLiveView_AttachRawVideoSession

[OUT] frameThe information of the latest receive

frame. Ctrl+Click the Np_Frame listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling

Page 100: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

93

LiveView_ReleaseSessionCurrentImage function. LiveView_ReleaseSessionCurrentImage

Purpose Compatibility

Release all the resources allocated by LiveView_GetSessionCurrentImage.

For all platform.

Syntax:

Np_Result_t LiveView_ReleaseSessionCurrentImage (void* player, Np_Frame &frame);

Parameters:

Name Meaning

[IN] playerPlayer pointer created by LiveView_CreatePlayer

[OUT] frame

The variable passed to previous successful call of

LiveView_GetSessionCurrentImage. After calling this function, the list will be released and should never

be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 101: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

94

LiveView_SubscribeMetadata

Purpose Compatibility

Subscribe metadata notification from server.

Mainconsole Family only.

Syntax:

Np_Result_t LiveView_SubscribeMetadata (void* handle, fnMetadataHandle mcb, void* mctx);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe

[IN] mcbCallback function, called when metadata

present.

[IN] mctxExtra information which will be carried to each callback function call as a parameter.

Reserved for programmer’s usage.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Page 102: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

95

It is programmer’s responsibility to release the allocated memory by calling LiveView_UnsubscribeMetadata function.

Page 103: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

96

LiveView_UnsubscribeMetadata

Purpose Compatibility

Unsubscribe the metadata notification and release the

memory allocated by LiveView_SubscribeMetadata

Mainconsole Family only.

Syntax:

Np_Result_t LiveView_SubscribeMetadata (void* handle);

Parameters:

Name Meaning

[IN] sessionThe handle allocated byCreate_HandleWChar /

Create_Handle_And_Event_Subscribe.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

Playback_CreatePlayer

Page 104: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

97

Purpose Compatibility

Create playback channel For all platform.

Syntax:

Np_Result_t Playback_CreatePlayer (void* handle, void** player);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[OUT] playerPlayer pointer for requesting recorded

video

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:This SDK supports playback capability from multiple video servers.

If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Playback_DestroyPlayer function.

Page 105: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

98

Playback_DestroyPlayer

Purpose Compatibility

Destroy playback player For all platform.

Syntax:

Np_Result_t Playback_DestroyPlayer (void* player);

Parameters:

Name Meaning

[IN] playerPlayer pointer created by Playback_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 106: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

99

PlayBack_AttachSession1ExtExt

Purpose Compatibility

Select the channel for viewing recorded video with specific pixel

formatFor all platform.

Syntax:

Np_Result_t PlayBack_AttachSession1ExtExt (void* player, void** session, Np_ID_Ext id,Np_PixelFormat videoPixalFormat,int recordIndex,fnVideoHandle vcb, void* vctx, fnAudioHandle acb, void* actx, fnErrorHandle ecb, void* ectx);

Parameters:Name Meaning

[IN] playerPlayer pointer created by Playback_CreatePlayer

[OUT] session Session of the camera

[IN] idThis id information is retrieved from the devices in SensorDevices field

of Np_Device_Ext.

[IN] videoPixalFormat

Pixel format, possible values are: kPixelFormatYUV420P kPixelFormatRGB24 kPixelFormatBGR24

[IN] recordIndex Dual record index

[IN] vcb Callback function for image

Page 107: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

100

retrieval

[IN] vctx Reserved for programmer’s usage

[IN] acb Callback function for audio retrieval

[IN] actx Reserved for programmer’s usage

[IN] ecbThe callback function for receive

image

[IN] ectx Reserved for programmer’s usage

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling PlayBack_DetachSessionExtExt function.

fnVideoHandle , fnAudioHandle, and fnErrorHandle are function pointers and their definition can be found at NpClient.h.

If there are many channels need to display in the UI, please use OpenGL or DirectX3D to display the frame. Otherwise, the FPS may be low.

Page 108: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

101

PlayBack_DetachSessionExtExt

Purpose Compatibility

Disconnect the specified session For all platform.

Syntax:

Np_Result_t PlayBack_DetachSessionExtExt (void* player,void* session);

Parameters:

Name Meaning

[IN] playerPlayer pointer created by Playback_CreatePlayer

[IN] sessionSession pointer returned by

PlayBack_AttachSession1ExtExt

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 109: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

102

PlayBack_AttachRawVideoSession

Purpose Compatibility

Select the channel for viewing recorded video in raw data(not

decoded), allowing programmer to decode video frame via their

own decoder.

Mainconsole Family only.

Syntax:

Np_Result_t PlayBack_AttachRawVideoSession (void* player, void** session, Np_ID id,fnRawVideoHandle vcb, void* vctx, fnAudioHandle acb, void* actx, fnErrorHandle ecb, void* ectx);

Parameters:Only describe id and vcb here, for the rest, please refer to Playback_AttachSession.

Name Meaning

[IN] idThe identification of PTZ device,

which can be referred from Np_Device_CS.

[IN] vcbCallback function for receiving raw

image

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:

Page 110: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

103

If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Playback_DetachSessionExtExt function.

fnRawVideoHandle , fnAudioHandle, and fnErrorHandle are function pointers and their definition can be found at NpClient.h.

Page 111: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

104

PlayBack_Seek

Purpose Compatibility

Seek current opened record to specific time.

For all platform.

Syntax:

Np_Result_t PlayBack_Seek (void* player , Np_DateTime time);

Parameters:

Name Meaning

[IN] playerThe player allocated by Playback_CreatePlayer

[IN] time Time to seek to.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

If SDK connects to Titan/Corporate server, the state of the player will be changed to pause after calling this function.

Page 112: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

105

PlayBack_OpenRecord

Purpose Compatibility

Open recorded video for all sessions attached on a specified

playerFor all platform.

Syntax:

Np_Result_t PlayBack_OpenRecord (void* player, Np_DateTime startTime,Np_DateTime endTime);

Parameters:

Name Meaning

[IN] playerPlayer pointer allocated by

Playback_CreatePlayer

[IN] startTime Start time of the video

[IN] endTime End time of the video

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 113: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

106

PlayBack_OpenSequencedRecord

Purpose Compatibility

Open recorded video for all sessions attached on a specified

playerMainconsole Family only.

Syntax:

Np_Result_t PlayBack_OpenSequencedRecord (void* player, Np_DateTime startTime, Np_DateTime endTime,

Np_SequencedRecordList &seqRecordList);

Parameters:

Name Meaning

[IN] playerPlayer pointer allocated by

Playback_CreatePlayer

[IN] startTime Start time of the video

[IN] endTime End time of the video

[IN] seqRecordList Records to be opened

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 114: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

107

It will return Np_ERROR_CONNECT_SUCCESS to fnErrorHandle function to notify the action is completed.

This function is MainConsole Playback only.

Page 115: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

108

PlayBack_GetRawFrameDirectly

Purpose Compatibility

Start to download the raw video (not decode) as soon as

possible(does not depend on speed)

Mainconsole Family only.

Syntax:

Np_Result_t PlayBack_GetRawFrameDirectly (void* player, Np_ID_Ext id, Np_DateTime start, Np_DateTime end, fnGetRawFrameHandle ecb, void* ectx, fnRawVideoHandle rcb, void* rctx, fnAudioHandle acb, void* actx;

Parameters:Parameters:

Name Meaning

[IN] playerPlayer pointer created by Playback_CreatePlayer

[IN] id Camera id

[IN] start Start time of the video

[IN] end End time of the video

[IN] ecb

Callback function for the status kGetRawFrameStart kGetRawFrameSuccess kGetRawFrameFailed kGetRawFrameChannelEmpty kGetRawFrameTimeError

Page 116: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

109

[IN] ectx Reserved for programmer’s usage

[IN] rcb Callback function for the raw video

[IN] rctx Reserved for programmer’s usage

[IN] acb The callback function for raw audio

[IN] actx Reserved for programmer’s usage

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 117: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

110

PlayBack_StopGetRawFrameDirectly

Purpose Compatibility

Stop downloading the raw video(not decode)

Mainconsole Family only.

Syntax:

Np_Result_t PlayBack_StopGetRawFrameDirectly (void* player);

Parameters:

Name Meaning

[IN] playerThe player allocated by Playback_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 118: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

111

PlayBack_Play

Purpose Compatibility

Start to play the video For all platform.

Syntax:

Np_Result_t PlayBack_Play (void* player);

Parameters:

Name Meaning

[IN] playerThe player allocated by Playback_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 119: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

112

PlayBack_ReversePlay

Purpose Compatibility

Play I-Frame at a recorded video reversely

For all platform.

Syntax:

Np_Result_t PlayBack_ReversePlay (void* player);

Parameters:

Name Meaning

[IN] playerThe player allocated by Playback_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

This function is only supported by Corporate and Titan recording servers. Not being supported in SDK 4.0

Page 120: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

113

PlayBack_Pause

Purpose Compatibility

Pause the video For all platform.

Syntax:

Np_Result_t PlayBack_Pause (void* player);

Parameters:

Name Meaning

[IN] playerPlayer pointer allocated by

Playback_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 121: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

114

PlayBack_StepForward

Purpose Compatibility

Retrieve image at the next 0.03 second

For all platform.

Syntax:

Np_Result_t PlayBack_StepForward (void* player);

Parameters:

Name Meaning

[IN] playerPlayer pointer allocated by

Playback_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 122: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

115

PlayBack_StepBackward

Purpose Compatibility

To see the next 0.03 second image of current time

For all platform.

Syntax:

Np_Result_t PlayBack_StepBackward (void* player);

Parameters:

Name Meaning

[IN] playerThe player allocated by Playback_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and you need create a new handle.

Page 123: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

116

PlayBack_Next

Purpose Compatibility

Retrieve image at the next minute For all platform.

Syntax:

Np_Result_t PlayBack_Next (void* player);

Parameters:

Name Meaning

[IN] playerThe player allocated by Playback_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 124: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

117

PlayBack_Previous

Purpose Compatibility

To see the next one minute image of current time

For all platform.

Syntax:

Np_Result_t PlayBack_Previous (void* player);Parameters:

Name Meaning

[IN] playerThe player allocated by Playback_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 125: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

118

PlayBack_SetSpeed

Purpose Compatibility

Set the speed of playing video For all platform.

Syntax:

Np_Result_t PlayBack_SetSpeed (void* player,float speed);

Parameters:

Name Meaning

[IN] playerPlayer pointer retrieved from

Playback_CreatePlayer

[IN] speed Speed of video play

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 126: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

119

PlayBack_GetSpeed

Purpose Compatibility

Get the speed of the video player For all platform.

Syntax:

Np_Result_t PlayBack_GetSpeed (void* player,float &speed);

Parameters:

Name Meaning

[IN] playerPlayer pointer retrieved by

Playback_CreatePlayer

[OUT] speed Speed of the video player

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 127: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

120

PlayBack_GetTime

Purpose Compatibility

Time instance of the current displayed image

For all platform.

Syntax:

Np_Result_t PlayBack_GetTime (void* player,Np_DateTime &time);

Parameters:

Name Meaning

[IN] playerPlayer pointer retrieved from

Playback_CreatePlayer

[OUT] time Time instance of the current image

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 128: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

121

PlayBack_GetPlayerState

Purpose Compatibility

Get player status(playing/ paused / stopped)

Mainconsole Family only.

Syntax:

Np_Result_t PlayBack_GetPlayerState(void* player, Np_PlayerState &state);

Parameters:

Name Meaning

[IN] playerPlayer pointer retrieved from

Playback_CreatePlayer

[OUT] state

Status of player, possible values are: kStateStopped kStatePaused kStateRunning

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 129: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

122

PlayBack_ExportVideo

Purpose Compatibility

Export the content of specific playback session to a video file

Mainconsole Family only.

Syntax:

Np_Result_t PlayBack_ExportVideo (void* player, Np_ExportContent content, const wchar_t* filename, int format, int profile, fnExportHandle ecb, void* ectx, fnOSDHandle ocb, void* octx);

Parameters:

Name Meaning

[IN] playerPlayer pointer retrieved from

Playback_CreatePlayer

[IN]content

Data structure specify the information of the content to

export. See Np_ExportContent for more detail

[IN]filename File path of the output video file

[IN]format

Format identifier number of the output video, get the support

format/profile list via PlayBack_GetExportFormatList

[IN]profile

Profile identifier number under the specified format, get the support

format/profile list via PlayBack_GetExportFormatList

Page 130: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

123

[IN]ecbCallback function for export event/progress notification

[IN]ectx Reserved for programmer’s usage

[IN]ocb Callback function for OSD blending

[IN] octx Reserved for programmer’s usage

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 131: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

124

PlayBack_StopExport

Purpose Compatibility

Stop/Cancel the export procedure triggered by previous call of

PlayBack_ExportVideoMainconsole Family only.

Syntax:

Np_Result_t PlayBack_StopExport (void* player);

Parameters:

Name Meaning

[IN] playerPlayer pointer retrieved from

Playback_CreatePlayer

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 132: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

125

PlayBack_ExportVideo_Ext

Purpose Compatibility

Export the content of specific playback session to a video file

For Titan/Crystal only

Syntax:

Np_Result_t PlayBack_ExportVideo (void* player, Np_ExportContent content, const wchar_t* filename, int format, int profile, fnExportHandleExt ecb, void* ectx, fnOSDHandleExt ocb, void* octx);

Parameters:

Name Meaning

[IN] playerPlayer pointer retrieved from

Playback_CreatePlayer

[IN]content

Data structure specify the information of the content to

export. See Np_ExportContent for more detail

[IN]filename File path of the output video file

[IN]format

Format identifier number of the output video, get the support

format/profile list via PlayBack_GetExportFormatList

[IN]profile

Profile identifier number under the specified format, get the support

format/profile list via PlayBack_GetExportFormatList

Page 133: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

126

[IN]ecbCallback function for export event/progress notification

[IN]ectx Reserved for programmer’s usage

[IN]ocb Callback function for OSD blending

[IN] octx Reserved for programmer’s usage

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

PlayBack_StopExport_Ext

Purpose Compatibility

Stop/Cancel the export procedure triggered by previous call of PlayBack_ExportVideo_Ext

For Titan/Crystal only

Syntax:

Np_Result_t PlayBack_StopExport (void* p_handle);

Parameters:

Name Meaning

[IN] p_handleThe handle allocated byCreate_HandleWChar

Page 134: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

127

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

PlayBack_GetExportFormatList

Purpose Compatibility

Get supported export format list for current OS and server type

For all platform.

Syntax:

Np_Result_t PlayBack_GetExportFormatList(void* player, Np_ExportFormatList& fmtlist);

Parameters:

Name Meaning

[IN] playerPlayer pointer retrieved from

Playback_CreatePlayer

[OUT] fmtlist List of the result formats, see

Np_ExportFormatList for more detail.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is

Page 135: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

128

defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

It is programmer’s responsibility to release the allocated memory by calling PlayBack_ReleaseExportFormatList function.

Page 136: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

129

PlayBack_ReleaseExportFormatList

Purpose Compatibility

Release all the resource allocated by PlayBack_GetExportFormatList

For all platform.

Syntax:

Np_Result_t PlayBack_ReleaseExportFormatList(void* player, Np_ExportFormatList& fmtlist);

Parameters:

Name Meaning

[IN] playerPlayer pointer retrieved from

Playback_CreatePlayer

[OUT] fmtlist

The format list passed to previous successful call of PlayBack_GetExportFormatList. After calling this function, the list will be released and should never be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

Page 137: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

130

Playback_GetSessionCurrentImage

Purpose Compatibility

Get the latest receive image of a session.

For all platform.

Syntax:

Np_Result_t Playback_GetSessionCurrentImage (void* player, void* session. Np_Frame &frame );

Parameters:

Name Meaning

[IN] playerThe player that created by

PlayBack_CreatePlayer

[IN] sessionThe session that created by

PlayBack _AttachSession1ExtExt PlayBack _AttachRawVideoSession

[OUT] frameThe information of the latest receive

frame. Ctrl+Click the Np_Frame listed above to check its structure

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, this handle should be destroyed and a new handle is required to be re-created.

It is programmer’s responsibility to release the allocated memory by calling

Page 138: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

131

PlayBack_ReleaseSessionCurrentImage function. PlayBack_ReleaseSessionCurrentImage

Purpose Compatibility

Release all the resources allocated by PlayBack_GetSessionCurrentImage.

For all platform.

Syntax:

Np_Result_t PlayBack_ReleaseSessionCurrentImage (void* player, Np_Frame &frame);

Parameters:

Name Meaning

[IN] playerPlayer pointer created by PlayBack_CreatePlayer

[OUT] frame

The variable passed to previous successful call of

PlayBack_GetSessionCurrentImage. After calling this function, the list will be released and should never

be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 139: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

132

Backup_Initial

Purpose Compatibility

Initialize the backup setting. Mainconsole Family only.

Syntax:

Np_Result_t Backup_Initial (void* handle, Np_DateTime startTime, Np_DateTime endTime, Np_IDList backupIdList, Np_SequencedRecordList &seqRecordList, bool includeEventLog, bool includeCounterLog, bool includeSystemLog, bool includeMatadataRecord, bool includeExeFiles, fnBackupHandle bcb, void* bctx);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[IN] startTime, The start time of backup interval

[IN] endTime,, The end time of backup interval

[IN] backupIdList The camera id list of backup

[IN] seqRecordList Specify the overlapping records

Page 140: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

133

[IN] includeEventLogThe flag for including event logs or

not

[IN] includeCounterLogThe flag for including counter logs

or not

[IN] includeSystemLogThe flag for including system logs or

not

[IN] includeMatadataRecord The flag for including m logs or not

[IN] includeExeFiles Reserved

[IN] bcbCallback function for backup event

notification

[IN] bctx Reserved for programmer’s usage

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:If the return value is Np_Result_FATAL_ERROR, the handle should be destroyed and a new handle needs to be re-created.

It is programmer’s responsibility to release the allocated memory by calling Backup_Uninit function.

This function is MainConsole Playback only.

Page 141: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

134

Backup_Uninit

Purpose Compatibility

Uninitialize the backup setting and release the memory allocated

by Backup_Initial.Mainconsole Family only.

Syntax:

Np_Result_t Backup_Uninit (void* handle);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

This function is MainConsole Playback only.

Page 142: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

135

Backup_GetBackupFileItemList

Purpose Compatibility

Get backup file list Mainconsole Family only.

Syntax:

Np_Result_t Backup_GetBackupFileItemList (void* handle, Np_BackupItemList& backupItemList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[OUT] backupItemList The list of file items

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

It is programmer’s responsibility to release the allocated memory by calling Backup_ReleaseBackupFileItemList function.

This function is MainConsole Playback only.

Page 143: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

136

Backup_ReleaseBackupFileItemList

Purpose Compatibility

Release all the resources allocated by

Backup_GetBackupFileItemListMainconsole Family only.

Syntax:

Np_Result_t Backup_ReleaseBackupFileItemList (void* handle, Np_BackupItemList& backupItemList);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[OUT] backupItemList

The variable passed to previous successful call of

Backup_GetBackupFileItemList. After calling this function, the list will be released and should never

be used again.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

This function is MainConsole Playback only.

Page 144: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

137

Backup_SetBackupDestinationDir

Purpose Compatibility

Specify the path to save files Mainconsole Family only.

Syntax:

Np_Result_t Backup_SetBackupDestinationDir (void* handle, const wchar_t* dir);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

[OUT] dir The saving path of backup files

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

This function is MainConsole Playback only.

Page 145: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

138

Backup_Start

Purpose Compatibility

Start to backup files. Mainconsole Family only.

Syntax:

Np_Result_t Backup_Start (void* handle);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

This function is MainConsole Playback only.

Page 146: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

139

Backup_Pause

Purpose Compatibility

Pause the backup procedure triggered by previous call of

Backup_StartMainconsole Family only.

Syntax:

Np_Result_t Backup_Pause (void* handle);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

This function is MainConsole Playback only.

Page 147: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

140

Backup_Resume

Purpose Compatibility

Restart the backup procedure triggered by previous call of

Backup_PauseMainconsole Family only.

Syntax:

Np_Result_t Backup_Resume (void* handle);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

This function is MainConsole Playback only.

Page 148: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

141

Backup_Abort

Purpose Compatibility

Cancel the backup procedure triggered by previous call of

Backup_StartMainconsole Family only.

Syntax:

Np_Result_t Backup_Abort (void* handle);

Parameters:

Name Meaning

[IN] handleThe handle allocated byCreate_HandleWChar

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

This function is MainConsole Playback only.

Page 149: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

142

Utility_SaveSnapShotImage

Purpose Compatibility

Save snapshot image to a file. For all platform.

Syntax:

Np_Result_t Utility_SaveSnapShotImage(const wchar_t* filename, const char* buffer, int len, int width, int height);

Parameters:

Name Meaning

[IN] filenameFull path of the destination image

file.

[IN] bufferImage buffer of the snapshot image

in RGB24 format.

[IN] lenLength of image buffer, in byte, only

for verification.

[IN] width Width of the image.

[IN] height Height of the image.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:

Page 150: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

143

Only support Windows BMP and JPEG format, the format of the saved image depends on the file extension specified in the “filename” parameter. (“.bmp” for Windows BMP and “.jpg”/”.jpeg” for JPEG).

Page 151: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

144

Utility_AddImageWaterMark

Purpose Compatibility

Add MD5 watermark to a saved image file

For all platform.

Syntax:

Np_Result_t Utility_AddImageWaterMark(const wchar_t* filename, Np_DateTime &time, const wchar_t* cameraname);

Parameters:

Name Meaning

[IN] filename Full path of the image file.

[IN] time Time of current image.

[IN] cameraname Camera name of the source device.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:Only support Windows BMP and JPEG format image, while the format is retrieved via file extension of the parameter “filename”.(“.bmp” for Windows BMP and “.jpg”/”.jpeg” for JPEG).

Page 152: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

145

Utility_AddVideoWaterMark

Purpose Compatibility

Add MD5 watermark to a saved video file

For all platform.

Syntax:

Np_Result_t Utility_AddVideoWaterMark(const wchar_t* filename,Np_DateTime &start_time, Np_DateTime &end_time, const wchar_t* cameraname);

Parameters:

Name Meaning

[IN] filename Full path of the video file.

[IN] start_time Start time of current video.

[IN]end_time End time of current video.

[IN] cameraname Camera name of the source device.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:Only support Windows AVI、ASF and MOV format image, while the format is retrieved via file extension of the parameter “filename”.(“.avi” for Windows AVI and “.asf” for ASF, “.mov” for MOV).

Page 153: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

146

Page 154: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

147

Utility_ScaleImage

Purpose Compatibility

Scale a image or transform its color space.

For all platform.

Syntax:

Np_Result_t Utility_ScaleImage(unsigned char *p_dst, int dst_width,int dst_height,int dst_stride,Np_PixelFormat dst_format,unsigned char *p_src, int src_width,int src_height,int src_stride,Np_PixelFormat src_format);

Parameters:

Name Meaning

[OUT] p_dst The buffer of the target image.

[IN] dist_width The width of the target image.

[IN] dist_height The height of the target image.

[IN] dist_stride The stride of the target image

[IN]dst_format

The pixel format of the target image, , possible values are:

kPixelFormatYUV420P kPixelFormatRGB24 kPixelFormatBGR24

Page 155: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

148

[IN] p_src The buffer of the source image.

[IN] src_width The width of the source image.

[IN] src_height The height of the source image.

[IN] src_stride The stride of the source image

[IN] src_format

The pixel format of the source image, possible values are:

kPixelFormatYUV420P kPixelFormatRGB24 kPixelFormatBGR24

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 156: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

149

Np_DateTime

Syntax:

typedef struct {WORD year;WORD month;WORD day;WORD hour;WORD minute;WORD second;WORD millisecond;

} Np_DateTime;

Member:

Name Meaning

yearIn Anno Domini (AD). This value

ranges from 1601 to 30827.

month

This value is 1-to-1 mapping to calendar month.

1 : January 2 : February 3 : March 4 : April 5 : May 6 : June 7 : July 8 : August 9 : September 10 : October 11 : November 12 : December

dayThe day of the month, ranging from

1 to 31.

Page 157: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

150

hour Keeping in 24-hour clock

minute Ranging from 0 to 59

second Ranging from 0 to 59

millisecond Ranging from 0 to 999.

Page 158: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

151

Np_Frame

Syntax:

typedef struct {Np_DateTime time;char* buffer;int len;int width;int height;

} Np_Frame;

Member:

Name Meaning

time The time of the image.

buffer The buffer of the image.

len The size of the image buffer.

width The width of the image.

height The height of the image.

Page 159: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

152

Np_ID

Syntax:

typedef struct {int centralID;int localID;

} Np_ID;

Member:

Name Meaning

centralID Identity of the server

localID Identity of the camera in a server

Page 160: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

153

Np_ID_Ext

Syntax:

typedef struct {long long centralID;long long localID;

} Np_ID_Ext;

Member:

Name Meaning

centralID Identity of the server

localID Identity of the camera in a server

Page 161: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

154

Np_IDList

Syntax:

typedef struct {int size;Np_ID* IDList;

} Np_IDList;

Member:

Name Meaning

size The size of list.

IDListPointer of the array of the identity,

in format of Np_ID.

Page 162: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

155

Np_IDList_Ext

Syntax:

typedef struct {int size;Np_ID_Ext* IDList;

} Np_IDList;

Member:

Name Meaning

size The size of list.

IDListPointer of the array of the identity,

in format of Np_ID_Ext.

Page 163: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

156

Np_Period

Syntax:

struct Np_Period{Np_DateTime startTime;Np_DateTime endTime;

};

Member:

Name Meaning

startTime The start time of the period.

endTime The end time of the period.

Page 164: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

157

Np_SensorProfile

Syntax:

typedef struct { Np_StreamProfile profile; std::wstring frameRate; std::wstring bitrate; std::wstring resolution; std::wstring codec; std::wstring quality; } Np_SensorProfile;

Member:

Name Meaning

profileEnumeration indicating quality level of the profile.

frameRate Frame rate

bitrate Bit rate

resolution Resolution

codec Codec

quality Quality

Page 165: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

158

Np_SubDevice

Syntax:

typedef struct {Np_ID ID;

std::wstring name; std::wstring description; } Np_SubDevice;

Member:

Name Meaning

IDDevice Identity which can be

referred from Np_ID

name Device Name

description Device Description

Page 166: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

159

Np_Device

Syntax:

typedef struct {Np_ID ID;

std::wstring name; std::wstring description; std::vector<Np_SubDevice> SensorDevices; std::vector<Np_SubDevice> PTZDevices; std::vector<Np_SubDevice> AudioDevices; std::vector<Np_SubDevice> DIDevices; std::vector<Np_SubDevice> DODevices;} Np_Device;

Member:

Name Meaning

IDDevice Identity which can be

referred from Np_ID

name Device Name

description Device Description

SensorDevicesAdditional devices associated to

this device

PTZDevicesPTZ devices associated to this

device

AudioDevicesAudio devices associated to this

device

DIDevicesDigital Input devices associated to

this device

DODevicesDigital Output devices associated to

this device

Page 167: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

160

Np_DeviceGroup

Syntax:

typedef struct {std::wstring name;std::wstring description;std::vector<Np_Device> Camera;std::vector<Np_Device> IOBox;

} Np_DeviceGroup;

Member:

Name Meaning

name Server Name

description Server Description

Camera Cameras connected to the server

IOBOXDigital Input/Output box connected

to the server

Page 168: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

161

Np_DeviceList

Syntax:

typedef struct {std::vector<Np_DeviceGroup> PhysicalGroup;std::vector<Np_DeviceGroup> LogicalGroup;

} Np_DeviceList;

Member:

Name Meaning

PhysicalGroupA representation of the device

group with their physical connection order

LogicalGroupA representation of the device group with a user-defined relationship

Remarks:

Only Physical Group would be used by MainConsole Liveview and Playback.

Page 169: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

162

Np_LogConditions

Syntax:

typedef struct {bool operationLog;bool configurationLog;

} Np_LogConditions;

Member:

Name Meaning

operationLogWhether the log is Np_OperationLog

configurationLogWhether the log is

Np_ConfigurationLog

Remark: Not being supported in SDK 4.0

Page 170: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

163

Np_OperationLog

Syntax:

typedef struct {Np_DateTime occurTime;Np_ID sourceID; int eventID;std::wstring description;

} Np_OperationLog;

Member:

Name Meaning

occurTime Event occurrence time

sourceIDSource device which generates this

event

eventID Event Identity

Description Log Description

Remark: Not being supported in SDK 4.0

Page 171: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

164

Np_ConfigurationLog

Syntax:

typedef struct {Np_DateTime occurTime;Np_ID sourceID; int eventID;std::wstring description;std::wstring user;std::wstring behavier;

} Np_ConfigurationLog;

Member:

Name Meaning

occurTime Event occurrence time

SourceIDSource device which generates this

event

eventID Event Identity

description Log Description

User User name

Behavior Reserved for future use

Remark: Not being supported in SDK 4.0

Page 172: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

165

Np_Log

Syntax:

typedef struct {std::vector<Np_OperationLog> opLog;std::vector<Np_ConfigurationLog> cnfgLog;

} Np_Log;

Member:

Name Meaning

opLog A set of Np_OperationLog

cnfgLog A set of Np_ConfigurationLog

Remark: Not being supported in SDK 4.0

Page 173: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

166

Np_ScheduleLogItem

Syntax:

typedef struct { Np_ID ID; Np_DateTime startTime; Np_DateTime endTime; Np_ScheduleType type;} Np_ScheduleLogItem;

Member:

Name Meaning

ID ID of the source device.

startTimeSystem time of server when the recording schedule starts.

endTimeSystem time of server when the recording schedule ends.

type

Type of the recording schedule, which could be the following values: kScheduleRecordOnly kScheduleRecordMovingOnly kScheduleRecordOnEvent kScheduleRecordBoost

Other values in the enumeration Np_ScheduleType are reserved.

Page 174: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

167

Np_RecordLogItem

Syntax:

typedef struct { Np_ID ID; Np_DateTime startTime; Np_DateTime endTime;} Np_RecordLogItem;

Member:

Name Meaning

ID ID of the source device.

startTimeSystem time of server when the recorded video starts.

endTimeSystem time of server when the recorded video ends.

Page 175: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

168

Np_RecordLogItemExt

Syntax:

typedef struct { Np_ID_Ext ID; Np_DateTime startTime; Np_DateTime endTime;} Np_RecordLogItem;

Member:

Name Meaning

ID ID of the source device.

startTimeSystem time of server when the recorded video starts.

endTimeSystem time of server when the recorded video ends.

Np_ScheduleLogList

Syntax:

typedef struct { int size; Np_ScheduleLogItem* logList;} Np_ScheduleLogList;

Member:

Name Meaning

size Size of the list.

logList Pointer to array of Np_ScheduleLogItem, containing

Page 176: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

169

the entries of recording schedule.

Page 177: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

170

Np_ScheduleLogListList

Syntax:

typedef struct { int size; Np_ScheduleLogList* logListList;} Np_ScheduleLogListList;

Member:

Name Meaning

size Size of the list.

logListListPointer to array of Np_ScheduleLogList, containing the entries of recording schedule.

Np_RecordLogList

Syntax:

typedef struct { int size; Np_RecordLogItem* logList;} Np_RecordLogList;

Member:

Name Meaning

size Size of the list.

logListPointer to array of Np_RecordLogItem, containing the log entries of video.

Page 178: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

171

Np_RecordLogListExt

Syntax:

typedef struct { int size; Np_RecordLogItem Ext * logList;} Np_RecordLogList;

Member:

Name Meaning

size Size of the list.

logListPointer to array of Np_RecordLogItem Ext , containing the log entries of video.

Np_SequencedRecordList

Syntax:

typedef struct { int size; Np_SequencedRecord *items; } Np_RecordLogList;

Member:

Name Meaning

size Size of the list.

itemsPointer to array of Np_SequencedRecord, containing the log entries of video.

Page 179: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

172

Page 180: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

173

Np_SequencedRecord

Syntax:

struct Np_SequencedRecord{ Np_ID id; Np_Period seqPeriod; int startSeq; int endSeq;}Member:

Name Meaning

id ID of the source device.

seqPeriod The time interval of the record.

startSeqThe begin of sequence number with respect to the record

endSeq;The end of sequence number with respect to the record

Page 181: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

174

Np_Event

Syntax:

typedef struct { Np_DateTime occurTime; Np_ID sourceID; int eventID; wchar_t* auxiliaryCode; wchar_t* description; wchar_t* sourceName;} Np_Event;

Member:

Name Meaning

occurTime Time when the event present.

sourceID ID of the source device.

eventID Event type.

auxuliaryCode Reserved.

description Description of the event if any.

sourceName Reserved.

Page 182: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

175

Np_EventList

Syntax:

typedef struct { int size; Np_Event* list;} Np_EventList;

Member:

Name Meaning

size Size of the list.

list Array of Np_Event for the events.

Page 183: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

176

Np_RecordDateList

Syntax:

typedef struct { int size; Np_DateTime* dateList;} Np_RecordDateList;

Member:

Name Meaning

size Size of the list.

dateListPointer of the array of the dates, in format of Np_DateTime.

Page 184: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

177

Np_MetadatalogList

Syntax:

typedef struct { int size; Np_MetadatalogItem* metadataList;}Np_MetadatalogList;

Member:

Name Meaning

size Size of the list.

metadataListPointer of the array of the logs, in format of Np_MetadatalogItem.

Page 185: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

178

Np_MetadatalogItem

Syntax:

typedef struct { Np_IDList cameraIDList; Np_DateTime metadataTime; Np_ID metadataDeviceID; int codepage; int textDataLen; char* textData;} Np_MetadatalogItem;

Member:

Name Meaning

cameraIDListThe list of camera device id that need to display the metadata.

metadataTime The received time of metadata

metadataDeviceIDThe id of source metadata channel device

codepageThe codepage of text. The definition of codepage number is equal to Windows.

textDataLen The length of the text.

textData The text of metadata.

Page 186: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

179

Np_MetadataSearchCriterion

Syntax:

typedef struct { Np_DateTime* startTime; Np_DateTime* endTime; Np_IDList metadataDeviceID; wchar_t* keyWord; bool usingRE;} Np_MetadataSearchCriterion;

Member:

Name Meaning

startTimeStart time of the query. Set it to NULL for ignoring this criteria

endTimeEnd time of the query Set it to NULL for ignoring this criteria

metadataDeviceID;The source metadata channel id of the query.

keyWordThe keyword of the query. Set it to NULL for ignoring this criteria

usingREThe keyWord is the format of regular expression

Page 187: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

180

Np_MetadataSourceList

Syntax:

typedef struct { size_t size; Np_MetadataSource* items;} Np_MetadataSourceList;;

Member:

Name Meaning

size Size of the list.

itemsPointer of the array of the metadata sources, in format of Np_MetadataSource.

Page 188: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

181

Np_MetadataSource

Syntax:

typedef struct { Np_ID id; wchar_t* name; wchar_t* ip; long port; Np_MetadataSourceType type; Np_MetadataChannelList channels;} Np_MetadataSource;

Member:

Name Meaning

id The id of metadata source device.

nameThe name of metadata source device.

ip The ip of metadata source device.

portThe port of metadata source device.

type

The type of metadata source device, including kMetadataNone kMetadataPOS kMetadataAccessControl kMetadataLPR

channels The channels of metadata source

Page 189: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

182

Np_MetadataChannelList

Syntax:

typedef struct { size_t size; Np_MetadataChannel* items;}Np_MetadataChannelList;;

Member:

Name Meaning

size Size of the list.

itemsPointer of the array of the channels, in format of Np_MetadataChannel.

Page 190: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

183

Np_MetadataChannel

Syntax:

typedef struct { Np_ID id; wchar_t* name;}Np_MetadataChannel;

Member:

Name Meaning

id; The id of metadata channel device

nameThe name of metadata channel device.

Page 191: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

184

Np_MetadatalogList_Ext

Syntax:

typedef struct { int size; Np_MetadatalogItem_Ext* metadataList;}Np_MetadatalogList_Ext;

Member:

Name Meaning

size Size of the list.

metadataListPointer of the array of the logs, in format of Np_MetadatalogItem_Ext.

Page 192: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

185

Np_MetadatalogItem_Ext

Syntax:

typedef struct { Np_IDList_Ext cameraIDList; Np_DateTime metadataTime; Np_ID_Ext metadataDeviceID; int codepage; int textDataLen; char* textData;} Np_MetadatalogItem_Ext;

Member:

Name Meaning

cameraIDListThe list of camera device id that need to display the metadata.

metadataTime The received time of metadata

metadataDeviceIDThe id of source metadata channel device

codepageThe codepage of text. The definition of codepage number is equal to Windows.

textDataLen The length of the text.

textData The text of metadata.

Page 193: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

186

Np_MetadataSearchCriterion_Ext

Syntax:

typedef struct { Np_DateTime* startTime; Np_DateTime* endTime; Np_IDList_Ext metadataDeviceID; wchar_t* keyWord; bool usingRE;} Np_MetadataSearchCriterion_Ext;

Member:

Name Meaning

startTimeStart time of the query. Set it to NULL for ignoring this criteria

endTimeEnd time of the query Set it to NULL for ignoring this criteria

metadataDeviceID;The source metadata channel id of the query.

keyWordThe keyword of the query. Set it to NULL for ignoring this criteria

usingREThe keyWord is the format of regular expression

Page 194: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

187

Np_MetadataSourceList_Ext

Syntax:

typedef struct { size_t size; Np_MetadataSource_Ext* items;} Np_MetadataSourceList;;

Member:

Name Meaning

size Size of the list.

itemsPointer of the array of the metadata sources, in format of Np_MetadataSource_Ext.

Page 195: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

188

Np_MetadataSource_Ext

Syntax:

typedef struct { Np_ID_Ext id; wchar_t* name; wchar_t* ip; long port; Np_MetadataSourceType type; Np_MetadataChannelList channels_Ext;} Np_MetadataSource_Ext;

Member:

Name Meaning

id The id of metadata source device.

nameThe name of metadata source device.

ip The ip of metadata source device.

portThe port of metadata source device.

type

The type of metadata source device, including kMetadataNone kMetadataPOS kMetadataAccessControl kMetadataLPR

channels The channels of metadata source

Page 196: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

189

Np_MetadataChannelList_Ext

Syntax:

typedef struct { size_t size; Np_MetadataChannel_Ext* items;}Np_MetadataChannelList_Ext;

Member:

Name Meaning

size Size of the list.

itemsPointer of the array of the channels, in format of Np_MetadataChannel_Ext.

Page 197: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

190

Np_MetadataChannel_Ext

Syntax:

typedef struct { Np_ID_Ext id; wchar_t* name;}Np_MetadataChannel_Ext;

Member:

Name Meaning

id; The id of metadata channel device

nameThe name of metadata channel device.

Page 198: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

191

Np_PTZContinuousMove

Syntax:

typedef struct {Np_PanDirection pan;Np_TiltDirection tilt;Np_ZoomDirection zoom;Np_FocusDirection ocus;int panSpeed;int tiltSpeed;int zoomSpeed;int focusSpeed;

} Np_PTZContinuousMove;;

Member:

Name Meaning

pan

Direction of the pan operation. This field can be:

kNoPan kPanLeft kPanRight

tilt

Direction of the tile operation. This field can be:

kNoTilt kTiltUp kTiltDown

zoom

This field can be: kNoZoom kZoomIn kZoomOut

focus

This field can be: kNoFocus kFocusNear kFocusFar

Page 199: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

192

panSpeed Reserved

tiltSpeed Reserved

zoomSpeed Reserved

focusSpeed Reserved

Page 200: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

193

Np_PTZRectangle

Syntax:

typedef struct { int currentWidth; int currentHeight; int leftupX; int leftupY; int targetWidth; int targetHeight; int speed; } Np_PTZRectangle;

Member:

Name Meaning

currentWidth Width of the displayed UI

currentHeight Height of the displayed UI

leftupXX-axis readout of the upper-left corner of the rectangle

leftupYY-axis readout of the upper-left corner of the rectangle

targetWidthRectangle width specified by operator

targetWidthRectangle height specified by operator

Speed Ranging from 1 to 100

Remark: This function is selectively supported by IP camera. If this function is supported, operator can specify a rectangle and the visible range after zooming will be equivalent to the rectangle. Since user draws the rectangle on the UI which carries the image, the input parameters are in the unit of this UI Not being supported in SDK 4.0.0.

Page 201: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

194

Page 202: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

195

Np_PTZPreset

Syntax:

typedef struct { int presetNo; std::wstring presetName; } Np_PTZPreset;

Member:

Name Meaning

presetNO Preset index number

presetName Preset name

Page 203: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

196

Np_PTZParameter

Syntax:

typedef union {Np_PTZContinuousMove* move;Np_PTZRectangle* rectangle;Np_PTZPreset* preset;

} Np_PTZParameter;

Member:

Name Meaning

moveContinuous move control parameter

rectangle Rectangle move control parameter

preset Preset control parameter

Page 204: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

197

Np_PTZControlParam

Syntax:

typedef struct {Np_PTZCommand command;Np_PTZParameter param;

} Np_PTZControlParam;

Member:

Name Meaning

command

Command type for PTZ execution, including kPTZStop kPTZContinuousMove kPTZAutoFocus kPTZHome kPTZRectangle kPTZPresetGo kPTZPresetSet kPTZPresetClear

paramParameter of the execution command

Page 205: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

198

Np_TalkAudioFormat

Syntax:

typedef struct { int channels; int bitsPerSample; int sampleRate; int sampleRequest;} Np_TalkAudioFormat;

Member:

Name Meaning

channels The number of audio

channels.

bitPerSample The number of bits in each

sample.

sampleRate The number of sample per

second.

sampleRequest The number of sample in a

audio packet.

Page 206: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

199

Np_ServerInfo_MainConsole

Syntax:

typedef struct { wchar_t* serverType; wchar_t* serverVersion; wchar_t* modelType; wchar_t* oemName; int sessionNumber; int maximumChannel; int allowSmartGuard; int allowPOS; int allowCounting; int allowEMap; int dbType;} Np_ServerInfo_MainConsole;

Member:

Name Meaning

serverType Mainly “Main Console” for PC

version and “NVRMini” for NAS version

serverVersion Version information of the

server, 4 digits separated by comma(‘,’) or dot(‘.’).

modelType “Main Console” or “Main

Console Lite”

oemName Vender and version

information for specific OEM project if any.

sessionNumber User session number kept by

server

maximumChannel Maximum number of

supported channel

Page 207: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

200

allowSmartGuard Flag indicating whether smart

guard is supported or not, 0 means not supported

allowPOS Flag indicating whether POS is

supported or not, 0 means not supported

allowCounting Flag indicating whether

Counting is supported or not, 0 means not supported

allowEMap Flag indicating whether EMap

is supported or not, 0 means not supported

dbType

Type of recording database, possible values are:-1(Unknown)0( For MainConsole)1(For NAS)2(For Old MainConsole)

Page 208: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

201

Np_ServerInfo

Syntax:

typedef union { Np_ServerInfo_MainConsole *serverInfoMC;} Np_ServerInfo;

Member:

Name Meaning

serverInfoMC

Server information for MainConsole series (LiveView or Playback), see Np_ServerInfo_MainConsole for detail.

Remark: Server information for Corporate-type server is currently unavailable.

Page 209: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

202

Np_ExportContent

Syntax:

typedef struct { Np_ID id; Np_DateTime startTime; Np_DateTime endTime; bool excludeAudio; int width; int height;} Np_ExportContent;

Member:

Name Meaning

id

Identification of the camera with the video content to export. The session of this camera must be attached and “OpenRecord”ed.

startTime Start time of the video

endTime End time of the video

excludeAudio Flag for excluding audio data

or not

width Width of the original video

frame

height Height of the original video

frame

Page 210: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

203

Np_ExportProfile

Syntax:

typedef struct { int profile; wchar_t* description;} Np_ExportProfile;

Member:

Name Meaning

profile Profile identifier number

description Description of the profile

Page 211: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

204

Np_ExportProfileList

Syntax:

typedef struct { size_t size; Np_ExportProfile* items;} Np_ExportProfileList;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Page 212: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

205

Np_ExportFormat

Syntax:

typedef struct { int format; wchar_t* description; Np_ExportProfileList supportedProfile;} Np_ExportFormat;

Member:

Name Meaning

format Format identifier number

description Description of the format

supportedProfile List of supported profiles

under certain format

Page 213: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

206

Np_ExportFormatList

Syntax:

typedef struct { size_t size; Np_ExportFormat* items;} Np_ExportFormatList;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Page 214: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

207

Np_SensorProfile

Syntax:

typedef struct { Np_StreamProfile profile; std::wstring frameRate; std::wstring bitrate; std::wstring resolution; std::wstring codec; std::wstring quality; } Np_SensorProfile;

Member:

Name Meaning

profileEnumeration indicating quality level of the profile.

frameRate Frame rate

bitrate Bit rate

resolution Resolution

codec Codec

quality Quality

Page 215: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

208

Np_SensorProfile_CS

Syntax:

typedef struct { Np_StreamProfile profile; wchar_t* frameRate; wchar_t* bitrate; wchar_t* resolution; wchar_t* codec; wchar_t* quality; } Np_SensorProfile_CS;

Member:

Name Meaning

profileEnumeration indicating quality level of the profile.

frameRate Frame rate

bitrate Bit rate

resolution Resolution

codec Codec

quality Quality

Np_SensorProfile_CS1

Syntax:

typedef struct { Np_StreamProfile profile; wchar_t* frameRate; wchar_t* bitrate;

Page 216: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

209

wchar_t* resolution; wchar_t* codec; wchar_t* quality; wchar_t* profile_name_alias;

wchar_t* raw_source;wchar_t* resolution_height;wchar_t* resolution_width;wchar_t* source_stream;

} Np_SensorProfile_CS1;

Member:

Name Meaning

profileEnumeration indicating quality level of the profile.

frameRate Frame rate

bitrate Bit rate

resolution Resolution

codec Codec

quality Quality

profile_name_alias Profile name

raw_source Raw source

resolution_height Resolution height

resolution_width Resolution Width

source_stream Source stream

Page 217: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

210

Np_SensorProfile_CS_List

Syntax:

typedef struct { size_t size; Np_SensorProfile_CS* items;} Np_SensorProfile_CS_List;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Page 218: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

211

Np_SensorProfile_CS1_List

Syntax:

typedef struct { size_t size; Np_SensorProfile_CS1* items;} Np_SensorProfile_CS_List;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Np_SubDevice_CS

Syntax:

typedef struct { Np_ID ID; wchar_t* name; wchar_t* description;} Np_SubDevice_CS;

Member:

Name Meaning

IDDevice Identity which can be

referred from Np_ID

name Device Name

description Device Description

Page 219: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

212

Page 220: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

213

Np_SubDevice_Ext

Syntax:

typedef struct { Np_ID_Ext ID; wchar_t* name; wchar_t* description;} Np_SubDevice_Ext;

Member:

Name Meaning

IDDevice Identity which can be

referred from Np_ID_Ext

name Device Name

description Device Description

Page 221: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

214

Np_SubDevice_CS_List

Syntax:

typedef struct { size_t size; Np_SubDevice_CS* items;} Np_SubDevice_CS_List;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Page 222: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

215

Np_SubDevice_Ext_List

Syntax:

typedef struct { size_t size; Np_SubDevice_Ext* items;} Np_SubDevice_Ext_List;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Page 223: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

216

Np_Device_CS

Syntax:

typedef struct {Np_ID ID;

wchar_t* name; wchar_t* description; Np_SubDevice_CS_List SensorDevices; Np_SubDevice_CS_List PTZDevices; Np_SubDevice_CS_List AudioDevices; Np_SubDevice_CS_List DIDevices; Np_SubDevice_CS_List DODevices;} Np_Device_CS;

Member:

Name Meaning

IDDevice Identity which can be

referred from Np_ID

name Device Name

description Device Description

SensorDevicesAdditional devices associated to

this device

PTZDevicesPTZ devices associated to this

device

AudioDevicesAudio devices associated to this

device

DIDevicesDigital Input devices associated to

this device

DODevicesDigital Output devices associated to

this device

Page 224: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

217

Np_Device_Ext

Syntax:

typedef struct {Np_ID_Ext ID;

wchar_t* name; wchar_t* description; Np_SubDevice_Ext_List SensorDevices; Np_SubDevice_Ext_List PTZDevices; Np_SubDevice_Ext_List AudioDevices; Np_SubDevice_Ext_List DIDevices; Np_SubDevice_Ext_List DODevices;} Np_Device_Ext;

Member:

Name Meaning

IDDevice Identity which can be

referred from Np_ID_Ext

name Device Name

description Device Description

SensorDevicesAdditional devices associated to

this device

PTZDevicesPTZ devices associated to this

device

AudioDevicesAudio devices associated to this

device

DIDevicesDigital Input devices associated to

this device

DODevicesDigital Output devices associated to

this device

Page 225: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

218

Np_Device_CS_List

Syntax:

typedef struct { size_t size; Np_Device_CS* items;} Np_Device_CS_List;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Page 226: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

219

Np_Device_Ext_List

Syntax:

typedef struct { size_t size; Np_Device_Ext* items;} Np_Device_CS_List;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Page 227: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

220

Np_DeviceGroup_CS

Syntax:

typedef struct {wchar_t* name; //server namewchar_t* description;Np_Device_CS_List Camera;Np_Device_CS_List IOBox;

} Np_DeviceGroup_CS;

Member:

Name Meaning

name Server Name

description Server Description

Camera Cameras connected to the server

IOBOXDigital Input/Output box connected

to the server

Page 228: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

221

Np_DeviceGroup_Ext

Syntax:

typedef struct {wchar_t* name; //server namewchar_t* description;Np_Device_Ext_List Camera;Np_Device_Ext_List IOBox;

} Np_DeviceGroup_Ext;

Member:

Name Meaning

name Server Name

description Server Description

Camera Cameras connected to the server

IOBOXDigital Input/Output box connected

to the server

Page 229: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

222

Np_DeviceGroup_CS_List

Syntax:

typedef struct { size_t size; Np_DeviceGroup_CS* items;} Np_DeviceGroup_CS_List;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Page 230: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

223

Np_DeviceGroup_Ext_List

Syntax:

typedef struct { size_t size; Np_DeviceGroup_Ext* items;} Np_DeviceGroup_Ext_List;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Page 231: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

224

Np_DeviceList_CS

Syntax:

typedef struct {Np_DeviceGroup_CS_List PhysicalGroup;Np_DeviceGroup_CS_List LogicalGroup;

} Np_DeviceList_CS;

Member:

Name Meaning

PhysicalGroupA representation of the device

group with their physical connection order

LogicalGroupA representation of the device group with a user-defined relationship

Remarks:

Only Physical Group would be used by MainConsole Liveview , MainConsole Playback and Corporate/Titan currently.

Page 232: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

225

Np_DeviceList_Ext

Syntax:

typedef struct {Np_DeviceGroup_Ext_List PhysicalGroup;Np_DeviceGroup_Ext_List LogicalGroup;

} Np_DeviceList_Ext;

Member:

Name Meaning

PhysicalGroupA representation of the device

group with their physical connection order

LogicalGroup Reserved

Page 233: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

226

Np_PTZPreset_CS

Syntax:

typedef struct { int presetNo; wchar_t* presetName;} Np_PTZPreset_CS;

Member:

Name Meaning

presetNO Preset index number

presetName Preset name

Page 234: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

227

Np_PTZPreset_CS_List

Syntax:

typedef struct { size_t size; Np_PTZPreset_CS* items;} Np_PTZPreset_CS_List;

Member:

Name Meaning

size Size of the list

items Pointer to array of list items

Page 235: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

228

Np_PTZInfo_CS

Syntax:

typedef struct { Np_PTZPresetType_CS ptzPresetType; Np_PTZPreset_CS_List ptzPresetList; Np_PTZPatrol_CS ptzPatrol;} Np_PTZInfo_CS;

Member:

Name Meaning

ptzPresetType Preset type

ptzPresetList Preset list

ptzPatrol Patrol information

Page 236: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

229

Np_PTZPresetType_CS

Syntax:

typedef struct { bool allowSetPresetByIndex; bool allowClearAllPreset; size_t maxPresetNumber;} Np_PTZInfo_CS;

Member:

Name Meaning

allowSetPresetByIndex

Flag indicating whether adding new preset to specify preset slot is supported or not. 0 means not supported.

allowClearAllPresetFlag indicating whether clearing all presets is supported or not. 0 means not supported.

maxPresetNumberMaximum number of preset points supported

Page 237: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

230

Np_PTZPatrol_CS

Syntax:

typedef struct { bool isPatrolStartEnabled; bool isPatrolStopEnabled; bool m_is_patrol_enable; int m_active_group_index; int m_event_trigger_group_index WORD m_max_patrol_group_number; Np_PatrolGroup_CS m_group[MAX_GROUP_AMOUNT];} Np_PTZInfo_CS;

Member:

Name Meaning

isPatrolStartEnabledFlag indicating whether the device has the ability to start patrol or not.

isPatrolStopEnabledFlag indicating whether the device has the ability to stop patrol or not.

m_is_patrol_enableFlag indicating whether the device is starting patrol or not.

m_active_group_index The index of activated group

m_event_trigger_group_index Reserved

m_max_patrol_group_numberMaximum number of patrol groups supported

m_group The Information of each group

Page 238: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

231

Np_PatrolGroup_CS

Syntax:

typedef struct { int m_preset_point[MAX_PATROL_POINT]; int m_preset_count; int m_period; int m_time; int m_next_point; wchar_t m_name[MAX_GROUP_NAME_LENGTH];} Np_PatrolGroup_CS;

Member:

Name Meaning

m_preset_pointThe index of preset points in the group

m_preset_countThe count of preset points in the group

m_period The period time of the group

m_time Reserved

m_next_point Reserved.

m_name The group name

Page 239: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

232

Np_PTZParameter_CS

Syntax:

typedef union {Np_PTZContinuousMove* move;Np_PTZRectangle* rectangle;Np_PTZPreset_CS* preset;

} Np_PTZParameter_CS;

Member:

Name Meaning

moveContinuous move control parameter

rectangle Rectangle move control parameter

preset Preset control parameter

Page 240: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

233

Np_PTZControlParam_CS

Syntax:

typedef struct {Np_PTZCommand command;Np_PTZParameter_CS param;

} Np_PTZControlParam_CS;

Member:

Name Meaning

command

Command type for PTZ execution, including kPTZStop kPTZContinuousMove kPTZAutoFocus kPTZHome kPTZRectangle kPTZPresetGo kPTZPresetSet kPTZPresetClear

paramParameter of the execution command

Page 241: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

234

RecordingLog_Subscribe

Purpose Compatibility

Subscribe the callback for the recording log

none

Syntax:

Np_Result_t RecordingLog_Subscribe(void *p_handle,void **pp_session,fnRecordLogHandle callback,void *p_ctx);

Parameters:

Name Meaning

[IN] p_handleThe handle allocated by Create_HandleWChar.

[OUT] pp_session The created session.

[IN] callback The function used to callback.

[IN] p_ctx The parameter of the callback function.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Remarks:

It is programmer’s responsibility to release the allocated memory by calling RecordingLog_Unsubscribe function.

Page 242: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

235

RecordingLog_Unsubscribe

Purpose Compatibility

Unsubscribe the callback session none

Syntax:

Np_Result_t RecordingLog_Unsubscribe(void *p_session);

Parameters:

Name Meaning

[IN] p_session The session to be unsubscribed.

Return Value:

Np_Result_OK represents the success of the function call. Any positive value represents the failure of the function. The detailed meaning of the error value is defined at NpClientDefine.h.

Page 243: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

236

Np_SourceType

Syntax:

enum Np_SourceType{ kSourceCamera = 0, kSourceDigitalInput = 1, kSourceMetaData = 2, kSourceServer = 3, kSourceALL = 4};

Page 244: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

237

Np_ScheduleLogItem

Syntax:

typedef struct ST_Np_ScheduleLogItem{ Np_ID ID; Np_DateTime startTime; Np_DateTime endTime; Np_ScheduleType type;} Np_ScheduleLogItem;

Member:

Name Meaning

ID ID of the source device.

startTimeSystem time of server when the recorded video starts.

endTimeSystem time of server when the recorded video ends.

type

Type of the recording schedule, which could be the following values: kScheduleRecordOnly kScheduleRecordMovingOnly kScheduleRecordOnEvent kScheduleRecordBoost

Other values in the enumeration Np_ScheduleType are reserved.

Page 245: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

238

Sample code

The sample code is written by QT, to demonstrate how to utilize our SDK.

Liveview Streaming

This liveview stream creation flow and code segment as below:

#include "NpClient.h"#include "SDKExport.h"

Np_DeviceList_Ext m_deviceList;//Server IPwchar_t *m_IP = L"localhost";//LiveView Port that was set on serverunsigned short m_LiveViewPort = 5250;wchar_t *m_Password = L"admin";void *m_pHandle = NULL;void *m_pPlayer = NULL;void *m_pSession = NULL;Np_ServerType m_Type = kCrystal;wchar_t *m_UserName = L"admin";Np_PixelFormat m_videoPixelFormat;

static void VideoHandle(Np_DateTime time,char *buffer,int len,int width,int height,

Attach Session

Create player

Retrieve device list

Create handle

Page 246: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

239

void *ctx){

//Callback function for receiving image}

static void AudioHandle(Np_DateTime time,char *buffer,int len,int bitsPerSample,int samplesPerSec,int channels,void *ctx)

{//Callback function for receiving audio

}

static void ErrorHandle(Np_Error error, void *ctx){

//Callback function for error}

void onCreateLiveStream(){

Np_Result_t result = Create_HandleWChar(&m_pHandle,m_Type,m_UserName,m_Password,m_IP,m_LiveViewPort);

if (Np_Result_OK == result){

result = Info_GetDeviceList_Ext(m_pHandle, m_deviceList);if (

Np_Result_OK == result &&m_deviceList.PhysicalGroup.size > 0 &&

Page 247: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

240

m_deviceList.PhysicalGroup.items[0].Camera.size > 0){

result = LiveView_CreatePlayer(m_pHandle, &m_pPlayer);if (Np_Result_OK == result){

//Get the liveview stream of the first cameraNp_ID_Ext id

= m_deviceList.PhysicalGroup.items[0].Camera.items[0].ID;result = LiveView_AttachSessionExtExt(

m_pPlayer,&m_pSession,id,kProfileNormal,m_videoPixelFormat,VideoHandle, NULL,AudioHandle, NULL,ErrorHandle, NULL);

}}

}}

Page 248: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

241

PTZ Control

The following is an example to control device to tilt up. Our SDK interface, Control_PTZ_PTZDeviceID_CS_Ext is responsible for controlling the PTZ device. This interface requires an Np_PTZControlParam_CS to indicate the movement, which can be either directional move, home, or preset depending on Camera’s capability.

void onPTZUp(){

Np_PTZControlParam_CS ptzParam;Np_PTZContinuousMove ptzMoveDirection;

memset(&ptzParam, 0, sizeof(ptzParam));memset(&ptzMoveDirection, 0, sizeof(ptzMoveDirection));//ptzMoveDirection indicates the direction of the movementptzMoveDirection.tilt = kTiltUp;//ptzParam.command specifies the command to drive the PTZptzParam.command = kPTZContinuousMove;ptzParam.param.move = &ptzMoveDirection;

//Select the camera of interest and provide the specified commandNp_ID_Ext id;id.centralID = ui.leCentralID->text().toULongLong();id.localID = ui.leLocalID->text().toULongLong();

Control_PTZ_PTZDeviceID_CS_Ext(m_handle, id, &ptzParam);TesterSleep(300);StopPTZ(ptzParam, ptzMoveDirection);

}

//The function is to stop previous ptz.void StopPTZ(

Np_PTZControlParam_CS ptzControlParam,const Np_PTZContinuousMove& ptzMoveCommand)

{ptzControlParam.command = kPTZStop;//Stop the previous PTZ command

Page 249: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

242

Np_ID_Ext id;id.centralID = ui.leCentralID->text().toULongLong();id.localID = ui.leLocalID->text().toULongLong();Control_PTZ_PTZDeviceID_CS_Ext(m_handle, id, &ptzControlParam);

}

Page 250: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

243

View recorded stream

This recorded stream creation flow is similar to the liveview one and the sample code is shown below :

#include "NpClient.h"#include "SDKExport.h"

Np_DeviceList_Ext m_deviceList;//Server IPwchar_t *m_IP = L"localhost";wchar_t *m_Password = L"admin";void *m_pHandle = NULL;//LiveView Port that was set on serverunsigned short m_PlaybackPort = 5250;void *m_pPlayer = NULL;void *m_pSession = NULL;Np_ServerType m_Type = kCrystal;wchar_t *m_UserName = L"admin";Np_PixelFormat m_videoPixelFormat;

static void VideoHandle(Np_DateTime time,char *buffer,int len,int width,int height,void *ctx)

{//Callback function for receiving image

}

static void AudioHandle(Np_DateTime time,char *buffer,int len,int bitsPerSample,

Page 251: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

244

int samplesPerSec,int channels,void *ctx)

{//Callback function for receiving audio

}

static void ErrorHandle(Np_Error error, void *ctx){

//Callback function for error}

void onCreatePlaybackStream(){

Np_Result_t result = Create_HandleWChar(&m_pHandle,m_Type,m_UserName,m_Password,m_IP,m_PlaybackPort);

if (Np_Result_OK == result){

result = Info_GetDeviceList_Ext(m_pHandle, m_deviceList);if (

Np_Result_OK == result &&m_deviceList.PhysicalGroup.size > 0 &&m_deviceList.PhysicalGroup.items[0].Camera.size > 0)

{result = PlayBack_CreatePlayer(m_pHandle, &m_pPlayer);if (Np_Result_OK == result){

//Get the recorded stream of the first cameraNp_ID_Ext id

= m_deviceList.PhysicalGroup.items[0].Camera.items[0].ID;result = PlayBack_AttachSessionExtExt(

m_pPlayer,

Page 252: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

245

&m_pSession,id,m_videoPixelFormat,VideoHandle, NULL,AudioHandle, NULL,ErrorHandle, NULL);

if (Np_Result_OK == result){

Np_DateTime startTime, endTime;memset(&startTime, 0, sizeof(startTime));memset(&endTime, 0, sizeof(endTime));//video 2011/4/7 15"32:44 ~ 2011/4/7 15:2:54startTime.year = 2011;startTime.month = 4;startTime.day = 7;startTime.hour = 15;startTime.minute = 32;startTime.second = 44;endTime.year = 2011;endTime.month = 4;endTime.day = 7;endTime.hour = 15;endTime.minute = 32;endTime.second = 54;PlayBack_OpenRecord(m_pPlayer, startTime, endTime);

}}

}}

}

After creating the stream, PlayBack_Play needs to be called to start the video.

Page 253: ftp.nuuo.comftp.nuuo.com/NUUO/teng_tmp/SDK/Document/SDK_API_docum…  · Web viewSDK 4.0 is capable of retrieving information from all recording servers, including MainConsole, NVR

246

Playback control

Regarding of the control of pause, stepforward/stepbackward, previous/next, speedup/speeddown, the interface usage and the corresponding parameters are identical to PlayBack_Play.