org.stanwood.media.info
Class VideoFileInfo

java.lang.Object
  extended by org.stanwood.media.info.VideoFileInfo
All Implemented Interfaces:
IMediaFileInfo, IVideoFileInfo

public class VideoFileInfo
extends java.lang.Object
implements IVideoFileInfo

A implementation of the video file information interface


Constructor Summary
VideoFileInfo(java.io.File mediaFile, VideoInfoParser parser)
          The constructor
 
Method Summary
 AspectRatio getAspectRatio()
          Used to get the display aspect ratio of the video
 java.lang.Long getAudioBitRate()
          Used to get the audio bit rate (Kbs) or null if one can't be found
 java.lang.String getAudioFormatProfile()
          Used to get the audio format profile or null if one can't be found
 long getFileSize()
          Used to get the size of the media file
 java.lang.Float getFrameRate()
          Used to get the frame rate of the video in frams per second (fps)
 int getHeight()
          Used to get the height in pixels of the video
 ResolutionFormat getResolutionFormat()
          Used to get the video resolution format if it's know.
 int getWidth()
          Used to get the width in pixels of the video
 boolean isHighDef()
          Used to find out if the video is high definition
 boolean isInterlaced()
          Used to find out if the video scan type is interlaced or progressive
 boolean isWideScreen()
          Used to find out if the video is wide screen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoFileInfo

public VideoFileInfo(java.io.File mediaFile,
                     VideoInfoParser parser)
              throws XMLParserException
The constructor

Parameters:
mediaFile - The file information is been retrieved on
parser - The parse of the media information
Throws:
XMLParserException - Thrown if their their is a XML parser problem
Method Detail

getFileSize

public long getFileSize()
Used to get the size of the media file

Specified by:
getFileSize in interface IMediaFileInfo
Returns:
the size of the media file

getWidth

public int getWidth()
Used to get the width in pixels of the video

Specified by:
getWidth in interface IVideoFileInfo
Returns:
the width in pixels of the video

getHeight

public int getHeight()
Used to get the height in pixels of the video

Specified by:
getHeight in interface IVideoFileInfo
Returns:
the height in pixels of the video

getFrameRate

public java.lang.Float getFrameRate()
Used to get the frame rate of the video in frams per second (fps)

Specified by:
getFrameRate in interface IVideoFileInfo
Returns:
the frame rate of the video in frams per second (fps)

getAspectRatio

public AspectRatio getAspectRatio()
Used to get the display aspect ratio of the video

Specified by:
getAspectRatio in interface IVideoFileInfo
Returns:
the display aspect ratio of the video

isWideScreen

public boolean isWideScreen()
Used to find out if the video is wide screen

Specified by:
isWideScreen in interface IVideoFileInfo
Returns:
True if the video is widescreen

isHighDef

public boolean isHighDef()
Used to find out if the video is high definition

Specified by:
isHighDef in interface IVideoFileInfo
Returns:
True if the video is high definition

getResolutionFormat

public ResolutionFormat getResolutionFormat()
Used to get the video resolution format if it's know. If not known, them this will return null.

Specified by:
getResolutionFormat in interface IVideoFileInfo
Returns:
The resolution format or null

isInterlaced

public boolean isInterlaced()
Used to find out if the video scan type is interlaced or progressive

Specified by:
isInterlaced in interface IVideoFileInfo
Returns:
true if the scan type is interlaced

getAudioFormatProfile

public java.lang.String getAudioFormatProfile()
Used to get the audio format profile or null if one can't be found

Specified by:
getAudioFormatProfile in interface IVideoFileInfo
Returns:
The audio format profile

getAudioBitRate

public java.lang.Long getAudioBitRate()
Used to get the audio bit rate (Kbs) or null if one can't be found

Specified by:
getAudioBitRate in interface IVideoFileInfo
Returns:
The audio bit rate (Kbs)