ProducerReferenceTime


@UnstableApi
public final class ProducerReferenceTime


Represents a parsed ProducerReferenceTime element as defined in ISO/IEC 23009-1:2022 Section 5.12.

Summary

Nested types

The type of the producer reference time source clock.

Constants

static final long

Value of id indicating no value is set.

static final int

Indicates wall-clock time was established at the application level.

static final int

Indicates wall-clock time was established when the media was captured.

static final int

Indicates wall-clock time was established at the encoder.

Public fields

final @Nullable String

The application scheme URI if type is TYPE_APPLICATION, or null otherwise.

final long

An identifier for the producer reference time, or ID_UNSET if not specified.

final boolean

Whether the producer reference time is also present inband in the media segments.

final long

The media presentation time corresponding to wallClockTimeMs, in the track's timescale, or TIME_UNSET if not specified.

final int

The ProducerReferenceTimeType indicating the type of timing source.

final @Nullable UtcTimingElement

An optional UtcTimingElement specifying the UTC timing synchronization source.

final long

The wall-clock time as a Unix epoch timestamp in milliseconds, or TIME_UNSET if not specified.

Public constructors

ProducerReferenceTime(
    long id,
    boolean inband,
    @ProducerReferenceTime.ProducerReferenceTimeType int type,
    @Nullable String applicationScheme,
    long wallClockTimeMs,
    long presentationTime,
    @Nullable UtcTimingElement utcTiming
)

Constructs a new instance.

Public methods

boolean
int

Constants

ID_UNSET

public static final long ID_UNSET = -1

Value of id indicating no value is set.

TYPE_APPLICATION

public static final int TYPE_APPLICATION = 2

Indicates wall-clock time was established at the application level.

TYPE_CAPTURED

public static final int TYPE_CAPTURED = 1

Indicates wall-clock time was established when the media was captured.

TYPE_ENCODER

public static final int TYPE_ENCODER = 0

Indicates wall-clock time was established at the encoder.

Public fields

applicationScheme

public final @Nullable String applicationScheme

The application scheme URI if type is TYPE_APPLICATION, or null otherwise.

id

public final long id

An identifier for the producer reference time, or ID_UNSET if not specified.

inband

public final boolean inband

Whether the producer reference time is also present inband in the media segments.

presentationTime

public final long presentationTime

The media presentation time corresponding to wallClockTimeMs, in the track's timescale, or TIME_UNSET if not specified.

type

@ProducerReferenceTime.ProducerReferenceTimeType
public final int type

The ProducerReferenceTimeType indicating the type of timing source.

utcTiming

public final @Nullable UtcTimingElement utcTiming

An optional UtcTimingElement specifying the UTC timing synchronization source.

wallClockTimeMs

public final long wallClockTimeMs

The wall-clock time as a Unix epoch timestamp in milliseconds, or TIME_UNSET if not specified.

Public constructors

ProducerReferenceTime

public ProducerReferenceTime(
    long id,
    boolean inband,
    @ProducerReferenceTime.ProducerReferenceTimeType int type,
    @Nullable String applicationScheme,
    long wallClockTimeMs,
    long presentationTime,
    @Nullable UtcTimingElement utcTiming
)

Constructs a new instance.

Parameters
long id

An identifier for the producer reference time, or ID_UNSET if not specified.

boolean inband

Whether the producer reference time is also present inband.

@ProducerReferenceTime.ProducerReferenceTimeType int type

The ProducerReferenceTimeType.

@Nullable String applicationScheme

The application scheme URI, or null.

long wallClockTimeMs

The wall-clock time in milliseconds since epoch, or TIME_UNSET if not specified.

long presentationTime

The presentation time in track timescale, or TIME_UNSET if not specified.

@Nullable UtcTimingElement utcTiming

An optional UtcTimingElement, or null.

Public methods

equals

public boolean equals(@Nullable Object obj)

hashCode

public int hashCode()