#include <NGIAgoraVideoMixerSource.h>
|
virtual int | addVideoTrack (const char *id, agora_refptr< IVideoTrack > track, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | removeVideoTrack (const char *id, agora_refptr< IVideoTrack > track, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | setStreamLayout (const char *id, const MixerLayoutConfig &config, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | delStreamLayout (const char *id, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | addImageSource (const char *id, const MixerLayoutConfig &config, ImageType type=kPng, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | delImageSource (const char *id, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | clearLayout (aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | refresh (aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | setBackground (uint32_t width, uint32_t height, int fps, uint32_t color_argb=0, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | setBackground (uint32_t width, uint32_t height, int fps, const char *url, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | setRotation (uint8_t rotation, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
|
virtual int | getAvgMixerDelay ()=0 |
|
The IVideoMixerSource
class is a multi-in-multi-out video source which receives video streams from multiple local or remote video tracks and generates mixed video stream in user defined output format. When only one video track is added to the mixer, it forwards the incoming video frames to its sinks.
◆ addImageSource()
virtual int agora::rtc::IVideoMixerSource::addImageSource |
( |
const char * |
id, |
|
|
const MixerLayoutConfig & |
config, |
|
|
ImageType |
type = kPng , |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Adds an image source to the mixer with its layout configuration on the mixer canvas.
- Parameters
-
id | The unique id of the image. |
config | The layout configuration. |
type | The image type. |
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
◆ addVideoTrack()
virtual int agora::rtc::IVideoMixerSource::addVideoTrack |
( |
const char * |
id, |
|
|
agora_refptr< IVideoTrack > |
track, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Adds a video track for mixing.
- Parameters
-
id | The unique id of the stream. |
track | The video track to mix. |
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
◆ clearLayout()
virtual int agora::rtc::IVideoMixerSource::clearLayout |
( |
aosl_ref_t |
ares = AOSL_REF_INVALID | ) |
|
|
pure virtual |
Clears all the layout settings set previously.
- Parameters
-
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
◆ delImageSource()
virtual int agora::rtc::IVideoMixerSource::delImageSource |
( |
const char * |
id, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Deletes an image source to the mixer.
- Parameters
-
id | The unique id of the image. |
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
◆ delStreamLayout()
virtual int agora::rtc::IVideoMixerSource::delStreamLayout |
( |
const char * |
id, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Removes the user layout from the mixer canvas.
- Parameters
-
id | The unique id of the stream. |
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
◆ getAvgMixerDelay()
virtual int agora::rtc::IVideoMixerSource::getAvgMixerDelay |
( |
| ) |
|
|
pure virtual |
Gets the average delay (ms) introduced by the mixer module, which includes the average mixing delay plus the encoder delay.
- Returns
- Average delay in ms.
◆ refresh()
virtual int agora::rtc::IVideoMixerSource::refresh |
( |
aosl_ref_t |
ares = AOSL_REF_INVALID | ) |
|
|
pure virtual |
Refreshes the user layout on the mixer canvas.
- Parameters
-
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
◆ removeVideoTrack()
virtual int agora::rtc::IVideoMixerSource::removeVideoTrack |
( |
const char * |
id, |
|
|
agora_refptr< IVideoTrack > |
track, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Removes the video track.
- Parameters
-
id | The unique id of the stream. |
track | The instance of the video track that you want to remove from the mixer. |
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
◆ setBackground() [1/2]
virtual int agora::rtc::IVideoMixerSource::setBackground |
( |
uint32_t |
width, |
|
|
uint32_t |
height, |
|
|
int |
fps, |
|
|
const char * |
url, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Sets the mixer canvas background to override the default configuration.
- Parameters
-
width | Width of the canvas. |
height | Height of the canvas. |
fps | fps of the mixed video stream. |
url | URL of the canvas background image. |
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
◆ setBackground() [2/2]
virtual int agora::rtc::IVideoMixerSource::setBackground |
( |
uint32_t |
width, |
|
|
uint32_t |
height, |
|
|
int |
fps, |
|
|
uint32_t |
color_argb = 0 , |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Sets the mixer canvas background to override the default configuration.
- Parameters
-
width | Width of the canvas. |
height | Height of the canvas. |
fps | fps of the mixed video stream. |
color_argb | Mixer canvas background color in argb. |
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
◆ setRotation()
virtual int agora::rtc::IVideoMixerSource::setRotation |
( |
uint8_t |
rotation, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Sets the rotation of the mixed video stream
- Parameters
-
rotation | The rotation angle:
- 0: none
- 1: 90°
- 2: 180°
- 3: 270°
|
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
◆ setStreamLayout()
virtual int agora::rtc::IVideoMixerSource::setStreamLayout |
( |
const char * |
id, |
|
|
const MixerLayoutConfig & |
config, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Configures the layout of video frames coming from a specific track by ID on the mixer canvas.
- Parameters
-
id | The unique id of the stream. |
config | The layout configuration. |
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
-
The documentation for this class was generated from the following file: