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

Defines the properties of a watermark buffer. More...

Public Member Functions

ByteBuffer getBuffer ()
 Gets the watermark image buffer. More...
 
int getWidth ()
 Gets the width of the watermark image. More...
 
int getHeight ()
 Gets the height of the watermark image. More...
 
int getFormat ()
 Gets 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

Defines the properties of a watermark buffer.

Since
4.6.0

This class is used to configure the watermark image data, including its format, size, and pixel buffer.

Member Function Documentation

◆ getBuffer()

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

Gets the watermark image buffer.

Since
4.6.0
Returns
The ByteBuffer containing the watermark image data.

◆ getWidth()

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

Gets the width of the watermark image.

Since
4.6.0
Returns
The width in pixels.

◆ getHeight()

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

Gets the height of the watermark image.

Since
4.6.0
Returns
The height in pixels.

◆ getFormat()

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

Gets the format of the watermark image.

Since
4.6.0
Returns
The format of the watermark 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 image data of the watermark.

Note
The buffer must match the specified format and size. The size should be width * height * bytesPerPixel.

◆ width

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

The width of the watermark buffer in pixels.

Note
Must be a positive integer. The actual image width must match this value.

◆ height

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

The height of the watermark buffer in pixels.

Note
Must be a positive integer. The actual image height must match this value.

◆ format

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

The format of the watermark buffer. The format can be WATERMARK_BUFFER_FORMAT_I420, WATERMARK_BUFFER_FORMAT_BGRA, WATERMARK_BUFFER_FORMAT_NV21, or WATERMARK_BUFFER_FORMAT_RGBA.

Note
Ensure the buffer content matches the specified format.