Agora Java API Reference for Android

Public Member Functions | List of all members
agora::rtc::IMediaNodeFactory Class Referenceabstract

`#include <NGIAgoraMediaNodeFactory.h>`

Inheritance diagram for agora::rtc::IMediaNodeFactory:

## Public Member Functions
virtual agora_refptr< IAudioPcmDataSender > | createAudioPcmDataSender ()=0
virtual agora_refptr< IAudioEncodedFrameSender > | createAudioEncodedFrameSender ()=0
virtual agora_refptr< ICameraCapturer > | createCameraCapturer ()=0
virtual agora_refptr< IScreenCapturer > | createScreenCapturer ()=0
virtual agora_refptr< IVideoMixerSource > | createVideoMixer ()=0
virtual agora_refptr< IVideoFrameTransceiver > | createVideoFrameTransceiver ()=0
virtual agora_refptr< IVideoFrameSender > | createVideoFrameSender ()=0
virtual agora_refptr< IVideoEncodedImageSender > | createVideoEncodedImageSender ()=0
virtual agora_refptr< IVideoRenderer > | createVideoRenderer ()=0
virtual agora_refptr< IAudioFilter > | createAudioFilter (const char *provider_name, const char *extension_name)=0
virtual agora_refptr< IVideoFilter > | createVideoFilter (const char *provider_name, const char *extension_name)=0
virtual agora_refptr< IVideoSinkBase > | createVideoSink (const char *provider_name, const char *extension_name)=0
virtual agora_refptr< IMediaPlayerSource > | createMediaPlayerSource (media::base::MEDIA_PLAYER_SOURCE_TYPE type=agora::media::base::MEDIA_PLAYER_SOURCE_DEFAULT)=0
virtual agora_refptr< IMediaStreamingSource > | createMediaStreamingSource ()=0
| Creates a media streaming source object and returns the pointer. More...
virtual agora_refptr< IMediaPacketSender > | createMediaPacketSender ()=0
virtual agora_refptr< IMediaRecorder2 > | createMediaRecorder ()=0
virtual agora_refptr< IScreenCapturer > | createScreenCapturer (const char *provider_name, const char *extension_name)=0
Public Member Functions inherited from agora::RefCountInterface
virtual void | AddRef () const =0
virtual RefCountReleaseStatus | Release () const =0
virtual bool | HasOneRef () const =0

## Detailed Description

The `IMediaNodeFactory` class.

## Member Function Documentation

## ◆ createAudioPcmDataSender()

virtual agora_refptr<IAudioPcmDataSender> agora::rtc::IMediaNodeFactory::createAudioPcmDataSender | ( |  | ) |
| pure virtual

Creates a PCM audio data sender.

This method creates an `IAudioPcmDataSender` object, which can be used by agora::base::IAgoraService::createCustomAudioTrack(agora_refptr< rtc::IAudioPcmDataSender > audioSource) "createCustomAudioTrack" to send PCM audio data.

Returns
  - The pointer to IAudioPcmDataSender: Success.
  - A null pointer: Failure.

## ◆ createAudioEncodedFrameSender()

virtual agora_refptr<IAudioEncodedFrameSender> agora::rtc::IMediaNodeFactory::createAudioEncodedFrameSender | ( |  | ) |
| pure virtual

Creates an encoded audio data sender.

This method creates an IAudioEncodedFrameSender object, which can be used by agora::base::IAgoraService::createCustomAudioTrack(agora_refptr< rtc::IAudioEncodedFrameSender

> audioSource, TMixMode mixMode) "createCustomAudioTrack" to send encoded audio data.

Returns
  - The pointer to IAudioEncodedFrameSender: Success.
  - A null pointer: Failure.

## ◆ createCameraCapturer()

virtual agora_refptr<ICameraCapturer> agora::rtc::IMediaNodeFactory::createCameraCapturer | ( |  | ) |
| pure virtual

Creates a camera capturer.

Once a camera capturer object is created, you can use the video data captured by the camera as the custom video source.

Returns
  - The pointer to ICameraCapturer: Success.
  - A null pointer: Failure.

## ◆ createScreenCapturer() [1/2]

virtual agora_refptr<IScreenCapturer> agora::rtc::IMediaNodeFactory::createScreenCapturer | ( |  | ) |
| pure virtual

Creates a screen capturer.

Once a screen capturer object is created, you can use the screen video data as the custom video source.

Returns
  - The pointer to IScreenCapturer: Success.
  - A null pointer: Failure.

## ◆ createVideoMixer()

virtual agora_refptr<IVideoMixerSource> agora::rtc::IMediaNodeFactory::createVideoMixer | ( |  | ) |
| pure virtual

Creates a video mixer.

Once a video mixer object is created, you can use the video mixer data as the custom video source.

Returns
  - The pointer to IVideoMixerSource: Success.
  - A null pointer: Failure.

## ◆ createVideoFrameTransceiver()

virtual agora_refptr<IVideoFrameTransceiver> agora::rtc::IMediaNodeFactory::createVideoFrameTransceiver | ( |  | ) |
| pure virtual

Creates a video transceiver.

