com.adobe.mediacore.metadata
Class TimedMetadata

java.lang.Object
  extended by com.adobe.mediacore.metadata.TimedMetadata
All Implemented Interfaces:
Comparable<TimedMetadata>

public final class TimedMetadata
extends Object
implements Comparable<TimedMetadata>

Raw representation of the timed metadata inserted into a media stream. Custom packagers can add additional metadata to an existing stream to signal the presence of special media sections ( ad placement opportunities, black-outs etc).


Nested Class Summary
static class TimedMetadata.Type
           
 
Constructor Summary
TimedMetadata(TimedMetadata.Type type, long time, long id, String name, Metadata metadata)
          Default constructor.
 
Method Summary
 int compareTo(TimedMetadata timedMetadata)
           
 boolean equals(Object other)
           
 long getId()
          Returns the ID extracted from the cue attributes if present.
 Metadata getMetadata()
          The metadata inserted into the stream.
 String getName()
           
 long getTime()
          The time position, relative to the start of the main content, where this metadata was inserted into the stream.
 TimedMetadata.Type getType()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimedMetadata

public TimedMetadata(TimedMetadata.Type type,
                     long time,
                     long id,
                     String name,
                     Metadata metadata)
Default constructor.

Parameters:
type - the TimedMetadata type
time - local stream time
id - the unique id
name - the name of the cue (usually the HLS tag name)
metadata - object containing key-value pairs, associated with the TimedMetadata
Method Detail

getTime

public long getTime()
The time position, relative to the start of the main content, where this metadata was inserted into the stream.

Returns:
insertion time in milliseconds.

getMetadata

public Metadata getMetadata()
The metadata inserted into the stream.

Returns:
parsed metadata

getType

public TimedMetadata.Type getType()
Returns:
the type of the timed metadata.

getId

public long getId()
Returns the ID extracted from the cue attributes if present. Otherwise, default unique value will be provided.

Returns:

getName

public String getName()
Returns:
the name of the cue (usually the HLS tag name)

compareTo

public int compareTo(TimedMetadata timedMetadata)
Specified by:
compareTo in interface Comparable<TimedMetadata>

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object