Interface Track

All Superinterfaces:
Cloneable, Comparable<MediaPackageElement>, ManifestContributor, MediaPackageElement
All Known Subinterfaces:
AdaptivePlaylist
All Known Implementing Classes:
TrackImpl

public interface Track extends MediaPackageElement
This interface describes methods and fields for audio and video tracks as part of a media package.
  • Field Details

  • Method Details

    • getStreams

      Stream[] getStreams()
      Returns:
      the streams that make up the track. Tracks consist of at least one stream.
    • hasAudio

      boolean hasAudio()
      Returns true if the track features an audio stream.
      Returns:
      true if the track has an audio stream
    • hasVideo

      boolean hasVideo()
      Returns true if the track features a video stream.
      Returns:
      true if the track has a video stream
    • hasSubtitle

      boolean hasSubtitle()
      Returns true if the track features a subtitle stream.
      Returns:
      true if the track has a subtitle stream
    • getDuration

      Long getDuration()
      Returns the track duration in milliseconds or null if the duration is not available.
      Returns:
      the track duration
    • getDescription

      String getDescription()
      Returns the track's description with details about framerate, codecs etc.
      Returns:
      the track description.
    • isLive

      boolean isLive()
      Returns true if the track is a live track.
      Returns:
      true if live track; false otherwise
    • isMaster

      Boolean isMaster()
      Returns true if the track is a master playlist (play this over other tracks).
      Returns:
      true if it is a master playlist track; false otherwise
    • hasMaster

      boolean hasMaster()
      Returns:
      true if master playlist value is not null
    • setMaster

      void setMaster(Boolean master)
      Sets master - it is an adaptive playlist
      Parameters:
      master - if true
    • getLogicalName

      String getLogicalName()
      Returns logical name of the file which persists in spite of file name changes
      Returns:
      logical name
    • setLogicalName

      void setLogicalName(String name)
      Sets logical name of the file which persists in spite of file name changes to maintain referential integrity in the case of adaptive playlists
      Parameters:
      name - as relative to manifest