#include <NGIAgoraVideoTrack.h>
ILocalVideoTrack
is the base class for local video tracks, providing the main methods of local video tracks.
After creating local video tracks, you can publish one or more local video tracks by calling publishVideo.
◆ ~ILocalVideoTrack()
agora::rtc::ILocalVideoTrack::~ILocalVideoTrack |
( |
| ) |
|
|
inlineprotected |
◆ getState()
Gets the state of the local video stream.
- Returns
- The current state of the local video stream.
◆ getStatistics()
Gets the statistics of the local video track.
- Parameters
-
[out] | stats | The reference to the statistics of the local video track. |
- Returns
true
: Success.
false
: Failure.
◆ setEnabled()
virtual void agora::rtc::ILocalVideoTrack::setEnabled |
( |
bool |
enable, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Enables or disables the local video track.
Once the local video track is enabled, the SDK allows for local video capturing, processing, and encoding.
- Parameters
-
enable | Determines whether to enable the local video track.
true : Enable the local video track.
false : Disable the local video track.
|
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
◆ setSimulcastStreamMode()
Sets the dual-stream mode on the sender side.
The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to AUTO_SIMULCAST_STREAM
. If you want to modify this behavior, you can call this method and modify the mode to DISABLE_SIMULCAST_STREAM
(never send low-quality video streams) or ENABLE_SIMULCAST_STREAM
(always send low-quality video streams).
- Note
- The difference and connection between this method and enableSimulcastStream is as follows:
- When calling this method and setting mode to
DISABLE_SIMULCAST_STREAM
, it has the same effect as enableSimulcastStream(false)
.
- When calling this method and setting mode to
ENABLE_SIMULCAST_STREAM
, it has the same effect as enableSimulcastStream(true)
.
- Both methods can be called before and after joining a channel. If both methods are used, the settings in the method called later takes precedence.
- Parameters
-
mode | The mode in which the video stream is sent. See SIMULCAST_STREAM_MODE. |
config | The configuration of the low-quality video stream. See SimulcastConfigInternal. If you set the mode parameter to DISABLE_SIMULCAST_STREAM , the config parameter does not take effect. |
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
- 0: Success.
- < 0: Failure.
◆ setVideoEncoderConfiguration()
virtual int agora::rtc::ILocalVideoTrack::setVideoEncoderConfiguration |
( |
const VideoEncoderConfiguration & |
config, |
|
|
aosl_ref_t |
ares = AOSL_REF_INVALID |
|
) |
| |
|
pure virtual |
Sets the video encoder configuration.
Each video encoder configuration corresponds to a set of video parameters, including the resolution, frame rate, bitrate, and video orientation.
The configurations specified in this method are the maximum values under ideal network conditions. If the video engine cannot render the video using the specified parameters due to poor network conditions, the configurations further down the list are considered until a successful configuration is found.
- Parameters
-
config | The reference to the video encoder configuration. See VideoEncoderConfiguration. |
ares | This parameter is used for the SDK lifecycle protection. Fill in the default value. |
- Returns
- 0: Success.
- < 0: Failure.
The documentation for this class was generated from the following file: