org.stanwood.media.info
Enum ResolutionFormat

java.lang.Object
  extended by java.lang.Enum<ResolutionFormat>
      extended by org.stanwood.media.info.ResolutionFormat
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ResolutionFormat>

public enum ResolutionFormat
extends java.lang.Enum<ResolutionFormat>

Used to enumerate know video resolution formats


Enum Constant Summary
Format_1080i
          Used to represent the video resolution format 1080i
Format_1080p
          Used to represent the video resolution format 1080p
Format_480i
          Used to represent the video resolution format 480i
Format_480p
          Used to represent the video resolution format 480p
Format_576i
          Used to represent the video resolution format 576i
Format_576p
          Used to represent the video resolution format 576p
Format_720i
          Used to represent the video resolution format 720i
Format_720p
          Used to represent the video resolution format 720p
 
Method Summary
 java.lang.String getDescription()
          Used to get the description
static ResolutionFormat getFormat(int width, int height, boolean interlaced)
          Used to get the format based on a videos parameters
 int getHeight()
          Used to get the formats height in pixels at the default aspect ratio
 AspectRatio getRatio()
          Used to get the formats default aspect ratio
 int getWidth()
          Used to get the formats width in pixels at the default aspect ratio
 boolean isHighDef()
          Returns true if the format is high def
 boolean isInterlaced()
          Used to find out if the format is interlaced
static ResolutionFormat valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ResolutionFormat[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Format_480i

public static final ResolutionFormat Format_480i
Used to represent the video resolution format 480i


Format_480p

public static final ResolutionFormat Format_480p
Used to represent the video resolution format 480p


Format_576i

public static final ResolutionFormat Format_576i
Used to represent the video resolution format 576i


Format_576p

public static final ResolutionFormat Format_576p
Used to represent the video resolution format 576p


Format_720p

public static final ResolutionFormat Format_720p
Used to represent the video resolution format 720p


Format_720i

public static final ResolutionFormat Format_720i
Used to represent the video resolution format 720i


Format_1080i

public static final ResolutionFormat Format_1080i
Used to represent the video resolution format 1080i


Format_1080p

public static final ResolutionFormat Format_1080p
Used to represent the video resolution format 1080p

Method Detail

values

public static ResolutionFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ResolutionFormat c : ResolutionFormat.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ResolutionFormat valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isHighDef

public boolean isHighDef()
Returns true if the format is high def

Returns:
true if the format is high def

getWidth

public int getWidth()
Used to get the formats width in pixels at the default aspect ratio

Returns:
the formats width in pixels

getHeight

public int getHeight()
Used to get the formats height in pixels at the default aspect ratio

Returns:
the formats height in pixels

getRatio

public AspectRatio getRatio()
Used to get the formats default aspect ratio

Returns:
the formats default aspect ratio

isInterlaced

public boolean isInterlaced()
Used to find out if the format is interlaced

Returns:
true if the format is interlaced

getDescription

public java.lang.String getDescription()
Used to get the description

Returns:
the description

getFormat

public static ResolutionFormat getFormat(int width,
                                         int height,
                                         boolean interlaced)
Used to get the format based on a videos parameters

Parameters:
width - The width of the video in pixels
height - The height of the video in pixels
interlaced - True if the video scan type is interlaced
Returns:
The resolution format or null if it can't be determined