Class EventStream

java.lang.Object
com.castlabs.android.player.models.mpd.EventStream

public final class EventStream extends Object
A DASH in-MPD EventStream element, as defined by ISO/IEC 23009-1, 2nd edition, section 5.10.
  • Method Details

    • getEvents

      @NonNull public List<EventMessage> getEvents()
      Gets the list of event messages in the event stream.
      Returns:
      An unmodifiable list of event messages
    • getPresentationTimesUs

      @NonNull public List<Long> getPresentationTimesUs()
      Gets the presentation times of the events in microseconds, relative to the presentation time offset and sorted in ascending order.
      Returns:
      An unmodifiable list of presentation times
    • getSchemeIdUri

      @NonNull public String getSchemeIdUri()
      Gets the scheme URI.
      Returns:
      The scheme URI
    • getValue

      @NonNull public String getValue()
      Gets the value of the event stream.
      Returns:
      The value of the event stream, empty string if not defined in manifest
    • getTimescale

      public long getTimescale()
      Gets the timescale of the event stream in units per second.
      Returns:
      The timescale
    • getPresentationTimeOffset

      public long getPresentationTimeOffset()
      Gets the presentation time offset in getTimescale() units. Presentation times are converted to microseconds after subtracting this offset from the raw event presentation time.

      For example, the offset in seconds can be calculated as follows:

      
       double presentationTimeOffsetSeconds =
           (double) getPresentationTimeOffset() / getTimescale();
       
      Returns:
      The presentation time offset, or zero if not defined in the manifest
    • id

      @NonNull public String id()
      Gets the constructed ID of this event stream.
      Returns:
      The ID in the format "schemeIdUri/value"