IMetadataObserver

The metadata observer.

You can call RegisterMediaMetadataObserver to register or unregister the IMetadataObserver object.

FGetMaxMetadataSize

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

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FGetMaxMetadataSize);

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.

EENUMCUSTOM_METADATA_TYPE

Metadata type of the observer. We only support video metadata for now.

Enumerator

UNKNOWN_METADATA
The type of metadata is unknown.
VIDEO_METADATA
The type of metadata is video.

FAgoraMetadata

Media metadata.

USTRUCT(BlueprintType)
struct FAgoraMetadata
{
        GENERATED_BODY()
        UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|AgoraMetadata")
        int64 uid;
        UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|AgoraMetadata")
        int64 size;
        UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|AgoraMetadata")
        TArray<int64> buffer;
        UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|AgoraMetadata")
        int64 timeStampMs;
};

Attributes

uid
The user ID.
  • For the recipient: The ID of the remote user who sent the FAgoraMetadata.
  • For the sender: Ignore it.
size
The buffer size of the sent or received FAgoraMetadata.
buffer
The buffer address of the sent or received FAgoraMetadata.
timeStampMs
The timestamp (ms) of FAgoraMetadata.

FOnMetadataReceived

Occurs when the local user receives the metadata.

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnMetadataReceived, const FAgoraMetadata&, metadata);

Parameters

metadata
The metadata received. See FAgoraMetadata.

FOnReadyToSendMetadata

Occurs when the SDK is ready to send metadata.

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnReadyToSendMetadata, const FAgoraMetadata&, metadata, EVIDEO_SOURCE_TYPE, source_type);

This callback is triggered when the SDK is ready to send metadata.

Attention: Ensure that the size of the metadata does not exceed the value set in the FGetMaxMetadataSize callback.

Parameters

source_type
Video data type. See EVIDEO_SOURCE_TYPE.
metadata
The metadata that the user wants to send. See FAgoraMetadata.

Returns

  • true: Send the video frame.
  • false: Do not send the video frame.