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)
    • 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 milliseconds
      • 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 dictionary
      • getStreams

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

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

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

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

        public org.json.JSONObject getMediaProperties()
        Returns all media properties.
        Returns:
        all media properties as a JSONObject or null if no media 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