Inherits agora::rtc::IAVDataObserver, agora::media::IAudioFrameObserverBase, and agora::media::IVideoEncodedFrameObserver.
|
enum | AVDATA_TYPE { AVDATA_UNKNOWN = 0,
AVDATA_VIDEO = 1,
AVDATA_AUDIO = 2
} |
|
enum | CODEC_VIDEO { CODEC_VIDEO_AVC = 0,
CODEC_VIDEO_HEVC = 1,
CODEC_VIDEO_VP8 = 2
} |
|
enum | CODEC_AUDIO { CODEC_AUDIO_PCM = 0,
CODEC_AUDIO_AAC = 1,
CODEC_AUDIO_G722 = 2
} |
|
enum | AUDIO_FRAME_TYPE { FRAME_TYPE_PCM16 = 0
} |
|
enum | { MAX_HANDLE_TIME_CNT = 10
} |
|
enum | AUDIO_FRAME_POSITION {
AUDIO_FRAME_POSITION_NONE = 0x0000,
AUDIO_FRAME_POSITION_PLAYBACK = 0x0001,
AUDIO_FRAME_POSITION_RECORD = 0x0002,
AUDIO_FRAME_POSITION_MIXED = 0x0004,
AUDIO_FRAME_POSITION_BEFORE_MIXING = 0x0008,
AUDIO_FRAME_POSITION_EAR_MONITORING = 0x0010
} |
|
◆ startRecording()
◆ stopRecording()
virtual int agora::rtc::IMediaRecorderEX::stopRecording |
( |
| ) |
|
|
pure virtual |
◆ release()
virtual void agora::rtc::IMediaRecorderEX::release |
( |
| ) |
|
|
pure virtual |
◆ setMediaRecorderObserver()
◆ setSysVersion()
virtual void agora::rtc::IMediaRecorderEX::setSysVersion |
( |
int |
sys_version | ) |
|
|
pure virtual |
◆ onRecordAudioFrame()
bool agora::rtc::IMediaRecorderEX::onRecordAudioFrame |
( |
const char * |
channelId, |
|
|
AudioFrame & |
audioFrame |
|
) |
| |
|
inlineoverridevirtual |
Occurs when the recorded audio frame is received.
- Parameters
-
channelId | The channel name |
audioFrame | The reference to the audio frame: AudioFrame. |
- Returns
- true: The recorded audio frame is valid and is encoded and sent.
- false: The recorded audio frame is invalid and is not encoded or sent.
Implements agora::media::IAudioFrameObserverBase.
◆ onPlaybackAudioFrame()
bool agora::rtc::IMediaRecorderEX::onPlaybackAudioFrame |
( |
const char * |
channelId, |
|
|
AudioFrame & |
audioFrame |
|
) |
| |
|
inlineoverridevirtual |
Occurs when the playback audio frame is received.
- Parameters
-
channelId | The channel name |
audioFrame | The reference to the audio frame: AudioFrame. |
- Returns
- true: The playback audio frame is valid and is encoded and sent.
- false: The playback audio frame is invalid and is not encoded or sent.
Implements agora::media::IAudioFrameObserverBase.
◆ onMixedAudioFrame()
bool agora::rtc::IMediaRecorderEX::onMixedAudioFrame |
( |
const char * |
channelId, |
|
|
AudioFrame & |
audioFrame |
|
) |
| |
|
inlineoverridevirtual |
Occurs when the mixed audio data is received.
- Parameters
-
channelId | The channel name |
audioFrame | The reference to the audio frame: AudioFrame. |
- Returns
- true: The mixed audio data is valid and is encoded and sent.
- false: The mixed audio data is invalid and is not encoded or sent.
Implements agora::media::IAudioFrameObserverBase.
◆ onEarMonitoringAudioFrame()
bool agora::rtc::IMediaRecorderEX::onEarMonitoringAudioFrame |
( |
AudioFrame & |
audioFrame | ) |
|
|
inlineoverridevirtual |
Occurs when the ear monitoring audio frame is received.
- Parameters
-
audioFrame | The reference to the audio frame: AudioFrame. |
- Returns
- true: The ear monitoring audio data is valid and is encoded and sent.
- false: The ear monitoring audio data is invalid and is not encoded or sent.
Implements agora::media::IAudioFrameObserverBase.
◆ onPlaybackAudioFrameBeforeMixing()
bool agora::rtc::IMediaRecorderEX::onPlaybackAudioFrameBeforeMixing |
( |
const char * |
channelId, |
|
|
user_id_t |
userId, |
|
|
AudioFrame & |
audioFrame |
|
) |
| |
|
inlineoverridevirtual |
Occurs when the before-mixing playback audio frame is received.
- Parameters
-
channelId | The channel name |
userId | ID of the remote user. |
audioFrame | The reference to the audio frame: AudioFrame. |
- Returns
- true: The before-mixing playback audio frame is valid and is encoded and sent.
- false: The before-mixing playback audio frame is invalid and is not encoded or sent.
Reimplemented from agora::media::IAudioFrameObserverBase.
◆ getObservedAudioFramePosition()
int agora::rtc::IMediaRecorderEX::getObservedAudioFramePosition |
( |
| ) |
|
|
inlineoverridevirtual |
Sets the frame position for the audio observer.
- Returns
- A bit mask that controls the frame position of the audio observer.
- Note
- - Use '|' (the OR operator) to observe multiple frame positions.
After you successfully register the audio observer, the SDK triggers this callback each time it receives a audio frame. You can determine which position to observe by setting the return value. The SDK provides 4 positions for observer. Each position corresponds to a callback function:
AUDIO_FRAME_POSITION_PLAYBACK (1 << 0)
: The position for playback audio frame is received, which corresponds to the onPlaybackFrame callback.
AUDIO_FRAME_POSITION_RECORD (1 << 1)
: The position for record audio frame is received, which corresponds to the onRecordFrame callback.
AUDIO_FRAME_POSITION_MIXED (1 << 2)
: The position for mixed audio frame is received, which corresponds to the onMixedFrame callback.
AUDIO_FRAME_POSITION_BEFORE_MIXING (1 << 3)
: The position for playback audio frame before mixing is received, which corresponds to the onPlaybackFrameBeforeMixing callback. - Returns
- The bit mask that controls the audio observation positions. See AUDIO_FRAME_POSITION.
Implements agora::media::IAudioFrameObserverBase.
◆ getPlaybackAudioParams()
AudioParams agora::rtc::IMediaRecorderEX::getPlaybackAudioParams |
( |
| ) |
|
|
inlineoverridevirtual |
Sets the audio playback format Note**:
- The SDK calculates the sample interval according to the
AudioParams
you set in the return value of this callback and triggers the onPlaybackAudioFrame
callback at the calculated sample interval. Sample interval (seconds) = samplesPerCall
/(sampleRate
× channel
). Ensure that the value of sample interval is equal to or greater than 0.01.
- Returns
- Sets the audio format. See AgoraAudioParams.
Implements agora::media::IAudioFrameObserverBase.
◆ getRecordAudioParams()
AudioParams agora::rtc::IMediaRecorderEX::getRecordAudioParams |
( |
| ) |
|
|
inlineoverridevirtual |
Sets the audio recording format Note**:
- The SDK calculates the sample interval according to the
AudioParams
you set in the return value of this callback and triggers the onRecordAudioFrame
callback at the calculated sample interval. Sample interval (seconds) = samplesPerCall
/(sampleRate
× channel
). Ensure that the value of sample interval is equal to or greater than 0.01.
- Returns
- Sets the audio format. See AgoraAudioParams.
Implements agora::media::IAudioFrameObserverBase.
◆ getMixedAudioParams()
AudioParams agora::rtc::IMediaRecorderEX::getMixedAudioParams |
( |
| ) |
|
|
inlineoverridevirtual |
Sets the audio mixing format Note**:
- The SDK calculates the sample interval according to the
AudioParams
you set in the return value of this callback and triggers the onMixedAudioFrame
callback at the calculated sample interval. Sample interval (seconds) = samplesPerCall
/(sampleRate
× channel
). Ensure that the value of sample interval is equal to or greater than 0.01.
- Returns
- Sets the audio format. See AgoraAudioParams.
Implements agora::media::IAudioFrameObserverBase.
◆ getEarMonitoringAudioParams()
AudioParams agora::rtc::IMediaRecorderEX::getEarMonitoringAudioParams |
( |
| ) |
|
|
inlineoverridevirtual |
Sets the ear monitoring audio format Note**:
- The SDK calculates the sample interval according to the
AudioParams
you set in the return value of this callback and triggers the onEarMonitoringAudioFrame
callback at the calculated sample interval. Sample interval (seconds) = samplesPerCall
/(sampleRate
× channel
). Ensure that the value of sample interval is equal to or greater than 0.01.
- Returns
- Sets the audio format. See AgoraAudioParams.
Implements agora::media::IAudioFrameObserverBase.
◆ onEncodedVideoFrameReceived()
virtual bool agora::rtc::IMediaRecorderEX::onEncodedVideoFrameReceived |
( |
rtc::uid_t |
uid, |
|
|
const uint8_t * |
imageBuffer, |
|
|
size_t |
length, |
|
|
const rtc::EncodedVideoFrameInfo & |
videoEncodedFrameInfo |
|
) |
| |
|
inlineoverridevirtual |
Occurs each time the SDK receives an encoded video image.
- Parameters
-
uid | The user id of remote user. |
imageBuffer | The pointer to the video image buffer. |
length | The data length of the video image. |
videoEncodedFrameInfo | The information of the encoded video frame: EncodedVideoFrameInfo. |
- Returns
- Determines whether to accept encoded video image.
- true: Accept.
- false: Do not accept.
Implements agora::media::IVideoEncodedFrameObserver.