io.agora.rtc

## Class AgoraMediaNodeFactory

- java.lang.Object
- - io.agora.rtc.AgoraMediaNodeFactory

-     class AgoraMediaNodeFactory
      extends java.lang.Object

  Factory for creating various media node instances.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private long` | `cptr` Native pointer to the media node factory instance.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraMediaNodeFactory(long cptr)` Constructor for AgoraMediaNodeFactory.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) AgoraAudioEncodedFrameSender` | `createAudioEncodedFrameSender()` Creates an instance of AgoraAudioEncodedFrameSender.
    `(package private) AgoraAudioPcmDataSender` | `createAudioPcmDataSender()` Creates an instance of AgoraAudioPcmDataSender.
    `AgoraCameraCapturer` | `createCameraCapturer()` Creates an instance of AgoraCameraCapturer.
    `(package private) AgoraMediaPacketSender` | `createMediaPacketSender()` Creates an instance of AgoraMediaPacketSender.
    `(package private) AgoraMediaPlayerSource` | `createMediaPlayerSource(int type)` Creates an instance of AgoraMediaPlayerSource.
    `(package private) AgoraScreenCapturer` | `createScreenCapturer()` Creates an instance of AgoraScreenCapturer.
    `(package private) AgoraVideoEncodedImageSender` | `createVideoEncodedImageSender()` Creates an instance of AgoraVideoEncodedImageSender.
    `(package private) AgoraVideoFrameSender` | `createVideoFrameSender()` Creates an instance of AgoraVideoFrameSender.
    `(package private) AgoraVideoMixer` | `createVideoMixer()` Creates an instance of AgoraVideoMixer.
    `(package private) AgoraVideoRenderer` | `createVideoRenderer()` Creates an instance of AgoraVideoRenderer.
    `(package private) void` | `destroy()` Destroys the media node factory.
    `private AgoraAudioEncodedFrameSender` | `nativeCreateAudioEncodedFrameSender(long cptr)` Creates an audio encoded frame sender natively.
    `private AgoraAudioPcmDataSender` | `nativeCreateAudioPcmDataSender(long cptr)` Creates an audio PCM data sender natively.
    `private AgoraCameraCapturer` | `nativeCreateCameraCapturer(long cptr)` Creates a camera capturer natively.
    `private AgoraMediaPacketSender` | `nativeCreateMediaPacketSender(long cptr)` Creates a media packet sender natively.
    `private AgoraMediaPlayerSource` | `nativeCreateMediaPlayerSource(long cptr, int type)` Creates a media player source natively.
    `private AgoraScreenCapturer` | `nativeCreateScreenCapturer(long cptr)` Creates a screen capturer natively.
    `private AgoraVideoEncodedImageSender` | `nativeCreateVideoEncodedImageSender(long cptr)` Creates a video encoded image sender natively.
    `private AgoraVideoFrameSender` | `nativeCreateVideoFrameSender(long cptr)` Creates a video frame sender natively.
    `private AgoraVideoMixer` | `nativeCreateVideoMixer(long cptr)` Creates a video mixer natively.
    `private AgoraVideoRenderer` | `nativeCreateVideoRenderer(long cptr)` Creates a video renderer natively.
    `private void` | `nativeDestroy(long cptr)` Releases the native media node factory handle.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cptr

          private long cptr

      Native pointer to the media node factory instance.

  - ### Constructor Detail

    - #### AgoraMediaNodeFactory

          AgoraMediaNodeFactory(long cptr)

      Constructor for AgoraMediaNodeFactory.
      Parameters:
        `cptr` - Pointer to the native media node factory object.

  - ### Method Detail

    - #### destroy

          void destroy()

      Destroys the media node factory. Ensures that the native resources are released.

    - #### createAudioPcmDataSender

          AgoraAudioPcmDataSender createAudioPcmDataSender()

      Creates an instance of AgoraAudioPcmDataSender.
      Returns:
        An instance of AgoraAudioPcmDataSender.

    - #### createAudioEncodedFrameSender

          AgoraAudioEncodedFrameSender createAudioEncodedFrameSender()

      Creates an instance of AgoraAudioEncodedFrameSender.
      Returns:
        An instance of AgoraAudioEncodedFrameSender.

    - #### createCameraCapturer

          public AgoraCameraCapturer createCameraCapturer()

      Creates an instance of AgoraCameraCapturer.
      Returns:
        An instance of AgoraCameraCapturer.

    - #### createScreenCapturer

          AgoraScreenCapturer createScreenCapturer()

      Creates an instance of AgoraScreenCapturer.
      Returns:
        An instance of AgoraScreenCapturer.

    - #### createVideoMixer

          AgoraVideoMixer createVideoMixer()

      Creates an instance of AgoraVideoMixer.
      Returns:
        An instance of AgoraVideoMixer.

    - #### createVideoFrameSender

          AgoraVideoFrameSender createVideoFrameSender()

      Creates an instance of AgoraVideoFrameSender.
      Returns:
        An instance of AgoraVideoFrameSender.

    - #### createVideoEncodedImageSender

          AgoraVideoEncodedImageSender createVideoEncodedImageSender()

      Creates an instance of AgoraVideoEncodedImageSender.
      Returns:
        An instance of AgoraVideoEncodedImageSender.

    - #### createVideoRenderer

          AgoraVideoRenderer createVideoRenderer()

      Creates an instance of AgoraVideoRenderer.
      Returns:
        An instance of AgoraVideoRenderer.

    - #### createMediaPlayerSource

          AgoraMediaPlayerSource createMediaPlayerSource(int type)

      Creates an instance of AgoraMediaPlayerSource.
      Parameters:
        `type` - The type of media player source to create.
      Returns:
        An instance of AgoraMediaPlayerSource.

    - #### createMediaPacketSender

          AgoraMediaPacketSender createMediaPacketSender()

      Creates an instance of AgoraMediaPacketSender.
      Returns:
        An instance of AgoraMediaPacketSender.

    - #### nativeDestroy

          private void nativeDestroy(long cptr)

      Releases the native media node factory handle.
      Parameters:
        `cptr` - Native pointer to the factory instance

    - #### nativeCreateAudioPcmDataSender

          private AgoraAudioPcmDataSender nativeCreateAudioPcmDataSender(long cptr)

      Creates an audio PCM data sender natively.
      Parameters:
        `cptr` - Native pointer to the factory instance
      Returns:
        Audio PCM data sender instance

    - #### nativeCreateAudioEncodedFrameSender

          private AgoraAudioEncodedFrameSender nativeCreateAudioEncodedFrameSender(long cptr)

      Creates an audio encoded frame sender natively.
      Parameters:
        `cptr` - Native pointer to the factory instance
      Returns:
        Audio encoded frame sender instance

    - #### nativeCreateCameraCapturer

          private AgoraCameraCapturer nativeCreateCameraCapturer(long cptr)

      Creates a camera capturer natively.
      Parameters:
        `cptr` - Native pointer to the factory instance
      Returns:
        Camera capturer instance

    - #### nativeCreateScreenCapturer

          private AgoraScreenCapturer nativeCreateScreenCapturer(long cptr)

      Creates a screen capturer natively.
      Parameters:
        `cptr` - Native pointer to the factory instance
      Returns:
        Screen capturer instance

    - #### nativeCreateVideoMixer

          private AgoraVideoMixer nativeCreateVideoMixer(long cptr)

      Creates a video mixer natively.
      Parameters:
        `cptr` - Native pointer to the factory instance
      Returns:
        Video mixer instance

    - #### nativeCreateVideoFrameSender

          private AgoraVideoFrameSender nativeCreateVideoFrameSender(long cptr)

      Creates a video frame sender natively.
      Parameters:
        `cptr` - Native pointer to the factory instance
      Returns:
        Video frame sender instance

    - #### nativeCreateVideoEncodedImageSender

          private AgoraVideoEncodedImageSender nativeCreateVideoEncodedImageSender(long cptr)

      Creates a video encoded image sender natively.
      Parameters:
        `cptr` - Native pointer to the factory instance
      Returns:
        Video encoded image sender instance

    - #### nativeCreateVideoRenderer

          private AgoraVideoRenderer nativeCreateVideoRenderer(long cptr)

      Creates a video renderer natively.
      Parameters:
        `cptr` - Native pointer to the factory instance
      Returns:
        Video renderer instance

    - #### nativeCreateMediaPlayerSource

          private AgoraMediaPlayerSource nativeCreateMediaPlayerSource(long cptr,
                                                                       int type)

      Creates a media player source natively.
      Parameters:
        `cptr` - Native pointer to the factory instance
        `type` - Type of media player source
      Returns:
        Media player source instance

    - #### nativeCreateMediaPacketSender

          private AgoraMediaPacketSender nativeCreateMediaPacketSender(long cptr)

      Creates a media packet sender natively.
      Parameters:
        `cptr` - Native pointer to the factory instance
      Returns:
        Media packet sender instance