FindIt
Class DeviceFormat

java.lang.Object
  extended by FindIt.DeviceFormat

public class DeviceFormat
extends java.lang.Object


Constructor Summary
DeviceFormat()
           
 
Method Summary
static javax.media.Format formatMatches(javax.media.Format format, javax.media.Format[] supported)
          The formatMatches function who is called from the setFormat(javax.media.protocol.DataSource, javax.media.Format) function, and checkes all the supported formats, until it has found the one that matches with the requested.
static java.lang.String formatToString(javax.media.Format format)
          The formatToString function who is called from the VideoStreamController class, that check if the sended format is video format and then calls the videoFormatToString(javax.media.format.VideoFormat) function.
static boolean isVideo(javax.media.Format format)
          The isVideo function who is called from the formatToString(javax.media.Format) functon and checks if the format is video format.
static boolean setFormat(javax.media.protocol.DataSource dataSource, javax.media.Format format)
          The setFormat function who is called from the VideoStreamController class and used to set the capture format the same with the selected at the CaptureDevFrame GUI.
static java.lang.String videoFormatToString(javax.media.format.VideoFormat videoFormat)
          The videoFormatToString function who is called from the formatToString(javax.media.Format) function that converts the selected format to string with one "spesial" way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceFormat

public DeviceFormat()
Method Detail

formatMatches

public static javax.media.Format formatMatches(javax.media.Format format,
                                               javax.media.Format[] supported)
The formatMatches function who is called from the setFormat(javax.media.protocol.DataSource, javax.media.Format) function, and checkes all the supported formats, until it has found the one that matches with the requested.

Parameters:
format - the requested format
supported - the array format with all the supported formats.
Returns:
pointer with the possition at the format array where the format who is in this possition matches with the requested, or null if none of the supported formats matches will the one.
See Also:
setFormat(javax.media.protocol.DataSource, javax.media.Format)

setFormat

public static boolean setFormat(javax.media.protocol.DataSource dataSource,
                                javax.media.Format format)
The setFormat function who is called from the VideoStreamController class and used to set the capture format the same with the selected at the CaptureDevFrame GUI.

Parameters:
dataSource -
format -
Returns:
true if the requested format has been setted, or false if not.
See Also:
VideoStreamController

isVideo

public static boolean isVideo(javax.media.Format format)
The isVideo function who is called from the formatToString(javax.media.Format) functon and checks if the format is video format.

Parameters:
format -
Returns:
true if the format is video format, or false if isn't.
See Also:
formatToString(javax.media.Format)

formatToString

public static java.lang.String formatToString(javax.media.Format format)
The formatToString function who is called from the VideoStreamController class, that check if the sended format is video format and then calls the videoFormatToString(javax.media.format.VideoFormat) function.

Parameters:
format - video format.
Returns:
the format converted to string.
See Also:
videoFormatToString(javax.media.format.VideoFormat), isVideo(javax.media.Format)

videoFormatToString

public static java.lang.String videoFormatToString(javax.media.format.VideoFormat videoFormat)
The videoFormatToString function who is called from the formatToString(javax.media.Format) function that converts the selected format to string with one "spesial" way.

Parameters:
videoFormat - the selected video format.
Returns:
the format converted to string.
See Also:
formatToString(javax.media.Format)