Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
agora::rtc::IVideoFrame Class Referenceabstract

`#include <NGIAgoraVideoFrame.h>`

Inherits agora::RefCountInterface.

Inherited by agora::rtc::IVideoFrameEx.

## 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

## Protected Member Functions
| ~IVideoFrame ()
Protected Member Functions inherited from agora::RefCountInterface
virtual | ~RefCountInterface ()

## Detailed Description

The IVideoFrame class defines the interface to send video frame data to the SDK or get video frame data from the SDK.

## Constructor & Destructor Documentation

## ◆ ~IVideoFrame()

agora::rtc::IVideoFrame::~IVideoFrame | ( |  | ) |
| inlineprotected

## 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