#include <NGIAgoraVideoMixerSource.h>
|
virtual int | addVideoTrack (const char *id, agora_refptr< IVideoTrack > track)=0 |
|
virtual int | removeVideoTrack (const char *id, agora_refptr< IVideoTrack > track)=0 |
|
virtual int | setStreamLayout (const char *id, const MixerLayoutConfig &config)=0 |
|
virtual int | delStreamLayout (const char *id)=0 |
|
virtual int | addImageSource (const char *id, const MixerLayoutConfig &config, ImageType type=kPng)=0 |
|
virtual int | delImageSource (const char *id)=0 |
|
virtual void | clearLayout ()=0 |
|
virtual int | refresh ()=0 |
|
virtual int | setBackground (uint32_t width, uint32_t height, int fps, uint32_t color_argb=0)=0 |
|
virtual int | setBackground (uint32_t width, uint32_t height, int fps, const char *url)=0 |
|
virtual int | setRotation (uint8_t rotation)=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()
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. |
- Returns
-
◆ addVideoTrack()
virtual int agora::rtc::IVideoMixerSource::addVideoTrack |
( |
const char * |
id, |
|
|
agora_refptr< IVideoTrack > |
track |
|
) |
| |
|
pure virtual |
Adds a video track for mixing.
- Parameters
-
id | The unique id of the stream. |
track | The video track to mix. |
- Returns
-
◆ clearLayout()
virtual void agora::rtc::IVideoMixerSource::clearLayout |
( |
| ) |
|
|
pure virtual |
Clears all the layout settings set previously.
◆ delImageSource()
virtual int agora::rtc::IVideoMixerSource::delImageSource |
( |
const char * |
id | ) |
|
|
pure virtual |
Deletes an image source to the mixer.
- Parameters
-
id | The unique id of the image. |
- Returns
-
◆ delStreamLayout()
virtual int agora::rtc::IVideoMixerSource::delStreamLayout |
( |
const char * |
id | ) |
|
|
pure virtual |
Removes the user layout from the mixer canvas.
- Parameters
-
id | The unique id of the stream. |
- 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 |
( |
| ) |
|
|
pure virtual |
Refreshes the user layout on the mixer canvas.
- Returns
-
◆ removeVideoTrack()
virtual int agora::rtc::IVideoMixerSource::removeVideoTrack |
( |
const char * |
id, |
|
|
agora_refptr< IVideoTrack > |
track |
|
) |
| |
|
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. |
- Returns
-
◆ setBackground() [1/2]
virtual int agora::rtc::IVideoMixerSource::setBackground |
( |
uint32_t |
width, |
|
|
uint32_t |
height, |
|
|
int |
fps, |
|
|
const char * |
url |
|
) |
| |
|
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. |
- Returns
-
◆ setBackground() [2/2]
virtual int agora::rtc::IVideoMixerSource::setBackground |
( |
uint32_t |
width, |
|
|
uint32_t |
height, |
|
|
int |
fps, |
|
|
uint32_t |
color_argb = 0 |
|
) |
| |
|
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. |
- Returns
-
◆ setRotation()
virtual int agora::rtc::IVideoMixerSource::setRotation |
( |
uint8_t |
rotation | ) |
|
|
pure virtual |
Sets the rotation of the mixed video stream
- Parameters
-
rotation | The rotation angle:
- 0: none
- 1: 90°
- 2: 180°
- 3: 270°
|
- Returns
-
◆ setStreamLayout()
virtual int agora::rtc::IVideoMixerSource::setStreamLayout |
( |
const char * |
id, |
|
|
const MixerLayoutConfig & |
config |
|
) |
| |
|
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. |
- Returns
-
The documentation for this class was generated from the following file: