Agora Server Gateway SDK C++ API Reference
Loading...
Searching...
No Matches
agora::rtc::IMetadataObserver Class Referenceabstract

#include <AgoraMediaBase.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 ~IMetadataObserver ()
 
virtual int getMaxMetadataSize ()
 
virtual bool onReadyToSendMetadata (Metadata &metadata, VIDEO_SOURCE_TYPE source_type)=0
 
virtual void onMetadataReceived (const Metadata &metadata)=0
 

Detailed Description

A video metadata observer. Register it with ILocalVideoTrack::registerVideoMetadataObserver.

Member Enumeration Documentation

◆ MAX_METADATA_SIZE_TYPE

Metadata size constants, in bytes.

Enumerator
INVALID_METADATA_SIZE_IN_BYTE 

-1: Invalid size.

DEFAULT_METADATA_SIZE_IN_BYTE 

512: The default size.

MAX_METADATA_SIZE_IN_BYTE 

1024: The maximum size.

◆ METADATA_TYPE

Metadata types. Only video metadata is supported.

Enumerator
UNKNOWN_METADATA 

-1: Unknown metadata.

VIDEO_METADATA 

0: Video metadata.

Constructor & Destructor Documentation

◆ ~IMetadataObserver()

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

Member Function Documentation

◆ getMaxMetadataSize()

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

Occurs when the SDK requests the maximum metadata buffer size.

Returns
The maximum size in bytes. Defaults to 512; must not exceed 1024.

◆ onMetadataReceived()

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

Occurs when video metadata is received from a remote user.

Note
Copy the buffer contents before using the metadata outside this callback.
Parameters
metadataThe received metadata.

◆ onReadyToSendMetadata()

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

Occurs when the SDK is ready to send metadata. Write data into the buffer provided by the SDK and set the size.

Note
The size must not exceed the value returned by getMaxMetadataSize. Returning false skips the metadata only; video transmission continues.
Parameters
[in,out]metadataThe metadata to send.
source_typeThe video source type: VIDEO_SOURCE_TYPE.
Returns
true to send the metadata; false to skip it.

The documentation for this class was generated from the following file: