Classes

struct  Metadata
 

Public Types

enum  METADATA_TYPE { UNKNOWN_METADATA = -1, VIDEO_METADATA = 0 }
 

Public Member Functions

virtual ~IMetadataObserver ()
 
virtual int getMaxMetadataSize ()=0
 
virtual bool onReadyToSendMetadata (Metadata &metadata)=0
 
virtual void onMetadataReceived (const Metadata &metadata)=0
 

Detailed Description

Definition of IMetadataObserver

Member Enumeration Documentation

◆ METADATA_TYPE

Metadata type of the observer.

Note
We only support video metadata for now.
Enumerator
UNKNOWN_METADATA 

-1: the metadata type is unknown.

VIDEO_METADATA 

0: the metadata type is video.

Constructor & Destructor Documentation

◆ ~IMetadataObserver()

virtual agora::rtc::IMetadataObserver::~IMetadataObserver ( )
inlinevirtual

Member Function Documentation

◆ getMaxMetadataSize()

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

Occurs when the SDK requests the maximum size of the Metadata.

The metadata includes the following parameters:

  • uid: ID of the user who sends the metadata.
  • size: The size of the sent or received metadata.
  • buffer: The sent or received metadata.
  • timeStampMs: The timestamp of the metadata.

The SDK triggers this callback after you successfully call the registerMediaMetadataObserver method. You need to specify the maximum size of the metadata in the return value of this callback.

Returns
The maximum size of the buffer of the metadata that you want to use. The highest value is 1024 bytes. Ensure that you set the return value.

◆ onReadyToSendMetadata()

virtual bool agora::rtc::IMetadataObserver::onReadyToSendMetadata ( Metadata metadata)
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 the local user receives the metadata.

Parameters
metadataThe received Metadata.