wcWebCamClient lib  v0.8.2
Library functions to send common requests by client

Functions

wcRCode DLLEXPORT wcGetConfig (wcHandle client, void *data)
 Get configuration from the server for authorized client. More...
 
wcRCode DLLEXPORT wcSetConfig (wcHandle client, const char *cfg)
 Send configuration of authorized client to the server. More...
 
wcRCode DLLEXPORT wcDeleteRecords (wcHandle client, const char *indices, void *data)
 Delete specified media records for authorized client. More...
 
wcRCode DLLEXPORT wcSendMsg (wcHandle client, const char *msg, void *data)
 Send message from authorized client. More...
 
wcRCode DLLEXPORT wcRequestRecord (wcHandle client, int rid, void *data)
 Request specified media record from server for authorized client. More...
 
wcRCode DLLEXPORT wcRequestRecordMeta (wcHandle client, int rid, void *data)
 Request metadata of specified media record from server for authorized client. More...
 
wcRCode DLLEXPORT wcSaveRecord (wcHandle client, const void *aBuf, size_t sz, const char *meta, void *data)
 Send a media record to server from authorized client. More...
 
wcRCode DLLEXPORT wcLaunchOutStream (wcHandle client, const char *subProtocol, int delta, void *data)
 Launch output stream for authorized client. More...
 
wcRCode DLLEXPORT wcLaunchInStream (wcHandle client, const char *deviceName, void *data)
 Launch task to consume incoming stream from the specified device for authorized client. More...
 

Detailed Description

Function Documentation

◆ wcGetConfig()

wcRCode DLLEXPORT wcGetConfig ( wcHandle  client,
void *  data 
)

Get configuration from the server for authorized client.

See protocol request getConfig.json.

Parameters
clientThe client handle.
dataAdditional user data that passed to the new task ( see also wcTaskGetUserData ).
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcSetJSONStrCallback, wccbkSuccessGetConfig, wcTaskGetUserData

◆ wcSetConfig()

wcRCode DLLEXPORT wcSetConfig ( wcHandle  client,
const char *  cfg 
)

Send configuration of authorized client to the server.

See protocol request setConfig.json.

Parameters
clientThe client handle.
cfgThe C-style JSON-formatted string with new configuration.
Returns
wcRCode WC_OK or error code.
See also
wcRCode

◆ wcDeleteRecords()

wcRCode DLLEXPORT wcDeleteRecords ( wcHandle  client,
const char *  indices,
void *  data 
)

Delete specified media records for authorized client.

See protocol request deleteRecords.json.

Parameters
clientThe client handle.
indicesSpecified media records as C-style JSON-formatted string.
dataAdditional user data that passed to the new task ( see also wcTaskGetUserData ).
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcSetJSONStrCallback, wccbkSuccessDeleteRecords, wcTaskGetUserData

◆ wcSendMsg()

wcRCode DLLEXPORT wcSendMsg ( wcHandle  client,
const char *  msg,
void *  data 
)

Send message from authorized client.

See protocol request addMsgs.json.

Parameters
clientThe client handle.
msgSpecified parameterized message as cJSON object or array of such messages ( addMsgs.json ).
dataAdditional user data that passed to the new task ( see also wcTaskGetUserData ).
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcTaskGetUserData
Examples
multithread_test/main.cpp.

◆ wcRequestRecord()

wcRCode DLLEXPORT wcRequestRecord ( wcHandle  client,
int  rid,
void *  data 
)

Request specified media record from server for authorized client.

See protocol request getRecordData.json.

Parameters
clientThe client handle.
ridSpecified media record id ( getRecordData.json ).
dataAdditional user data that passed to the new task ( see also wcTaskGetUserData).
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcSetDataCallback, wcSetAltDataCallback, wccbkSuccessRequestRecord, wcTaskGetUserData
Examples
media_test/main.cpp.

◆ wcRequestRecordMeta()

wcRCode DLLEXPORT wcRequestRecordMeta ( wcHandle  client,
int  rid,
void *  data 
)

Request metadata of specified media record from server for authorized client.

See protocol request getRecordMeta.json.

Parameters
clientThe client handle.
ridSpecified media record id ( getRecordMeta.json ).
dataAdditional user data that passed to the new task ( see also wcTaskGetUserData).
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wccbkSuccessRequestRecordMeta, wcTaskGetUserData
Examples
media_test/main.cpp.

◆ wcSaveRecord()

wcRCode DLLEXPORT wcSaveRecord ( wcHandle  client,
const void *  aBuf,
size_t  sz,
const char *  meta,
void *  data 
)

Send a media record to server from authorized client.

See protocol request addRecord.json.

Parameters
clientThe client handle.
aBufPointer to record data ( addRecord.json ).
szThe record size in bytes.
metaMetadata for the media record ( addRecord.json ).
dataAdditional user data that passed to the new task ( see also wcTaskGetUserData ).
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcSetTaskCallback, wccbkSuccessSaveRecord, wcTaskGetUserData
Examples
media_test/main.cpp.

◆ wcLaunchOutStream()

wcRCode DLLEXPORT wcLaunchOutStream ( wcHandle  client,
const char *  subProtocol,
int  delta,
void *  data 
)

Launch output stream for authorized client.

See protocol request input.raw.

Parameters
clientThe client handle.
subProtocolThe sub protocol description (C-style string, not NULL).
deltaThe delta time between frames in ms.
dataAdditional user data that passed to the new task ( see also wcTaskGetUserData ).
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcSetTaskCallback, wccbkAfterLaunchOutStream, wccbkSynchroUpdateTask, wccbkSuccessIOStream, wcClientFramePushData, wcTaskGetUserData
Examples
theora_test/output_strm/main.cpp.

◆ wcLaunchInStream()

wcRCode DLLEXPORT wcLaunchInStream ( wcHandle  client,
const char *  deviceName,
void *  data 
)

Launch task to consume incoming stream from the specified device for authorized client.

See protocol request output.raw.

Parameters
clientThe client handle.
deviceNameC-style string containing the specified device name.
dataAdditional user data that passed to the new task ( see also wcTaskGetUserData ).
Returns
wcRCode WC_OK or error code.
See also
wcRCode, wcSetTaskCallback, wccbkAfterLaunchInStream, wccbkSynchroUpdateTask, wccbkSuccessIOStream, wcInTaskPopFrame, wcTaskGetUserData
Examples
theora_test/input_strm/main.cpp.