Agora Java API Reference for Android
Classes | Public Types | Public Member Functions | List of all members
agora::rtc::IMetadataObserver Class Referenceabstract

#include <IAgoraRtcEngine.h>

Classes

struct  Metadata
 

Public Types

enum  METADATA_TYPE { UNKNOWN_METADATA = -1, VIDEO_METADATA = 0 }
 
enum  MAX_METADATA_SIZE_TYPE { INVALID_METADATA_SIZE_IN_BYTE = -1, DEFAULT_METADATA_SIZE_IN_BYTE = 512, MAX_METADATA_SIZE_IN_BYTE = 1024 }
 

Public Member Functions

virtual int getMaxMetadataSize ()
 
virtual bool onReadyToSendMetadata (Metadata &metadata, VIDEO_SOURCE_TYPE source_type)=0
 
virtual void onMetadataReceived (const Metadata &metadata)=0
 

Detailed Description

Definition of IMetadataObserver

Member Enumeration Documentation

◆ METADATA_TYPE

The metadata type.

Note
We only support video metadata for now.
Enumerator
UNKNOWN_METADATA 

-1: (Not supported) Unknown.

VIDEO_METADATA 

0: (Supported) Video metadata.

◆ MAX_METADATA_SIZE_TYPE

The maximum metadata size.

Member Function Documentation

◆ getMaxMetadataSize()

virtual int agora::rtc::IMetadataObserver::getMaxMetadataSize ( )
virtual

Gets the maximum size of the metadata.

After calling the registerMediaMetadataObserver method, the SDK triggers this callback to query the maximum size of your metadata. You must specify the maximum size in the return value and then pass it to the SDK.

Returns
The maximum size of your metadata. See MAX_METADATA_SIZE_TYPE.

◆ onReadyToSendMetadata()

virtual bool agora::rtc::IMetadataObserver::onReadyToSendMetadata ( Metadata metadata,
VIDEO_SOURCE_TYPE  source_type 
)
pure virtual

Occurs when the SDK is ready to receive and send metadata.

Note
Ensure that the size of the metadata does not exceed the value set in the getMaxMetadataSize callback.
Parameters
metadataThe Metadata to be sent.
Returns
  • true: Send.
  • false: Do not send.

◆ onMetadataReceived()

virtual void agora::rtc::IMetadataObserver::onMetadataReceived ( const Metadata metadata)
pure virtual

Occurs when received the metadata.

Parameters
metadataThe metadata received. See metadata.
Note
If the receiver is audience, the receiver cannot get the NTP timestamp (ms) that the metadata sends.