#include <IAgoraRtcEngine.h>
◆ 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.
◆ getMaxMetadataSize()
| virtual int agora::rtc::IMetadataObserver::getMaxMetadataSize |
( |
| ) |
|
|
virtual |
Occurs when the SDK requests the maximum size of the metadata.
After successfully complete the registration by calling registerMediaMetadataObserver, the SDK triggers this callback once every video frame is sent. 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, |
|
|
VIDEO_SOURCE_TYPE |
source_type |
|
) |
| |
|
pure virtual |
Occurs when the local user receives the metadata.
- Note
- Ensure that the size of the metadata does not exceed the value set in the
getMaxMetadataSize callback.
- Parameters
-
| metadata | The metadata that the user wants to send. For details, see Metadata. |
| source_type | The video data type: #VIDEO_SOURCE_TYPE. |
- 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
-
| metadata | The metadata received. See Metadata. |
- Note
- If the receiver is audience, the receiver cannot get the NTP timestamp (ms) that the metadata sends.