Metadata
@UnstableApi
class Metadata
A collection of metadata entries.
Summary
Nested types |
|---|
interface Metadata.EntryA metadata entry. |
Public constructors |
|---|
Metadata(entries: Array<Metadata.Entry!>!) |
Metadata(entries: (Mutable)List<Metadata.Entry!>!) |
Metadata(presentationTimeUs: Long, entries: Array<Metadata.Entry!>!) |
Metadata( |
Public functions |
|
|---|---|
Metadata! |
copyWithAppendedEntries(entriesToAppend: Array<Metadata.Entry!>!)Returns a copy of this metadata with the specified entries appended. |
Metadata! |
copyWithAppendedEntriesFrom(other: Metadata?)Returns a copy of this metadata with the entries of the specified metadata appended. |
Metadata! |
copyWithPresentationTimeUs(presentationTimeUs: Long)Returns a copy of this metadata with the specified presentation time. |
Boolean |
|
Metadata.Entry! |
Returns the entry at the specified index. |
ImmutableList<T!>! |
<T : Metadata.Entry?> getEntriesOfType(clazz: Class<T!>!)Returns the entries of type (or subtype of) |
T? |
<T : Metadata.Entry?> getFirstEntryOfType(clazz: Class<T!>!)Returns the first entry of type (or subtype of) |
T? |
<T : Metadata.Entry?> getFirstMatchingEntry(Returns the first entry of type (or subtype of) |
ImmutableList<T!>! |
<T : Metadata.Entry?> getMatchingEntries(Returns the entries of type (or subtype of) |
Int |
hashCode() |
Int |
length()Returns the number of metadata entries. |
String! |
toString() |
Public properties |
|
|---|---|
Long |
The presentation time of the metadata, in microseconds. |
Public constructors
Metadata
Metadata(entries: Array<Metadata.Entry!>!)
| Parameters | |
|---|---|
entries: Array<Metadata.Entry!>! |
The metadata entries. |
Metadata
Metadata(entries: (Mutable)List<Metadata.Entry!>!)
| Parameters | |
|---|---|
entries: (Mutable)List<Metadata.Entry!>! |
The metadata entries. |
Metadata
Metadata(presentationTimeUs: Long, entries: Array<Metadata.Entry!>!)
| Parameters | |
|---|---|
presentationTimeUs: Long |
The presentation time for the metadata entries. |
entries: Array<Metadata.Entry!>! |
The metadata entries. |
Metadata
Metadata(
presentationTimeUs: Long,
entries: (Mutable)List<Metadata.Entry!>!
)
| Parameters | |
|---|---|
presentationTimeUs: Long |
The presentation time for the metadata entries. |
entries: (Mutable)List<Metadata.Entry!>! |
The metadata entries. |
Public functions
copyWithAppendedEntries
fun copyWithAppendedEntries(entriesToAppend: Array<Metadata.Entry!>!): Metadata!
Returns a copy of this metadata with the specified entries appended.
| Parameters | |
|---|---|
entriesToAppend: Array<Metadata.Entry!>! |
The entries to append. |
| Returns | |
|---|---|
Metadata! |
The metadata instance with the appended entries. |
copyWithAppendedEntriesFrom
fun copyWithAppendedEntriesFrom(other: Metadata?): Metadata!
Returns a copy of this metadata with the entries of the specified metadata appended. Returns this instance if other is null.
| Parameters | |
|---|---|
other: Metadata? |
The metadata that holds the entries to append. If null, this methods returns this instance. |
| Returns | |
|---|---|
Metadata! |
The metadata instance with the appended entries. |
copyWithPresentationTimeUs
fun copyWithPresentationTimeUs(presentationTimeUs: Long): Metadata!
Returns a copy of this metadata with the specified presentation time.
| Parameters | |
|---|---|
presentationTimeUs: Long |
The new presentation time, in microseconds. |
| Returns | |
|---|---|
Metadata! |
The metadata instance with the new presentation time. |
get
fun get(index: Int): Metadata.Entry!
Returns the entry at the specified index.
| Parameters | |
|---|---|
index: Int |
The index of the entry. |
| Returns | |
|---|---|
Metadata.Entry! |
The entry at the specified index. |
getEntriesOfType
fun <T : Metadata.Entry?> getEntriesOfType(clazz: Class<T!>!): ImmutableList<T!>!
Returns the entries of type (or subtype of) clazz.
getFirstEntryOfType
fun <T : Metadata.Entry?> getFirstEntryOfType(clazz: Class<T!>!): T?
Returns the first entry of type (or subtype of) clazz.
getFirstMatchingEntry
fun <T : Metadata.Entry?> getFirstMatchingEntry(
clazz: Class<T!>!,
predicate: Predicate<T!>!
): T?
Returns the first entry of type (or subtype of) clazz that satisfies predicate.
getMatchingEntries
fun <T : Metadata.Entry?> getMatchingEntries(
clazz: Class<T!>!,
predicate: Predicate<T!>!
): ImmutableList<T!>!
Returns the entries of type (or subtype of) clazz that satisfy predicate.
Public properties
presentationTimeUs
val presentationTimeUs: Long
The presentation time of the metadata, in microseconds.
This time is an offset from the start of the current Timeline.Period.
This time is TIME_UNSET when not known or undefined.