@UnstableApi
public final class EventMessage implements Metadata.Entry


An Event Message (emsg) as defined in ISO 23009-1.

Summary

Constants

static final Parcelable.Creator<EventMessage>
static final String
@VisibleForTesting
ID3_SCHEME_ID_AOM = "https://aomedia.org/emsg/ID3"

emsg scheme_id_uri from the CMAF spec.

static final String
@VisibleForTesting
SCTE35_SCHEME_ID = "urn:scte:scte35:2014:bin"

scheme_id_uri from section 7.3.2 of SCTE 214-3 2015.

Public fields

final long

The duration of the event in milliseconds.

final long

The instance identifier.

final byte[]

The body of the message.

final String

The message scheme.

final String

The value for the event.

Public constructors

EventMessage(
    String schemeIdUri,
    String value,
    long durationMs,
    long id,
    byte[] messageData
)

Public methods

int
boolean
@Nullable byte[]

Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.

@Nullable Format

Returns the Format that can be used to decode the wrapped metadata in getWrappedMetadataBytes, or null if this Entry doesn't contain wrapped metadata.

int
String
void
writeToParcel(Parcel dest, int flags)

Inherited Constants

From android.os.Parcelable
static final int
static final int

Inherited methods

From androidx.media3.common.Metadata.Entry
void

Updates the MediaMetadata.Builder with the type-specific values stored in this Entry.

Constants

CREATOR

public static final Parcelable.Creator<EventMessageCREATOR

ID3_SCHEME_ID_AOM

@VisibleForTesting
public static final String ID3_SCHEME_ID_AOM = "https://aomedia.org/emsg/ID3"

emsg scheme_id_uri from the CMAF spec.

SCTE35_SCHEME_ID

@VisibleForTesting
public static final String SCTE35_SCHEME_ID = "urn:scte:scte35:2014:bin"

scheme_id_uri from section 7.3.2 of SCTE 214-3 2015.

Public fields

durationMs

public final long durationMs

The duration of the event in milliseconds.

id

public final long id

The instance identifier.

messageData

public final byte[] messageData

The body of the message.

schemeIdUri

public final String schemeIdUri

The message scheme.

value

public final String value

The value for the event.

Public constructors

EventMessage

public EventMessage(
    String schemeIdUri,
    String value,
    long durationMs,
    long id,
    byte[] messageData
)
Parameters
String schemeIdUri

The message scheme.

String value

The value for the event.

long durationMs

The duration of the event in milliseconds.

long id

The instance identifier.

byte[] messageData

The body of the message.

Public methods

describeContents

public int describeContents()

equals

public boolean equals(@Nullable Object obj)

getWrappedMetadataBytes

public @Nullable byte[] getWrappedMetadataBytes()

Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.

getWrappedMetadataFormat

public @Nullable Format getWrappedMetadataFormat()

Returns the Format that can be used to decode the wrapped metadata in getWrappedMetadataBytes, or null if this Entry doesn't contain wrapped metadata.

hashCode

public int hashCode()

toString

public String toString()

writeToParcel

public void writeToParcel(Parcel dest, int flags)