This topic uses the demo of Push SDK for Windows to describe how to integrate Push SDK for Windows.
Environment requirements
Item | Description |
OS version | Windows 10 or later is required. |
CPU architecture | x64 is required. |
Integration tool | Visual Studio 2022 is required. |
Preparations
Download the latest version of Push SDK for Windows. For more information, see SDK download and release notes.
Download the demo source code of the latest version of Push SDK for Windows.
Learn how to use CMake.
Integration
The following figure shows the directory structure of the demo source code of Push SDK for Windows. In this topic, CMake is used to demonstrate the procedure to integrate Push SDK for Windows.
Integration procedure
You can perform the following steps to use CMake to integrate the SDK:
Decompress the SDK package that you downloaded. The following code shows the directory structure of the folders.
\---windows +---include | +---player | \---pusher \---x64 +---Debug \---Release
Copy the include and x64 folders in the windows directory to your project. In the demo, the folders are placed in the plugins\obs-alirtc\libs directory.
Edit the CMakeLists.txt file to specify the SDK directory.
SET(ALIRTC_VERSION "6.10.0") SET(ALIRTC_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/libs/include) SET(ALIRTC_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/libs/x64/Release) SET(ALIRTC_LIBRARY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/libs/x64/Debug)
NoteCMake obtains the path by using the ${CMAKE_CURRENT_SOURCE_DIR} variable.
Add library files and perform other configurations. For more information, see the content in the plugins\obs-alirtc\libs\CMakeLists.txt file in the demo.
add_library(obs-alirtc MODULE) add_library(OBS::alirtc ALIAS obs-alirtc) # # Other configurations #...
References
For information about how to use the SDK, see Use Push SDK for Windows.