Package ws.schild.jave.info
Class MultimediaInfo
- java.lang.Object
-
- ws.schild.jave.info.MultimediaInfo
-
public class MultimediaInfo extends java.lang.ObjectInstances of this class report informations about a decoded multimedia file.
-
-
Field Summary
Fields Modifier and Type Field Description private AudioInfoaudioA set of audio-specific informations.private longdurationThe stream duration in millis.private java.lang.StringformatThe multimedia file format name.private java.util.Map<java.lang.String,java.lang.String>metadataThe multimedia metadata.private VideoInfovideoA set of video-specific informations.
-
Constructor Summary
Constructors Constructor Description MultimediaInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AudioInfogetAudio()Returns a set of audio-specific informations.longgetDuration()Returns the stream duration in millis.java.lang.StringgetFormat()Returns the multimedia file format name.java.util.Map<java.lang.String,java.lang.String>getMetadata()Returns the multimedia metadata.VideoInfogetVideo()Returns a set of video-specific informations.MultimediaInfosetAudio(AudioInfo audio)Sets a set of audio-specific informations.MultimediaInfosetDuration(long duration)Sets the stream duration in millis.MultimediaInfosetFormat(java.lang.String format)Sets the multimedia file format name.MultimediaInfosetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Sets the multimedia metadata.MultimediaInfosetVideo(VideoInfo video)Sets a set of video-specific informations.java.lang.StringtoString()
-
-
-
Field Detail
-
format
private java.lang.String format
The multimedia file format name.
-
metadata
private java.util.Map<java.lang.String,java.lang.String> metadata
The multimedia metadata.
-
duration
private long duration
The stream duration in millis. If less than 0 this information is not available.
-
audio
private AudioInfo audio
A set of audio-specific informations. If null, there's no audio stream in the multimedia file.
-
video
private VideoInfo video
A set of video-specific informations. If null, there's no video stream in the multimedia file.
-
-
Method Detail
-
getFormat
public java.lang.String getFormat()
Returns the multimedia file format name.- Returns:
- The multimedia file format name.
-
setFormat
public MultimediaInfo setFormat(java.lang.String format)
Sets the multimedia file format name.- Parameters:
format- The multimedia file format name.- Returns:
- this instance
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
Returns the multimedia metadata.- Returns:
- The multimedia metadata.
-
setMetadata
public MultimediaInfo setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Sets the multimedia metadata.- Parameters:
metadata- The multimedia metadata.- Returns:
- this instance
-
getDuration
public long getDuration()
Returns the stream duration in millis. If less than 0 this information is not available.- Returns:
- The stream duration in millis. If less than 0 this information is not available.
-
setDuration
public MultimediaInfo setDuration(long duration)
Sets the stream duration in millis.- Parameters:
duration- The stream duration in millis.- Returns:
- this instance
-
getAudio
public AudioInfo getAudio()
Returns a set of audio-specific informations. If null, there's no audio stream in the multimedia file.- Returns:
- A set of audio-specific informations.
-
setAudio
public MultimediaInfo setAudio(AudioInfo audio)
Sets a set of audio-specific informations.- Parameters:
audio- A set of audio-specific informations.- Returns:
- this instance
-
getVideo
public VideoInfo getVideo()
Returns a set of video-specific informations. If null, there's no video stream in the multimedia file.- Returns:
- A set of audio-specific informations.
-
setVideo
public MultimediaInfo setVideo(VideoInfo video)
Sets a set of video-specific informations.- Parameters:
video- A set of video-specific informations.- Returns:
- this instance
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-