All Products
Search
Document Center

ApsaraVideo Live:SDK integration

Last Updated:Aug 21, 2024

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

  1. Download the latest version of Push SDK for Windows. For more information, see SDK download and release notes.

  2. Download the demo source code of the latest version of Push SDK for Windows.

  3. 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.

image

Integration procedure

You can perform the following steps to use CMake to integrate the SDK:

  1. Decompress the SDK package that you downloaded. The following code shows the directory structure of the folders.

    \---windows
        +---include
        |   +---player
        |   \---pusher
        \---x64
            +---Debug
            \---Release
  2. 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.

  3. 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)
    Note

    CMake obtains the path by using the ${CMAKE_CURRENT_SOURCE_DIR} variable.

  4. 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.