1.4. Integrating into your application
This page describes how to integrate the Proximie SDK into your application.
Note that the included samples demonstrate how to integrate the Proximie SDK into an application; see Sample applications for details on where to find them, and how to build them.
1.4.1. Integration
How you integrate the Proximie SDK into your application will depend on how you have obtained the SDK, and whether you are developing a C++ or Python application.
The recommended method for integration of the Proximie SDK into a C++ application is using CMake. The specifics depend on how you have obtained the SDK.
If you have installed the Proximie SDK from our public APT repository (see
APT-based Installation), you can use CMake’s find_package command to find the
SDK; the APT packages include CMake configuration files that allow CMake to
automatically find the SDK.
find_package(PxSDK CONFIG REQUIRED)
You can then add the SDK include directory to your target’s include directories:
target_include_directories(${PROJECT_NAME}
PRIVATE
${PxSDK_INCLUDE_DIR}
)
and link against the SDK library and other dependencies:
target_link_libraries(${PROJECT_NAME}
PUBLIC
PxSDK::PxSDK_Shared
${Boost_LIBRARIES}
OpenSSL::SSL OpenSSL::Crypto
PkgConfig::GLIB
PkgConfig::GSTREAMER
PkgConfig::GST_APP
PkgConfig::GST_SDP
PkgConfig::GST_VIDEO
PkgConfig::GST_WEBRTC
)
If you have downloaded and extracted the SDK release archive, you will need to specify the include and library directories manually in your CMake configuration, e.g.:
target_include_directories(${PROJECT_NAME}
PRIVATE
/path/to/proximie-sdk/include
)
and:
target_link_libraries(${PROJECT_NAME}
PUBLIC
/path/to/proximie-sdk/lib/libPxSDK.so
${Boost_LIBRARIES}
OpenSSL::SSL OpenSSL::Crypto
PkgConfig::GLIB
PkgConfig::GSTREAMER
PkgConfig::GST_APP
PkgConfig::GST_SDP
PkgConfig::GST_VIDEO
PkgConfig::GST_WEBRTC
)
Regardless of installation method, you will also need to resolve the other dependencies of the Proximie SDK, which include Boost, OpenSSL, and various GStreamer packages.
find_package(Boost 1.86 REQUIRED COMPONENTS filesystem url)
find_package(OpenSSL REQUIRED)
find_package(PkgConfig)
pkg_search_module(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
pkg_check_modules(GSTREAMER REQUIRED IMPORTED_TARGET gstreamer-1.0)
pkg_check_modules(GST_APP REQUIRED IMPORTED_TARGET gstreamer-app-1.0)
pkg_check_modules(GST_SDP REQUIRED IMPORTED_TARGET gstreamer-sdp-1.0)
pkg_check_modules(GST_VIDEO REQUIRED IMPORTED_TARGET gstreamer-video-1.0)
pkg_check_modules(GST_WEBRTC REQUIRED IMPORTED_TARGET gstreamer-webrtc-1.0)
C++ Versions
The SDK is compiled with C++ 14 to maximise compatibility balanced with modern C++ features. Future releases of the SDK should support richer C++ features such as C++ 20 coroutines and concepts.
How you install the Proximie SDK in your Python environment will depend on how you have obtained the SDK.
If you have installed the python3-pxsdk package from our public APT repository (see
APT-based Installation), the SDK is available as a Python module named px_core. You
can import this module directly in your Python code:
import px_core
Type stubs (px_core.pyi) are also installed alongside the module, providing IDE
completion and static type-checking support.
The release archive includes Python bindings in a python/ subdirectory. A helper
script, setup_env.sh, is provided under samples/python/ to configure
the required environment variables:
source /path/to/px-core/samples/python/setup_env.sh
This sets both LD_LIBRARY_PATH (so the SDK’s shared libraries can be resolved at
runtime) and PYTHONPATH (so px_core is importable). After sourcing the script,
the module is available in the normal way:
import px_core
1.4.2. Using the SDK in your application
How you then use the Proximie SDK in your application will depend on your goals and application design. The included samples demonstrate various ways to use the Proximie SDK; see Sample applications for details on where to find them, and how to build them.