You can use the sample code of LinkVisual SDK to connect your IP camera with the IoT Platform instance of the video type.
Prerequisites
A product and a device are created. For more information, see Create a video product and device.
Background information
The sample code of LinkVisual SDK for C is used in the Linux operating system. We recommend that you use 64-bit Ubuntu 18.04 to compile the sample code.
Procedure
click LinkVisual SDK to download the sample code of LinkVisual SDK.
NoticeBy downloading the sample code, you agree to the software license agreement. We recommend that you carefully read the agreement before you download the sample code.
Run the
tar-xf lv_2.1.2-lk_2.3.0-ubuntu.tar.gz
command to decompress the package.Run the
cd lv_2.1.2-lk_2.3.0-ubuntu
command to open the folder. The following script describes the structure of the folder.1.jpg avc_aac_1000k avc_aac_1000k.index avc_aac_1000k.meta avc_aac_500k avc_aac_500k.index avc_aac_500k.meta link_visual_ipc
Run the
./link_visual_ipc -p ${YourProductKey} -n ${YourDeviceName} -s ${YourDeviceSecret}
command to connect the device with LinkVisual.Replace the ${YourProductKey}, ${YourDeviceName}, and ${YourDeviceSecret} variables with the device certificate information obtained in Step 6 of the Create a video product and device article.
The following log data indicates that the sample code is implemented.
Go to the Device Details page in the IoT Platform console. The online status of the device is displayed.
Click the TSL Data tab. You can view the Thing Specification Language (TSL) data on the Status tab. After one to three minutes, you can click the Events tab to view the intelligent alert events.
NoteFor more information about the required operations on the Device Details page, see Create a video product and device.