Red5 Core SDK Examples – Overview
The Red5 Pro Core SDK can be used to develop native desktop applications for MacOS, Windows, and Linux.
The following documents contain details about the public examples of how to integrate various supported features into your application.
Building the Examples
For Linux/MacOS
-
Install dependencies
sudo apt-get install g++ make cmake unzip
-
Make local directory
mkdir ~/Red5Core
-
Download the Red5 Pro Core SDK distribution and save to
~/Red5Core
-
Unzip
cd ~/Red5Core unzip <distribution>.zip
-
Set the environment variable for CMake
export CMAKE_PREFIX_PATH=~Red5Core/<distribution>/cmake
-
Create build files
cd ~/Red5Core/<distribution>/examples cmake .
-
Build examples
cd ~/Red5Core/<distribution>/examples make
-
Execute the basic example
cd ~/Red5Core/<distribution>/examples/basic ./r5sdk_example_basic
For Windows
substitute your username for
<user>
. -
Install dependencies:
- Visual Studio – Visit https://visualstudio.microsoft.com/vs/community/ to download and install the latest version for Windows.
- cmake – Visit https://cmake.org/download/ to download and install the latest release
-
Make a local directory
mkdir c:Users<user>Red5Core
-
Download the Red5 Pro Core SDK distribution and save to
C:\Users\<user>\Red5Core\<distribution>.zip
-
Unzip the distribution. This will create
C:\Users\<user>\Red5Core\<distribution>\cmake
,docs
, and other directories. -
Make a binary directory
mkdir c:Users<user>Red5Core<distribution>build
-
Run
cmake-gui
-
Set Where is the source code to
C:\Users\<user>\Red5Core\<distribution>\examples
-
Set Where to build the binaries to
C:\Users\<user>\Red5Core\<distribution>\build
-
Click Configure
-
Click Generate
-
Click Open Project and select the Visual Studio distribution you installed earlier.
-
Inside the Visual Studio project, select Release from the Solution Configurations dropdown.
-
Right-click inside Search Solution Explorer on ALL_BUILD and select Build
-
Right-click inside Search Solution Explorer on INSTALL and select Build
-
Execute the basic example from
C:\Users\<user>\Red5Core\<distribution>\build\r5core_example_basic