Quick start examples for integrating Banuba SDK on Desktop in C++ apps
-
Get the latest Banuba SDK archive for macOS/Windows and the client token. Please fill out our form at form at banuba.com website, or contact us via info@banuba.com.
-
Extract Banuba SDK C API archive into the
OEP-desktop-c-api/bnb_sdk_c_api
dir:bnb_sdk_c_api/
=>OEP-desktop-c-api/bnb_sdk_c_api
-
Windows Only: copy
bnb_viewer_standalone/resources/
files into theOEP-desktop-c-api/resources
dir:bnb_viewer_standalone/resources/
=>OEP-desktop-c-api/resources
-
Copy and Paste your client token into the appropriate section of
OEP-desktop-c-api/main.cpp
-
Generate project files by executing the following commands:
cd %path_to_repository% git submodule update --init md build cd build cmake -A Win32 ..
cd %path_to_repository% git submodule update --init md build cd build cmake -A x64 ..
cd $path_to_repository git submodule update --init mkdir build cd build cmake -G Xcode ..
-
The previous step will generate a Xcode project for macOS and a Visual Studio project for Windows. Open the viewer_standalone project in an appropriate IDE on your platform.
-
Select target
example
. -
Run build.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- oep - is a submodule of the offscreen effect player
- libraries
- renderer - used only to demonstrate how to work with offscreen_effect_player. Draws received frames to the specified GLFW window
- utils
- glfw_utils - contains helper classes to work with GLFW
- ogl_utils - contains helper classes to work with Open GL
- utils - contains common helper classes such as thread_pool
- main.cpp - contains the main function implementation, demonstrating basic pipeline for frame processing to apply effect offscreen
- effect_player.cpp, effect_player.hpp - contains the custom implementation of the effect_player interface with using cpp api
- render_context.cpp, render_context.hpp - contains the custom implementation of the render_context interface with using GLFW
-
Open
OEP-desktop-c-api/main.cpp
-
On line 87 find:
try { play_effect("effects/Afro"); }
-
Write the effect name that you want to run. For example: ("effects/your_effect_name")
Note: The effect must be in OEP-desktop-c-api-master/resources/effect
.
For integration of the Offscreen Effect player to your application it is necessary to copy the oep folder and implement interfaces for effect_player and render_context, but if your application is based on the GLFW library and using bnb_effect_player cpp api, you can just reuse current implementation.