Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Public Member Functions | List of all members
agora::media::IMediaEngineEx Class Referenceabstract

`#include <media_engine_i.h>`

Inherits agora::media::IMediaEngine.

## Public Member Functions
virtual int | pushVideoFrameEx (const webrtc::VideoFrame &frame, unsigned int video_track_id=0)=0
virtual int | enableDualStreamModeEx (bool enabled, const rtc::SimulcastStreamConfig &streamConfig, const rtc::RtcConnection &connection)=0
virtual int | setExternalVideoConfigEx (const rtc::VideoEncoderConfiguration &config)=0
virtual int | setExternalVideoConfigEx (const rtc::VideoEncoderConfiguration &config, const rtc::RtcConnection &connection)=0
| ~IMediaEngineEx () override=default
virtual int | registerAudioFrameObserver (IAudioFrameObserver *observer)=0
virtual int | registerVideoFrameObserver (IVideoFrameObserver *observer)=0
virtual int | registerVideoEncodedFrameObserver (IVideoEncodedFrameObserver *observer)=0
virtual int | pushEncodedVideoImage (const unsigned char *imageBuffer, size_t length, const agora::rtc::EncodedVideoFrameInfo &videoEncodedFrameInfo, unsigned int videoTrackId=0)=0
Public Member Functions inherited from agora::media::IMediaEngine
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 | setExternalRemoteEglContext (void *eglContext)=0
virtual int | setExternalAudioSource (bool enabled, int sampleRate, int channels, bool localPlayback=false, bool publish=true) __deprecated=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 | addVideoFrameRenderer (IVideoFrameObserver *renderer)=0
virtual int | removeVideoFrameRenderer (IVideoFrameObserver *renderer)=0
virtual void | release ()=0

## Additional Inherited Members
Protected Member Functions inherited from agora::media::IMediaEngine
virtual | ~IMediaEngine ()

## Detailed Description

The IMediaEngineEx class

## Constructor & Destructor Documentation

## ◆ ~IMediaEngineEx()

agora::media::IMediaEngineEx::~IMediaEngineEx | ( |  | ) |
| override default

## Member Function Documentation

## ◆ pushVideoFrameEx()

virtual int agora::media::IMediaEngineEx::pushVideoFrameEx | ( | const webrtc::VideoFrame & | frame,
|  | unsigned int | video_track_id = 0 )
| pure virtual

## ◆ enableDualStreamModeEx()

virtual int agora::media::IMediaEngineEx::enableDualStreamModeEx | ( | bool | enabled,
|  | const rtc::SimulcastStreamConfig & | streamConfig,
|  | const rtc::RtcConnection & | connection )
| pure virtual

## ◆ setExternalVideoConfigEx() [1/2]

virtual int agora::media::IMediaEngineEx::setExternalVideoConfigEx | ( | const rtc::VideoEncoderConfiguration & | config | ) |
| pure virtual

Deprecated by IRtcEngine::setVideoEncoderConfiguration.

## ◆ setExternalVideoConfigEx() [2/2]

virtual int agora::media::IMediaEngineEx::setExternalVideoConfigEx | ( | const rtc::VideoEncoderConfiguration & | config,
|  | const rtc::RtcConnection & | connection )
| pure virtual

## ◆ registerAudioFrameObserver()

virtual int agora::media::IMediaEngine::registerAudioFrameObserver | ( | IAudioFrameObserver * | observer | ) |
| virtual

Registers an audio frame observer object.

Note
  Ensure that you call this method before joinChannel.

Parameters

  observer | A pointer to the audio frame observer object: IAudioFrameObserver, nullptr means unregistering observer instead.

Returns
  - 0: Success.
  - < 0: Failure.

Implements agora::media::IMediaEngine.

## ◆ registerVideoFrameObserver()

virtual int agora::media::IMediaEngine::registerVideoFrameObserver | ( | IVideoFrameObserver * | observer | ) |
| virtual

Registers a video frame observer object.

Note
  - Ensure that you call this method before joining the channel.
  - If you register an observer for video raw video data, you cannot register an IVideoEncodedFrameObserver object.

Parameters

  observer | A pointer to the video frame observer: IVideoFrameObserver.

Returns
  - 0: Success.
  - < 0: Failure.

Implements agora::media::IMediaEngine.

## ◆ registerVideoEncodedFrameObserver()

virtual int agora::media::IMediaEngine::registerVideoEncodedFrameObserver | ( | IVideoEncodedFrameObserver * | observer | ) |
| virtual

Registers a receiver object for the encoded video image.

Note
  - Ensure that you call this method before joining the channel.

Parameters

  observer | A pointer to the observer of the encoded video image: IVideoEncodedFrameObserver.

Returns
  - 0: Success.
  - < 0: Failure.

Implements agora::media::IMediaEngine.

## ◆ pushEncodedVideoImage()

virtual int agora::media::IMediaEngine::pushEncodedVideoImage | ( | const unsigned char * | imageBuffer,
|  | size_t | length,
|  | const agora::rtc::EncodedVideoFrameInfo & | videoEncodedFrameInfo,
|  | unsigned int | videoTrackId = 0 )
| virtual

Pushes the encoded video image to the app.

Parameters

  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. 0: Success. < 0: Failure.

Implements agora::media::IMediaEngine.