#include "AVCommon.h"
Data Structures | |
struct | VSaaSContractInfo |
Typedefs | |
typedef enum VSaaSType | VSaaSType |
typedef enum VSaaSContractType | VSaaSContractType |
typedef enum VSaaSPullStreamType | VSaaSPullStreamType |
typedef struct VSaaSContractInfo | VSaaSContractInfo |
typedef void(__stdcall * | OnVSaaSConfigChangedCb )(const char *VSaaSconfig) |
typedef void(__stdcall * | OnVSaaSUpdateContractInfoCb )(const VSaaSContractInfo *ContractInfo) |
Enumerations | |
enum | VSaaSType { VSAAS_AWS, VSAAS_ALI } |
enum | VSaaSContractType { VSAAS_UNKNOWN_TYPE, VSAAS_FULLTIME, VSAAS_EVENT } |
enum | VSaaSPullStreamType { VSAAS_EVENT_GENERAL = 999 } |
Functions | |
int32_t | avEnableVSaaS (const char *udid, const char *VSaaSconfig, OnVSaaSConfigChangedCb config_callback, OnVSaaSUpdateContractInfoCb contract_callback) |
After Enabling VSaaS event notification, device can send notification to server and ask server to pull streaming by AVAPI. | |
int32_t | avServNotifyCloudRecordStream (TUTKJsonObject *attr_obj, uint32_t timeout_msec, uint32_t *abort_flag) |
Sending event notification to TUTK cloud and asking cloud to pull streaming. | |
This file describes AV module APIs for VSaaS.
typedef void(__stdcall * OnVSaaSConfigChangedCb)(const char *VSaaSconfig) |
The prototype of VSaaS configuration callback function used for AV server. The configuration function must be set in avEnableVSaaS. This function will be called while receiving VSaaS configuration in json format from av client.
VSaaSconfig | [in] The VSaaS configuration that user need to keep it in the storage. |
typedef void(__stdcall * OnVSaaSUpdateContractInfoCb)(const VSaaSContractInfo *ContractInfo) |
The prototype of VSaaS contractinfo callback function used for AV server. The update contractinfo function must be set in avEnableVSaaS. This function will be called while receiving VSaaS pull stream message in json format from VSaaS server.
ContractInfo | [in] current VSaaS contractinfo. |
typedef struct VSaaSContractInfo VSaaSContractInfo |
The VSaaS contract information and the video format requested by VSaaS server
cb | [in] The check byte of this structure. |
contract_type | [out] The user's contract type of VSaaS.(event, fulltime) |
event_recording_max_sec | [out] The max length of event recording video in sec. |
video_max_fps | [out] The max fps of video. |
recording_max_kbps | [out] The max kbps fo recording. |
video_max_high | [out] The max height of video. |
video_max_width | [out] two max width of video. |
typedef enum VSaaSContractType VSaaSContractType |
typedef enum VSaaSPullStreamType VSaaSPullStreamType |
enum VSaaSContractType |
enum VSaaSPullStreamType |
enum VSaaSType |
int32_t avEnableVSaaS | ( | const char * | udid, |
const char * | VSaaSconfig, | ||
OnVSaaSConfigChangedCb | config_callback, | ||
OnVSaaSUpdateContractInfoCb | contract_callback | ||
) |
After Enabling VSaaS event notification, device can send notification to server and ask server to pull streaming by AVAPI.
This function is used by device to enable VSaaS server pulling stream. This function must be called before avInitialize().
udid | [in] The udid of device. |
VSaaSconfig | [in] The information that can connect to VSaas server. You can get this from the registed OnVSaaSConfigChangedCb. This param can be NULL if you never get information by OnVSaaSConfigChangedCb before. |
config_callback | [in] This callback function will be called while receiving VSaaSconfig from av client. |
contract_callback | [in] This callback function will be called while receiving pullstream message from VSaaS server. |
int32_t avServNotifyCloudRecordStream | ( | TUTKJsonObject * | attr_obj, |
uint32_t | timeout_msec, | ||
uint32_t * | abort_flag | ||
) |
Sending event notification to TUTK cloud and asking cloud to pull streaming.
This function is used by device to notify TUTK cloud of pulling stream by AVAPI. This function must be called after avEnableVSaaS() or avEnableVSaaSByNebula().
attr_obj | [in] the information of event which including event type and timestamp. |
timeout_sec | [in] timeout of this function. |
abort_flag | [in] set *abort_flag to 1 if you need to abort this function |