Package ws.schild.jave
Class EncodingAttributes
- java.lang.Object
-
- ws.schild.jave.EncodingAttributes
-
- All Implemented Interfaces:
java.io.Serializable
public class EncodingAttributes extends java.lang.Object implements java.io.SerializableAttributes controlling the encoding process.- Author:
- Carlo Pelliccia
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EncodingAttributes()
-
Method Summary
Modifier and Type Method Description AudioAttributesgetAudioAttributes()Returns the attributes for the encoding of the audio stream in the target multimedia file.java.lang.FloatgetDuration()Returns the duration (seconds) of the re-encoded stream.java.lang.StringgetFormat()Returns the format name for the encoded target multimedia file.java.lang.FloatgetOffset()Returns the start offset time (seconds).VideoAttributesgetVideoAttributes()Returns the attributes for the encoding of the video stream in the target multimedia file.booleanisMapMetaData()voidsetAudioAttributes(AudioAttributes audioAttributes)Sets the attributes for the encoding of the audio stream in the target multimedia file.voidsetDuration(java.lang.Float duration)Sets the duration (seconds) of the re-encoded stream.voidsetFormat(java.lang.String format)Sets the format name for the encoded target multimedia file.voidsetMapMetaData(boolean mapMetaData)Copy over meta data from original file to new output if possiblevoidsetOffset(java.lang.Float offset)Sets the start offset time (seconds).voidsetVideoAttributes(VideoAttributes videoAttributes)Sets the attributes for the encoding of the video stream in the target multimedia file.java.lang.StringtoString()
-
-
-
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 (seeEncoder.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:
toStringin classjava.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
-
-