Agora Java API Reference for Android

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

`#include <NGIAgoraVideoFrame.h>`

Inheritance diagram for agora::rtc::IVideoFrame:

## Public Member Functions
virtual int | getVideoFrameData (VideoFrameData &data) const =0
virtual int | fillVideoFrameData (const VideoFrameData &data)=0
virtual int | getVideoFrameMetaData (VideoFrameMetaDataType type, void *data)=0
virtual int | fillVideoFrameMetaData (VideoFrameMetaDataType type, const void *data)=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 IVideoFrame class defines the interface to send video frame data to the SDK or get video frame data from the SDK.

## Member Function Documentation

## ◆ getVideoFrameData()

virtual int agora::rtc::IVideoFrame::getVideoFrameData | ( | VideoFrameData & | data | ) | const
| pure virtual

Get the concrete video frame data of the underlying buffer.

Parameters

  data | [out] The video frame data.

Returns
  - int: error code. 0 for success.

## ◆ fillVideoFrameData()

virtual int agora::rtc::IVideoFrame::fillVideoFrameData | ( | const VideoFrameData & | data | ) |
| pure virtual

Fill the underlying buffer with source buffer info contained in VideoFrameData For frames of type "Type::kMemPixels", This function first tries to fill in-place with no copy and reallocation. When it fails, a copy or copy-plus-reallocation may happen

Parameters

  data | [in] Data to be filled in.

Returns
  - 0: if succeeds
  - <0: failure

## ◆ getVideoFrameMetaData()

virtual int agora::rtc::IVideoFrame::getVideoFrameMetaData | ( | VideoFrameMetaDataType | type,
|  | void * | data
| ) |  |
| pure virtual

Get the underlying meta data of the given type. e.g. If type is VideoFrameMetaDataType::kAlphaChannel, then data value can be casted to AlphaChannel;

Parameters

  type | VideoFrameMetaDataType type of the meta data wanted
  data | [out] pointer to the the meta data object of the given type

Returns
  - 0: if succeeds
  - <0: failure

## ◆ fillVideoFrameMetaData()

virtual int agora::rtc::IVideoFrame::fillVideoFrameMetaData | ( | VideoFrameMetaDataType | type,
|  | const void * | data
| ) |  |
| pure virtual

Fill the underlying meta data of the given type. e.g. If type is VideoFrameMetaDataType::kAlphaChannel, then data should point to AlphaChannel object;

Parameters

  type | VideoFrameMetaDataType type of the meta data to fill
  data | [in] pointer to the the meta data object of the given type

Returns
  - 0: if succeeds
  - <0: failure