/

Red5 Pro Core SDK


The Red5 Pro Core SDK was developed to support native applications on Linux, Windows, and macOS clients. The SDK provides an API to access the Red5 Pro Server and simplify the creation of media applications in a unified way on any platform. The SDK has a modular structure and can be integrated depending on development needs. The modules provide a C++ API that can be used with most platforms.

  • r5core - The main module that handles Server connection control and media processing. It provides an API to implement and control audio/video sources/renderers, interact with the Red5 Pro Stream Manager, and set up and control connections. The main part of r5core is the Client object that is accessible through the IClient interface. This object can control one server connection and allows for the setup of subscriber or publisher dataflow for video, audio, and metadata. In addition, the Client object checks for a valid SDK license.

Currently, the Client object supports RTSP and WebRTC connections.

  • r5common - A set of objects and methods that are shared between modules. It includes the Ilogger interface and default Logger implementations, media descriptions and structures, codec descriptions, and utilities like a circular buffer and text drawing tools.
  • r5device - This provides the API to enumerate and access the Camera, Microphone, and Speakers. Also, it contains an implementation of device objects for different platforms. Devices are implemented with the corresponding source or renderer interfaces and can be used with IClient to set up connections.
  • r5ffmpeg - This provides an implementation of an FFmpeg universal encoder and decoder that can process all supported formats. This module was mostly created to separate link dependency to FFmpeg from the r5core library.
  • r5net - The service library that provides a unified API for HTTP and WebSocket connections.
  • r5webrtc - This contains the API and implementations of objects for WebRTC signaling and full WebRTC connection for publisher and subscriber. The module can be used to complete signaling for external webrtc implementations, like LibWebRTC, or it can be used to publish and subscribe streams from the Red5 Pro Server.
  • r5core - This links most required modules, but each module can be used separately. Note that all modules also require r5common to define internal structures and interfaces.

Metadata

Red5 Pro Server can serve media data along with different metadata messages. IClient in publishing mode can send messages, and in subscriber mode can receive messages using the ICallbackHandler interface.

Sending metadata messages Receiving metadata messages

Stream Manager

The Red5 Pro Stream Manager is an architecture management and information service that automates the process of creating and deleting Red5 Pro instances.

Core SDK provides an API to simplify interaction with the Stream Manager. The API contains methods for sending requests for publishing, subscribing, and transcoding modes.

In-built implementations

The Red5 Pro Core SDK provides implementations of client interfaces and an API for enumerating those registered implementations to simplify integration for most applications. It has implementations for the encoders/decoders required for working with media data supported by Red5 Pro Server. Also, it contains implementations for the basic integration of different media devices like cameras and microphones.

Note: Implementation is platform-dependent so it may vary depending on the platform.

The package contains examples of how to use API to enumerate registered codecs and devices. Additionally, there are examples of how to use devices to publish and subscribe.

Custom implementations

The Red5 Pro Core SDK provides Interfaces that can be implemented depending on application needs that allow extending the SDK with support for custom devices, codecs, data sources, and renderers.

The distribution package contains examples of raw video and audio source and custom logger that can be useful for integration with the logging system of an application.

Custom transform

The Red5 Pro Core SDK allows plugging in different transformation filters (e.g. encoders/decoders) using the ITransform interface.

Custom renderer

The Red5 Pro Core SDK provides an interface for media data rendering. Using ISingleRenderer it is possible to define how an application will handle different media data received from connections. An example of a custom renderer can be used to subscribe metadata. It shows how to implement a simple raw video data renderer that writes raw data into a local file. It can also use a different API to render video data on-screen.