#include <NGIAgoraRtmpLocalUser.h>
The IRtmpLocalUser
class. Defines the behavior and state of the local user for the CDN streaming.
Each CDN connection has its own user. You can get the pointer of the local user object through getRtmpLocalUser.
◆ VideoBitrateAdjustType
The adjustment type of the video encoding bitrate.
Enumerator |
---|
None | 0: Do not adjust the video encoding bitrate.
|
Increasing | 1: Increase the video encoding bitrate. Each time you use this enum, the video encoding bitrate increases by 50 kbps.
|
Decreasing | 2: Decrease the video encoding bitrate. Each time you use this enum, the video encoding bitrate decreases by 100 kbps.
|
◆ ~IRtmpLocalUser()
virtual agora::rtc::IRtmpLocalUser::~IRtmpLocalUser |
( |
| ) |
|
|
inlinevirtual |
◆ adjustRecordingSignalVolume()
virtual int agora::rtc::IRtmpLocalUser::adjustRecordingSignalVolume |
( |
int |
volume | ) |
|
|
pure virtual |
Adjusts the audio recording signal volume of the audio streams directly pushed to the CDN by the host.
- Parameters
-
volume | The volume. The value range is [0,100], where the following applies:
- 0: Mute.
- 100: (Default) The original volume.
|
- Returns
- 0: Success.
- < 0: Failure.
◆ adjustVideoBitrate()
Adjusts the video encoding bitrate of the video streams directly pushed to the CDN by the host.
The adjustment effect is cumulative when you call this method multiple times. For example, assuming the current video encoding bitrate is 200 kbps, adjustments are applied as follows:
- Call this method, and set
type
to Increasing
. The video encoding bitrate increases by 50 kbps, and the current video encoding bitrate becomes 250 kbps.
- Call this method again, and set the
type
to Decreasing
. The video encoding bitrate decreases by 100 kbps, and the current video encoding bitrate becomes 150 kbps.
- Parameters
-
◆ getRecordingSignalVolume()
virtual int agora::rtc::IRtmpLocalUser::getRecordingSignalVolume |
( |
int32_t * |
volume | ) |
|
|
pure virtual |
Gets the audio recording signal volume of the audio streams directly pushed to the CDN by the host.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ publishAudio()
Pushes a local audio stream to the CDN.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ publishVideo()
Pushes a local video stream to the CDN.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ registerAudioFrameObserver()
virtual int agora::rtc::IRtmpLocalUser::registerAudioFrameObserver |
( |
media::base::IAudioFrameObserver * |
observer | ) |
|
|
pure virtual |
Registers an audio frame observer.
- Parameters
-
observer | A pointer to an IAudioFrameObserver object. |
- Returns
- 0: Success.
- < 0: Failure.
◆ registerRtmpUserObserver()
Registers a user observer of the CDN streaming.
After successful registration, you can receive related callbacks in the IRtmpLocalUserObserver
class.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ registerVideoFrameObserver()
virtual int agora::rtc::IRtmpLocalUser::registerVideoFrameObserver |
( |
media::base::IVideoFrameObserver * |
observer | ) |
|
|
pure virtual |
Registers a video frame observer.
- Parameters
-
observer | A pointer to an IVideoFrameObserver object. |
- Returns
- 0: Success.
- < 0: Failure.
◆ setAudioEnabled()
virtual int agora::rtc::IRtmpLocalUser::setAudioEnabled |
( |
bool |
enabled | ) |
|
|
pure virtual |
Enables or disables the local audio in the CDN streaming.
Call this method before the host starts pushing audio streams to the CDN directly.
- Parameters
-
enabled | Whether to enable the local audio:
- true: Enable the local audio.
- false: Disable the local audio.
|
- Returns
- 0: Success.
- < 0: Failure.
◆ setAudioStreamConfiguration()
Sets the audio encoding properties of the audio streams directly pushed to the CDN by the host.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ setVideoEnabled()
virtual int agora::rtc::IRtmpLocalUser::setVideoEnabled |
( |
bool |
enabled | ) |
|
|
pure virtual |
Enables or disables the local video in the CDN streaming.
Call this method before the host starts pushing video streams to the CDN directly.
- Parameters
-
enabled | Whether to enable the local video.
- true: Enable the local video.
- false: Disable the local video.
|
- Returns
- 0: Success.
- < 0: Failure.
◆ setVideoStreamConfiguration()
Sets the video encoding properties of the video streams directly pushed to the CDN by the host.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ unpublishAudio()
virtual int agora::rtc::IRtmpLocalUser::unpublishAudio |
( |
agora_refptr< rtc::ILocalAudioTrack > |
audioTrack | ) |
|
|
pure virtual |
Stops pushing a local audio stream to the CDN.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ unpublishVideo()
virtual int agora::rtc::IRtmpLocalUser::unpublishVideo |
( |
agora_refptr< rtc::ILocalVideoTrack > |
videoTrack | ) |
|
|
pure virtual |
Stops pushing a local video stream to the CDN.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ unregisterAudioFrameObserver()
virtual void agora::rtc::IRtmpLocalUser::unregisterAudioFrameObserver |
( |
media::base::IAudioFrameObserver * |
observer | ) |
|
|
pure virtual |
Releases the registered audio frame observer.
- Parameters
-
observer | A pointer to an IAudioFrameObserver object. |
◆ unregisteRtmpUserObserver()
Releases the registered user observer of the CDN streaming.
After successfully releasing the IRtmpLocalUserObserver
observer, you can no longer receive any callback in the IRtmpLocalUserObserver
class.
- Parameters
-
- Returns
- 0: Success.
- < 0: Failure.
◆ unregisterVideoFrameObserver()
virtual void agora::rtc::IRtmpLocalUser::unregisterVideoFrameObserver |
( |
media::base::IVideoFrameObserver * |
observer | ) |
|
|
pure virtual |
Releases the registered video frame observer.
- Parameters
-
observer | A pointer to an IVideoFrameObserver object. |
The documentation for this class was generated from the following file: