Agora Java API Reference for Android
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
io.agora.rtc2.video.WatermarkBuffer Class Reference

Configures the format, size, and pixel buffer of the watermark image. More...

Public Member Functions

ByteBuffer getBuffer ()
 Retrieves the buffer of the watermark image. More...
 
int getWidth ()
 Gets the width of the watermark image. More...
 
int getHeight ()
 Gets the height of the watermark image. More...
 
int getFormat ()
 Retrieves the format of the watermark image. More...
 

Public Attributes

ByteBuffer buffer
 
int width
 
int height
 
int format
 

Static Public Attributes

static final int WATERMARK_BUFFER_FORMAT_I420 = 1
 
static final int WATERMARK_BUFFER_FORMAT_BGRA = 2
 
static final int WATERMARK_BUFFER_FORMAT_NV21 = 3
 
static final int WATERMARK_BUFFER_FORMAT_RGBA = 4
 

Detailed Description

Configures the format, size, and pixel buffer of the watermark image.

Since
4.6.0

Defines the buffer data structure of the watermark image, including image width, height, format, length, and image data buffer.

Member Function Documentation

◆ getBuffer()

ByteBuffer io.agora.rtc2.video.WatermarkBuffer.getBuffer ( )

Retrieves the buffer of the watermark image.

Since
4.6.0

This method is used to retrieve the buffer of the watermark image or the watermark image data buffer.

Returns
Returns a ByteBuffer object containing the watermark image data if the method call succeeds.

◆ getWidth()

int io.agora.rtc2.video.WatermarkBuffer.getWidth ( )

Gets the width of the watermark image.

Since
4.6.0

Used to get the width of the watermark image.

Returns
When the method call succeeds, it returns the width of the watermark image in pixels.

◆ getHeight()

int io.agora.rtc2.video.WatermarkBuffer.getHeight ( )

Gets the height of the watermark image.

Since
4.6.0

Used to get the height of the watermark image.

Returns
If the method call succeeds, it returns the height of the watermark image in pixels.

◆ getFormat()

int io.agora.rtc2.video.WatermarkBuffer.getFormat ( )

Retrieves the format of the watermark image.

Since
4.6.0

Used to retrieve the format of the watermark image.

Returns
If the method call succeeds, it returns the format of the watermark image buffer.

Member Data Documentation

◆ WATERMARK_BUFFER_FORMAT_I420

final int io.agora.rtc2.video.WatermarkBuffer.WATERMARK_BUFFER_FORMAT_I420 = 1
static

Specifies the watermark buffer format as I420.

◆ WATERMARK_BUFFER_FORMAT_BGRA

final int io.agora.rtc2.video.WatermarkBuffer.WATERMARK_BUFFER_FORMAT_BGRA = 2
static

Specifies the watermark buffer format as BGRA.

◆ WATERMARK_BUFFER_FORMAT_NV21

final int io.agora.rtc2.video.WatermarkBuffer.WATERMARK_BUFFER_FORMAT_NV21 = 3
static

Specifies the watermark buffer format as NV21.

◆ WATERMARK_BUFFER_FORMAT_RGBA

final int io.agora.rtc2.video.WatermarkBuffer.WATERMARK_BUFFER_FORMAT_RGBA = 4
static

Specifies the watermark buffer format as RGBA.

◆ buffer

ByteBuffer io.agora.rtc2.video.WatermarkBuffer.buffer

Stores the watermark image data.

◆ width

int io.agora.rtc2.video.WatermarkBuffer.width

Width of the watermark buffer, in pixels.

◆ height

int io.agora.rtc2.video.WatermarkBuffer.height

Height of the watermark buffer, in pixels.

◆ format

int io.agora.rtc2.video.WatermarkBuffer.format

Format of the watermark image:

  • WATERMARK_BUFFER_FORMAT_I420: I420 format.
  • WATERMARK_BUFFER_FORMAT_BGRA: BGRA format.
  • WATERMARK_BUFFER_FORMAT_NV21: NV21 format.
  • WATERMARK_BUFFER_FORMAT_RGBA: RGBA format.