Class EncodingAttributes

  • All Implemented Interfaces:
    java.io.Serializable

    public class EncodingAttributes
    extends java.lang.Object
    implements java.io.Serializable
    Attributes controlling the encoding process.
    Author:
    Carlo Pelliccia
    See Also:
    Serialized Form
    • Method Summary

      Modifier and Type Method Description
      AudioAttributes getAudioAttributes()
      Returns the attributes for the encoding of the audio stream in the target multimedia file.
      java.lang.Float getDuration()
      Returns the duration (seconds) of the re-encoded stream.
      java.lang.String getFormat()
      Returns the format name for the encoded target multimedia file.
      java.lang.Float getOffset()
      Returns the start offset time (seconds).
      VideoAttributes getVideoAttributes()
      Returns the attributes for the encoding of the video stream in the target multimedia file.
      boolean isMapMetaData()  
      void setAudioAttributes​(AudioAttributes audioAttributes)
      Sets the attributes for the encoding of the audio stream in the target multimedia file.
      void setDuration​(java.lang.Float duration)
      Sets the duration (seconds) of the re-encoded stream.
      void setFormat​(java.lang.String format)
      Sets the format name for the encoded target multimedia file.
      void setMapMetaData​(boolean mapMetaData)
      Copy over meta data from original file to new output if possible
      void setOffset​(java.lang.Float offset)
      Sets the start offset time (seconds).
      void setVideoAttributes​(VideoAttributes videoAttributes)
      Sets the attributes for the encoding of the video stream in the target multimedia file.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • EncodingAttributes

        public EncodingAttributes()
    • Method Detail

      • getFormat

        public java.lang.String getFormat()
        Returns the format name for the encoded target multimedia file.
        Returns:
        The format name for the encoded target multimedia file.
      • setFormat

        public void setFormat​(java.lang.String format)
        Sets the format name for the encoded target multimedia file. Be sure this format is supported (see Encoder.getSupportedEncodingFormats().
        Parameters:
        format - The format name for the encoded target multimedia file.
      • getOffset

        public java.lang.Float getOffset()
        Returns the start offset time (seconds).
        Returns:
        The start offset time (seconds).
      • setOffset

        public void setOffset​(java.lang.Float offset)
        Sets the start offset time (seconds). If null or not specified no start offset will be applied.
        Parameters:
        offset - The start offset time (seconds).
      • getDuration

        public java.lang.Float getDuration()
        Returns the duration (seconds) of the re-encoded stream.
        Returns:
        The duration (seconds) of the re-encoded stream.
      • setDuration

        public void setDuration​(java.lang.Float duration)
        Sets the duration (seconds) of the re-encoded stream. If null or not specified the source stream, starting from the offset, will be completely re-encoded in the target stream.
        Parameters:
        duration - The duration (seconds) of the re-encoded stream.
      • getAudioAttributes

        public AudioAttributes getAudioAttributes()
        Returns the attributes for the encoding of the audio stream in the target multimedia file.
        Returns:
        The attributes for the encoding of the audio stream in the target multimedia file.
      • setAudioAttributes

        public void setAudioAttributes​(AudioAttributes audioAttributes)
        Sets the attributes for the encoding of the audio stream in the target multimedia file. If null of not specified no audio stream will be encoded. It cannot be null if also the video field is null.
        Parameters:
        audioAttributes - The attributes for the encoding of the audio stream in the target multimedia file.
      • getVideoAttributes

        public VideoAttributes getVideoAttributes()
        Returns the attributes for the encoding of the video stream in the target multimedia file.
        Returns:
        The attributes for the encoding of the video stream in the target multimedia file.
      • setVideoAttributes

        public void setVideoAttributes​(VideoAttributes videoAttributes)
        Sets the attributes for the encoding of the video stream in the target multimedia file. If null of not specified no video stream will be encoded. It cannot be null if also the audio field is null.
        Parameters:
        videoAttributes - The attributes for the encoding of the video stream in the target multimedia file.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isMapMetaData

        public boolean isMapMetaData()
        Returns:
        the mapMetaData
      • setMapMetaData

        public void setMapMetaData​(boolean mapMetaData)
        Copy over meta data from original file to new output if possible
        Parameters:
        mapMetaData - the mapMetaData to set