Class MediaInformation


  • public class MediaInformation
    extends java.lang.Object
    Media information class.
    • Constructor Detail

      • MediaInformation

        public MediaInformation​(org.json.JSONObject jsonObject,
                                java.util.List<StreamInformation> streams,
                                java.util.List<Chapter> chapters)
    • Method Detail

      • getFilename

        public java.lang.String getFilename()
        Returns file name.
        Returns:
        media file name
      • getFormat

        public java.lang.String getFormat()
        Returns format.
        Returns:
        media format
      • getLongFormat

        public java.lang.String getLongFormat()
        Returns long format.
        Returns:
        media long format
      • getDuration

        public java.lang.String getDuration()
        Returns duration.
        Returns:
        media duration in "seconds.microseconds" format
      • getStartTime

        public java.lang.String getStartTime()
        Returns start time.
        Returns:
        media start time in milliseconds
      • getSize

        public java.lang.String getSize()
        Returns size.
        Returns:
        media size in bytes
      • getBitrate

        public java.lang.String getBitrate()
        Returns bitrate.
        Returns:
        media bitrate in kb/s
      • getTags

        public org.json.JSONObject getTags()
        Returns all tags.
        Returns:
        tags as a JSONObject
      • getStreams

        public java.util.List<StreamInformation> getStreams()
        Returns all streams.
        Returns:
        list of streams
      • getChapters

        public java.util.List<Chapter> getChapters()
        Returns all chapters.
        Returns:
        list of chapters
      • getStringProperty

        public java.lang.String getStringProperty​(java.lang.String key)
        Returns the property associated with the key.
        Parameters:
        key - property key
        Returns:
        property as string or null if the key is not found
      • getNumberProperty

        public java.lang.Long getNumberProperty​(java.lang.String key)
        Returns the property associated with the key.
        Parameters:
        key - property key
        Returns:
        property as Long or null if the key is not found
      • getProperty

        public org.json.JSONObject getProperty​(java.lang.String key)
        Returns the property associated with the key.
        Parameters:
        key - property key
        Returns:
        property as a JSONObject or null if the key is not found
      • getStringFormatProperty

        public java.lang.String getStringFormatProperty​(java.lang.String key)
        Returns the format property associated with the key.
        Parameters:
        key - property key
        Returns:
        format property as string or null if the key is not found
      • getNumberFormatProperty

        public java.lang.Long getNumberFormatProperty​(java.lang.String key)
        Returns the format property associated with the key.
        Parameters:
        key - property key
        Returns:
        format property as Long or null if the key is not found
      • getFormatProperty

        public org.json.JSONObject getFormatProperty​(java.lang.String key)
        Returns the format property associated with the key.
        Parameters:
        key - property key
        Returns:
        format property as a JSONObject or null if the key is not found
      • getFormatProperties

        public org.json.JSONObject getFormatProperties()
        Returns all format properties defined.
        Returns:
        all format properties as a JSONObject or null if no format properties are defined
      • getAllProperties

        public org.json.JSONObject getAllProperties()
        Returns all properties defined.
        Returns:
        all properties as a JSONObject or null if no properties are defined