Agora RTC Objective-C API Reference
Refactor
|
Public Member Functions | |
virtual int | registerAudioFrameObserver (IAudioFrameObserver *observer)=0 |
virtual int | registerVideoFrameObserver (IVideoFrameObserver *observer)=0 |
virtual int | registerVideoEncodedFrameObserver (IVideoEncodedFrameObserver *observer)=0 |
virtual int | registerFaceInfoObserver (IFaceInfoObserver *observer)=0 |
virtual int | pushAudioFrame (IAudioFrameObserverBase::AudioFrame *frame, rtc::track_id_t trackId=0)=0 |
virtual int | pullAudioFrame (IAudioFrameObserverBase::AudioFrame *frame)=0 |
virtual int | setExternalVideoSource (bool enabled, bool useTexture, EXTERNAL_VIDEO_SOURCE_TYPE sourceType=VIDEO_FRAME, rtc::SenderOptions encodedVideoOption=rtc::SenderOptions())=0 |
virtual int | setExternalAudioSource (bool enabled, int sampleRate, int channels, bool localPlayback=false, bool publish=true) 1=0 |
virtual rtc::track_id_t | createCustomAudioTrack (rtc::AUDIO_TRACK_TYPE trackType, const rtc::AudioTrackConfig &config)=0 |
virtual int | destroyCustomAudioTrack (rtc::track_id_t trackId)=0 |
virtual int | setExternalAudioSink (bool enabled, int sampleRate, int channels)=0 |
virtual int | enableCustomAudioLocalPlayback (rtc::track_id_t trackId, bool enabled)=0 |
virtual int | pushVideoFrame (base::ExternalVideoFrame *frame, unsigned int videoTrackId=0)=0 |
virtual int | pushEncodedVideoImage (const unsigned char *imageBuffer, size_t length, const agora::rtc::EncodedVideoFrameInfo &videoEncodedFrameInfo, unsigned int videoTrackId=0)=0 |
virtual int | addVideoFrameRenderer (IVideoFrameObserver *renderer)=0 |
virtual int | removeVideoFrameRenderer (IVideoFrameObserver *renderer)=0 |
The IMediaEngine class.
|
inlineprotectedvirtual |
|
pure virtual |
Registers an audio frame observer object.
observer | A pointer to the audio frame observer object: IAudioFrameObserver, nullptr means unregistering observer instead. |
|
pure virtual |
Registers a video frame observer object.
observer | A pointer to the video frame observer: IVideoFrameObserver. |
|
pure virtual |
Registers a receiver object for the encoded video image.
observer | A pointer to the observer of the encoded video image: IVideoEncodedFrameObserver. |
|
pure virtual |
Registers a face info observer object.
observer | A pointer to the face info observer object: IFaceInfoObserver. |
|
pure virtual |
Pushes the external audio data to the app.
frame | The audio buffer data. |
trackId | The audio track ID. |
|
pure virtual |
Pulls the remote audio data.
After a successful method call, the app pulls the decoded and mixed audio data for playback.
The difference between this method and the onPlaybackAudioFrame is as follows:
onPlaybackAudioFrame
: The SDK sends the audio data to the app once every 10 ms. Any delay in processing the audio frames may result in audio jitter.pullAudioFrame
: The app pulls the remote audio data. After setting the audio data parameters, the SDK adjusts the frame buffer and avoids problems caused by jitter in the external audio playback.frame | The pointer to the audio frame: AudioFrame. |
|
pure virtual |
Sets the external video source.
Once the external video source is enabled, the SDK prepares to accept the external video frame.
enabled | Determines whether to enable the external video source.
|
useTexture | Determines whether to use textured video data.
|
sourceType | Determines the type of external video source frame.
|
encodedVideoOption | Video encoded track option, which is only used for ENCODED_VIDEO_FRAME. |
|
pure virtual |
Sets the external audio source.
enabled | Determines whether to enable the external audio source:
|
sampleRate | The Sample rate (Hz) of the external audio source, which can set be as 8000, 16000, 32000, 44100, or 48000. |
channels | The number of channels of the external audio source, which can be set as 1 or 2:
|
localPlayback | Enable/Disables the local playback of external audio track:
|
publish | Determines whether to publish the external audio track:
|
|
pure virtual |
Create a custom audio track and get the audio track id.
joinChannel
.trackType | The type of custom audio track See AUDIO_TRACK_TYPE. |
config | The config of custom audio track See AudioTrackConfig. |
|
pure virtual |
Destroy custom audio track by trackId
trackId | The custom audio track id. |
|
pure virtual |
Sets the external audio sink.
This method applies to scenarios where you want to use external audio data for playback. After calling the initialize method and pass value of false in the enableAudioDevice
member in the RtcEngineContext struct, you can call the pullAudioFrame method to pull the remote audio data, process it, and play it with the audio effects that you want.
enableAudioDevice
member in the RtcEngineContext struct, the app will not retrieve any audio data from the onPlaybackAudioFrame callback.enabled | Sets whether or not to the external audio sink
|
sampleRate | Sets the sample rate (Hz) of the external audio sink, which can be set as 16000, 32000, 44100 or 48000. |
channels | Sets the number of audio channels of the external audio sink:
|
|
pure virtual |
Sets the external audio track.
trackId | The custom audio track id. |
enabled | Enable/Disables the local playback of external audio track:
|
|
pure virtual |
Pushes the external video frame to the app.
frame | The external video frame: ExternalVideoFrame. |
videoTrackId | The id of the video track.
|
|
pure virtual |
Pushes the encoded video image to the app.
imageBuffer | A pointer to the video image. |
length | The data length. |
videoEncodedFrameInfo | The reference to the information of the encoded video frame: EncodedVideoFrameInfo. |
videoTrackId | The id of the video track.
|
|
pure virtual |
@hide For internal usage only
|
pure virtual |
@hide For internal usage only
|
pure virtual |