Class InfoApi

java.lang.Object
uk.co.caprica.vlcj.media.InfoApi

public final class InfoApi extends Object
Behaviour pertaining to media information, providing things like the media resource locator, type, state and duration of this media. Also provides access to the various media tracks and playback statistics.
  • Method Details

    • mrl

      public String mrl()
      Get the media resource locator for the current media.
      Returns:
      media resource locator
    • type

      public MediaType type()
      Get the current media type
      Returns:
      media type
    • state

      public State state()
      Get the media state
      Returns:
      state
    • duration

      public long duration()
      Get the duration
      Returns:
      duration, milliseconds
    • tracks

      public List<? extends TrackInfo> tracks(TrackType... types)
      Get the list of all media tracks, or only those that match specified types.
      Parameters:
      types - zero or more track types, if none specified then all track types will be returned
      Returns:
      track information, empty list if no tracks
    • audioTracks

      public List<AudioTrackInfo> audioTracks()
      Get the list of audio tracks on the current media.
      Returns:
      audio tracks, empty list if none
    • videoTracks

      public List<VideoTrackInfo> videoTracks()
      Get the list of video tracks on the current media.
      Returns:
      video tracks, empty list if none
    • textTracks

      public List<TextTrackInfo> textTracks()
      Get the list of text (subtitle) tracks on the current media.
      Returns:
      text tracks, empty list if none
    • statistics

      public boolean statistics(MediaStatistics mediaStatistics)
      Get playback statistics for the current media.
      Parameters:
      mediaStatistics - caller-supplied structure to receive the media statistics
      Returns:
      true if the statistics were updated; false on error
    • statistics

      public MediaStatistics statistics()
      Get playback statistics for the current media.
      Returns:
      media statistics, or null on error