Agora C++ API Reference for All Platforms
|
Public Member Functions | |
virtual void | release ()=0 |
virtual int | registerAudioFrameObserver (IAudioFrameObserver *observer)=0 |
virtual int | registerVideoFrameObserver (IVideoFrameObserver *observer)=0 |
virtual int | registerVideoRenderFactory (IExternalVideoRenderFactory *factory)=0 |
virtual int | pushAudioFrame (MEDIA_SOURCE_TYPE type, IAudioFrameObserver::AudioFrame *frame, bool wrap)=0 |
virtual int | pushAudioFrame (IAudioFrameObserver::AudioFrame *frame)=0 |
virtual int | pullAudioFrame (IAudioFrameObserver::AudioFrame *frame)=0 |
virtual int | setExternalVideoSource (bool enable, bool useTexture)=0 |
virtual int | pushVideoFrame (ExternalVideoFrame *frame)=0 |
|
pure virtual |
|
pure virtual |
Registers an audio frame observer object.
This method is used to register an audio frame observer object (register a callback). This method is required to register callbacks when the engine is required to provide an onRecordAudioFrame or onPlaybackAudioFrame callback.
observer | Audio frame observer object instance. If NULL is passed in, the registration is canceled. |
|
pure virtual |
Registers a video frame observer object.
You need to implement the IVideoFrameObserver class in this method, and register the following callbacks according to your scenarios:
After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
observer | Video frame observer object instance. If NULL is passed in, the registration is canceled. |
|
pure virtual |
DEPRECATED
|
pure virtual |
DEPRECATED Use pushAudioFrame(IAudioFrameObserver::AudioFrame* frame) instead.
Pushes the external audio frame.
type | Type of audio capture device: MEDIA_SOURCE_TYPE. |
frame | Audio frame pointer: AudioFrame. |
wrap | Whether to use the placeholder. We recommend setting the default value.
|
|
pure virtual |
Pushes the external audio frame.
frame | Pointer to the audio frame: AudioFrame. |
|
pure virtual |
Pulls the remote audio data.
Before calling this method, call the setExternalAudioSink(enabled: true) method to enable and set the external audio sink.
After a successful method call, the app pulls the decoded and mixed audio data for playback.
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 | Pointers to the audio frame. See: AudioFrame. |
|
pure virtual |
Configures the external video source.
enable | Sets whether to use the external video source:
|
useTexture | Sets whether to use texture as an input:
|
|
pure virtual |
Pushes the video frame using the ExternalVideoFrame and passes the video frame to the Agora SDK.
frame | Video frame to be pushed. See ExternalVideoFrame. |