You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+212-3
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,19 @@ This SDK is designed to integrate IP cameras with the Faceter cloud video survei
7
7

8
8
9
9
**Device App** is an application on the camera that implements the connection between the Faceter CloudCam SDK and the camera platform
10
+
10
11
**Platform SDK** is a camera manufacturer’s platform, it can be the original SDK from the chip manufacturer (SigmaStar, Ingenic, Goke, etc.), or the vendor’s middleware platform built on top of them
11
-
**Faceter CloudCam SDK** – modules that implement interaction with the cloud and Faceter applications. The SDK requires a local RTSP stream, which is transmitted to the Faceter cloud using RTSP-push technology.
12
12
13
-
## Step-by-Step Guide:
13
+
**Faceter CloudCam SDK** – modules that implement interaction with the cloud and Faceter applications. The SDK requires a local RTSP stream, which is transmitted to the Faceter cloud using RTSP-push technology
14
+
15
+
## Intergration sample
16
+
17
+
An example of code with stubs describing intergation process is shown in [integration_sample.c](integration_sample.c)
18
+
19
+
## Step-by-Step Guide
14
20
15
21
1. Initialize library with FaceterClientInit
16
-
2. Implement registration in Faceter cloud trough QR code scanning and WS-Discovery
22
+
2. Implement registration in Faceter cloud through QR code scanning and WS-Discovery
17
23
3. Implement additional methods for controlling the camera via the cloud:
18
24
turning the microphone on/off, rotating the image, ...
19
25
4. Implement transmission of all detections supported by the camera
@@ -25,13 +31,216 @@ This SDK is designed to integrate IP cameras with the Faceter cloud video survei
25
31
26
32
### Initialization
27
33
34
+
First step of integration process is library initialization
* mainStream - video config describes frame rate, codec, bitrate and image size of main stream
74
+
* subStream - same for substream
75
+
* image - image rotation
76
+
* detector - motion detector state
77
+
* osd - OSD visibility
78
+
* nightMode - enable or disable night mode
79
+
* customConfig - here can be stored any other necessary settings in json format
80
+
28
81
### Registration
29
82
83
+
WiFi cameras require QR scanner. Also connection to WiFi network with ssid and password should be implemented. Registration process in this case consists of 3 steps:
84
+
1. Library sends operation code **ControlCodeScanQr** with _not NULL_ parameter to start QR scanner
85
+
86
+
```
87
+
case ControlCodeScanQr: {
88
+
if (param != NULL) {
89
+
//start QR code scanning
90
+
QrScannerStart();
91
+
} else {
92
+
//stop QR code scanning
93
+
QrScannerStop();
94
+
}
95
+
break;
96
+
}
97
+
```
98
+
99
+
2. Show QR code in Faceter application to the camera
100
+
3. When QR code is scanned with QR scanner - call `FaceterClientOnQrScanned` with qr code value string
101
+
102
+
```
103
+
void OnQrScannerScanSuccess(char* qrCode)
104
+
{
105
+
//pass scanned string to Faceter library
106
+
FaceterClientOnQrScanned(qrCode);
107
+
}
108
+
```
109
+
110
+
4. If QR code is correct, code **ControlCodeScanQr** with _NULL_ parameter will be sent to stop QR scanner
111
+
5. Library will sent **ControlCodeSetupWifi** with param _WifiConfig*_ to setup WiFi network
+**Registration reset** - if camera has _RESET_ button it can be used to reset registration state to initial.
195
+
When button _RESET_ pressed longer than 3 seconds, apllication should call `FaceterClientReset` and reboot camera.
196
+
197
+
```
198
+
/*
199
+
* Handler of reset button pressed more than 3 seconds
200
+
*/
201
+
void OnResetButtonPressed()
202
+
{
203
+
//reset registration
204
+
FaceterClientReset();
205
+
RebootSystem();
206
+
}
207
+
```
208
+
209
+
Also for resetting registration state library can call ControlFunction with **ControlCodeRestartCamera** and _not NULL_ param
210
+
211
+
```
212
+
case ControlCodeRestartCamera: {
213
+
if (param != NULL) {
214
+
OnResetButtonPressed();
215
+
} else {
216
+
RebootSystem();
217
+
}
218
+
break;
219
+
}
220
+
```
221
+
+**Serial number** - unique serial number needed for camera identification.
222
+
Application must provide serial number string that will be the same after camera restarted. If no serial number provided camera will use MAC address as serial number
223
+
+**LED indication** - if camera has LED indicators they can be used to inform USER about current camera streaming state.
224
+
Current state will be updated with ControlFunction code **ControlCodeStreamStatus**. If camera has two LED with different colors they should be used as follows
0 commit comments