MediaReceiver

MediaReceiver

A MediaReceiver contains the logic for receiving, decoding and aligning incoming media sources from the Ingests. The aligned data is then delivered to the Rendering Engine which is also responsible for setting up the MediaReceiver. The MediaReceiver has a builtin multi view generator, which can create output streams containing composited subsets of the incoming video sources. This class is controlled using an ISystemControllerInterface provided when starting it.

#include <MediaReceiver.h>

Public Classes

Name
structNewStreamParameters
A struct containing information on the format of an incoming stream.
structSettings
Settings for a MediaReceiver.

Public Types

Name
enum classTallyBorderColor { kNone, kRed, kGreen, kYellow}
Available colors for tally border in multi view.

Public Functions

Name
MediaReceiver()
Default constructor.
~MediaReceiver()
Default destructor.
boolstart(const std::shared_ptr< ISystemControllerInterface > & controllerInterface, const Settings & settings)
Start the MediaReceiver. This method will call connect on the System controller interface and set up the callbacks from the interface to call internal methods.
voidstop()
Stop the MediaReceiver.
std::function< void(const AlignedFramePtr &)>getCustomMultiViewSourceInput(uint32_t inputSlot, const std::string & name ="")
This method allows the Rendering Engine to provide custom input sources to the Multi-view generator to send video streams that can be added to the multi-views. This could for instance be used for adding a “preview” of the video stream the rendering engine is about to cut to.
voidsetTallyBorder(uint32_t inputSlot, TallyBorderColor color)
Set tally border color in the multi-views for a specific input slot.
voidclearTallyBorder(uint32_t inputSlot)
Remove tally border in the multi-views for a specific input slot.
voidclearAllTallyBorders()
Remove all tally borders.
MediaReceiver::TallyBorderColorgetTallyBorder(uint32_t inputSlot) const
get tally border color for an input slot
MediaReceiver(MediaReceiver const & ) =delete
MediaReceiver is neither copyable nor movable.
MediaReceiver(MediaReceiver && ) =delete
MediaReceiver &operator=(MediaReceiver const & ) =delete
MediaReceiver &operator=(MediaReceiver && ) =delete
std::stringgetVersion()
Get application version.
std::stringgetBuildInfo()
Get application build information.
std::stringgetLibraryVersions()
Get versions of the libraries available at runtime, among others, CUDA runtime and driver versions.

Public Types Documentation

enum TallyBorderColor

EnumeratorValueDescription
kNone
kRed
kGreen
kYellow

Available colors for tally border in multi view.

Public Functions Documentation

function MediaReceiver

MediaReceiver()

Default constructor.

function ~MediaReceiver

~MediaReceiver()

Default destructor.

function start

bool start(
    const std::shared_ptr< ISystemControllerInterface > & controllerInterface,
    const Settings & settings
)

Start the MediaReceiver. This method will call connect on the System controller interface and set up the callbacks from the interface to call internal methods.

Parameters:

  • controllerInterface The ISystemControllerInterface to use for this MediaReceiver. The interface should be configured (Such as setting the IP address and port of the System Controller if a server based System Controller is used) but not connected before passed to this method. This method will internally set the callbacks before connecting to the controller. If the controller is already connected or if the controller is not configured, this method will return false. This class will take ownership of the smart pointer.
  • settings The settings to use for the MediaReceiver.

Return: True if the MediaReceiver was started successfully, false otherwise.

function stop

void stop()

Stop the MediaReceiver.

function getCustomMultiViewSourceInput

std::function< void(const AlignedFramePtr &)> getCustomMultiViewSourceInput(
    uint32_t inputSlot,
    const std::string & name =""
)

This method allows the Rendering Engine to provide custom input sources to the Multi-view generator to send video streams that can be added to the multi-views. This could for instance be used for adding a “preview” of the video stream the rendering engine is about to cut to.

Parameters:

  • inputSlot The input slot this source will be “plugged in” to. The custom input sources share the input slots with the streams connected from Ingests. This means that it is probably a good idea to use higher numbered slots for these custom inputs, such as numbers from 1000, so that the lower numbers, 1 and up, can be used by the connected video cameras, as the input slot number will also be used when cutting.
  • name Optional human readable name of this stream, to be presented to the System Controller.

See: MediaReceiver::Settings::mDecodedFormat.

Return: A function to where the Rendering Engine should send the frames. In case the requested inputSlot is already used by another custom input source, or a stream from an ingest, the returned function will be nullptr.

Precondition: The DataFrames sent to this function must have the same pixel format as this MediaReceiver is configured to deliver to the Rendering Engine,

function setTallyBorder

void setTallyBorder(
    uint32_t inputSlot,
    TallyBorderColor color
)

Set tally border color in the multi-views for a specific input slot.

Parameters:

  • inputSlot the input slot for a source
  • color the color to set

function clearTallyBorder

void clearTallyBorder(
    uint32_t inputSlot
)

Remove tally border in the multi-views for a specific input slot.

Parameters:

  • inputSlot the input slot for a source

function clearAllTallyBorders

void clearAllTallyBorders()

Remove all tally borders.

function getTallyBorder

MediaReceiver::TallyBorderColor getTallyBorder(
    uint32_t inputSlot
) const

get tally border color for an input slot

Parameters:

  • inputSlot the input slot to get color for

Return: the tally border color for the given input slot

function MediaReceiver

MediaReceiver(
    MediaReceiver const & 
) =delete

MediaReceiver is neither copyable nor movable.

function MediaReceiver

MediaReceiver(
    MediaReceiver && 
) =delete

function operator=

MediaReceiver & operator=(
    MediaReceiver const & 
) =delete

function operator=

MediaReceiver & operator=(
    MediaReceiver && 
) =delete

function getVersion

static std::string getVersion()

Get application version.

Return: a string with the current version, e.g. “1.0.0”

function getBuildInfo

static std::string getBuildInfo()

Get application build information.

Return: a string with the current build information such as git hashes of all direct dependencies

function getLibraryVersions

static std::string getLibraryVersions()

Get versions of the libraries available at runtime, among others, CUDA runtime and driver versions.

Return: a string with the currently found versions of the libraries used by this application


Updated on 2023-01-23 at 12:02:53 +0100