Once a video transceiver object is created, you can use the video transceiver data as the custom video source.

Returns
  - The pointer to IVideoFrameTransceiver: Success.
  - A null pointer: Failure.

## ◆ createVideoFrameSender()

virtual agora_refptr<IVideoFrameSender> agora::rtc::IMediaNodeFactory::createVideoFrameSender | ( |  | ) |
| pure virtual

Creates a video frame sender.

This method creates an `IVideoFrameSender` object, which can be used by agora::base::IAgoraService::createCustomVideoTrack(agora_refptr<rtc::IVideoFrameSender> videoSource) "createCustomVideoTrack" to send the custom video data.

Returns
  - The pointer to IVideoFrameSender: Success.
  - A null pointer: Failure.

## ◆ createVideoEncodedImageSender()

virtual agora_refptr<IVideoEncodedImageSender> agora::rtc::IMediaNodeFactory::createVideoEncodedImageSender | ( |  | ) |
| pure virtual

Creates an encoded video image sender.

This method creates an `IVideoEncodedImageSender` object, which can be used by agora::base::IAgoraService::createCustomVideoTrack(agora_refptr<rtc::IVideoEncodedImageSender> videoSource, SenderOptions& options) "createCustomVideoTrack" to send the encoded video data.

Returns
  - The pointer to `IVideoEncodedImageSender`: Success.
  - A null pointer: Failure.

## ◆ createVideoRenderer()

virtual agora_refptr<IVideoRenderer> agora::rtc::IMediaNodeFactory::createVideoRenderer | ( |  | ) |
| pure virtual

Creates a built-in video renderer.

Parameters

  view | The video window view.

Returns
  - The pointer to `IVideoRenderer`: Success.
  - A null pointer: Failure.

## ◆ createAudioFilter()

virtual agora_refptr<IAudioFilter> agora::rtc::IMediaNodeFactory::createAudioFilter | ( | const char * | provider_name,
|  | const char * | extension_name
| ) |  |
| pure virtual

Creates an audio filter for the extension.

This method creates an `IAudioFilter` object, which can be used to filter the audio data from the inside extension.

Parameters

  provider_name | provider name string.
  extension_name | extension name string.

Returns
  - The pointer to IAudioFilter: Success.
  - A null pointer: Failure.

## ◆ createVideoFilter()

virtual agora_refptr<IVideoFilter> agora::rtc::IMediaNodeFactory::createVideoFilter | ( | const char * | provider_name,
|  | const char * | extension_name
| ) |  |
| pure virtual

Creates a video filter for the extension.

This method creates an `IVideoFilter` object, which can be used to filter the video from inside extension.

Parameters

  provider_name | provider name string.
  extension_name | extension name string.

Returns
  - The pointer to IVideoFilter: Success.
  - A null pointer: Failure.

## ◆ createVideoSink()

virtual agora_refptr<IVideoSinkBase> agora::rtc::IMediaNodeFactory::createVideoSink | ( | const char * | provider_name,
|  | const char * | extension_name
| ) |  |
| pure virtual

Creates a video sink for the extension.

This method creates an IVideoSinkBase object, which can be used to receive the video from the inside extension.

Parameters

  provider_name | provider name string.
  extension_name | extension name string.

Returns
  - The pointer to IVideoSinkBase: Success.
  - A null pointer: Failure.

## ◆ createMediaPlayerSource()

virtual agora_refptr<IMediaPlayerSource> agora::rtc::IMediaNodeFactory::createMediaPlayerSource | ( | media::base::MEDIA_PLAYER_SOURCE_TYPE | type = `agora::media::base::MEDIA_PLAYER_SOURCE_DEFAULT` | ) |
| pure virtual

Creates a media player source object and returns the pointer.

Parameters

  type | The type of media player source you want to create.

Returns
  - The pointer to IMediaPlayerSource, if the method call succeeds.
  - A null pointer: Failure.

## ◆ createMediaStreamingSource()

virtual agora_refptr<IMediaStreamingSource> agora::rtc::IMediaNodeFactory::createMediaStreamingSource | ( |  | ) |
| pure virtual

Creates a media streaming source object and returns the pointer.

Parameters

  type | The type of media streaming source you want to create.

Returns
  - The pointer to IMediaStreamingSource, if the method call succeeds.
  - A null pointer: Failure.

## ◆ createMediaPacketSender()

virtual agora_refptr<IMediaPacketSender> agora::rtc::IMediaNodeFactory::createMediaPacketSender | ( |  | ) |
| pure virtual

Creates a media packet sender object and returns the pointer.

Returns
  - The pointer to IMediaPacketSender, if the method call succeeds.
  - A null pointer: Failure.

## ◆ createScreenCapturer() [2/2]

virtual agora_refptr<IScreenCapturer> agora::rtc::IMediaNodeFactory::createScreenCapturer | ( | const char * | provider_name,
|  | const char * | extension_name
| ) |  |
| pure virtual

Creates screen capture source extension with given provider&extension names

Parameters

  provider_name | provider name string.
  extension_name | extension name string.

Returns
  - The pointer to IScreenCapturer: Success.
  - A null pointer: Failure.