public class ImageFormatList extends Object
ImageFormats
capture resolutions and frame intervals supported by a VideoDevice.
A native (or raw)
format is a format supported and used by the driver. This native
format list is obtained by calling getNativeFormats().
Additionally, v4l4j can convert some native formats to
RGB24, BGR24, JPEG, YUV420 and YVU420. The
getRGBEncodableFormats(), getBGREncodableFormats(),
getJPEGEncodableFormats(), getYUVEncodableFormats()
& getYVUEncodableFormats() methods returns the subset of native
formats that can be converted to these formats.
ImageFormatLists are not directly instantiated. Instead, you
can get the list of ImageFormats supported by a VideoDevice
by calling DeviceInfo.getFormatList() on its associated
DeviceInfo.| Modifier and Type | Method and Description |
|---|---|
ImageFormat |
getBGREncodableFormat(int i)
This method looks for a native
ImageFormat that can be converted
to BGR24 by v4l4j given its index,
and returns it, or null if not found. |
ImageFormat |
getBGREncodableFormat(String n)
This method looks for a native
ImageFormat that can be converted
to BGR24 by v4l4j in this list given its name, and returns it, or
null if not found. |
List<ImageFormat> |
getBGREncodableFormats()
This method returns a list of native
ImageFormats contained
in this object, that can be converted to BGR24 by v4l4j. |
ImageFormat |
getJPEGEncodableFormat(int i)
This method looks for a native
ImageFormat that can be converted
to JPEG by v4l4j given its
index, and returns it, or null if not found. |
ImageFormat |
getJPEGEncodableFormat(String n)
This method looks for a native
ImageFormat that can be converted
to JPEG by v4l4j in this list given its name, and returns it, or
null if not found. |
List<ImageFormat> |
getJPEGEncodableFormats()
This method returns a list of native
ImageFormats contained
in this object, that can be converted to JPEG by v4l4j. |
ImageFormat |
getNativeFormat(int i)
This method looks for a native
ImageFormat given its index,
and returns it, or null if not found. |
ImageFormat |
getNativeFormat(String n)
This method looks for a native
ImageFormat in this list given
its name, and returns it, or null if not found. |
List<ImageFormat> |
getNativeFormats()
This method returns the native
ImageFormats contained in this
list. |
ImageFormat |
getRGBEncodableFormat(int i)
This method looks for a native
ImageFormat that can be converted
to RGB24 by v4l4j given its index, and returns it, or null
if not found. |
ImageFormat |
getRGBEncodableFormat(String n)
This method looks for a native
ImageFormat that can be converted
to RGB24 by v4l4j in this list given its name, and returns it, or
null if not found. |
List<ImageFormat> |
getRGBEncodableFormats()
This method returns a list of native
ImageFormats contained
in this object, that can be converted to RGB24 by v4l4j. |
ImageFormat |
getYUVEncodableFormat(int i)
This method looks for a native
ImageFormat that can be converted
to YUV420 by v4l4j given its index,
and returns it, or null if not found. |
ImageFormat |
getYUVEncodableFormat(String n)
This method looks for a native
ImageFormat that can be converted
to YUV420 by v4l4j in this list given
its name, and returns it, or null if not found. |
List<ImageFormat> |
getYUVEncodableFormats()
This method returns a list of native
ImageFormats contained
in this object, that can be converted to YUV420 by v4l4j. |
ImageFormat |
getYVUEncodableFormat(int i)
This method looks for a native
ImageFormat that can be converted
to YVU420 by v4l4j given its index,
and returns it, or null if not found. |
ImageFormat |
getYVUEncodableFormat(String n)
This method looks for a native
ImageFormat that can be converted
to YVU420 by v4l4j in this list given
its name, and returns it, or null if not found. |
List<ImageFormat> |
getYVUEncodableFormats()
This method returns a list of native
ImageFormats contained
in this object, that can be converted to YVU420 by v4l4j. |
public List<ImageFormat> getNativeFormats()
ImageFormats contained in this
list.ImageFormats contained in this listpublic ImageFormat getNativeFormat(String n)
ImageFormat in this list given
its name, and returns it, or null if not found.n - the name of the ImageFormat.ImageFormat, or null
if not found in the list.public ImageFormat getNativeFormat(int i)
ImageFormat given its index,
and returns it, or null if not found. A list of all known
format indexes can be found in V4L4JConstants.IMF_*.i - the index of the ImageFormat to look upImageFormat or null if not found.public List<ImageFormat> getJPEGEncodableFormats()
ImageFormats contained
in this object, that can be converted to JPEG by v4l4j. The list is
sorted: image formats better suited for the conversion are listed first.ImageFormats contained
in this object, that can be converted to JPEG by v4l4j.public ImageFormat getJPEGEncodableFormat(String n)
ImageFormat that can be converted
to JPEG by v4l4j in this list given its name, and returns it, or
null if not found.n - the name of the ImageFormat.ImageFormat, or null
if not found in the list.public ImageFormat getJPEGEncodableFormat(int i)
ImageFormat that can be converted
to JPEG by v4l4j given its
index, and returns it, or null if not found. A list of all
known format indexes can be found in V4L4JConstants.IMF_* .i - the index of the ImageFormat to look upImageFormat or null if not found.public List<ImageFormat> getRGBEncodableFormats()
ImageFormats contained
in this object, that can be converted to RGB24 by v4l4j. The list is
sorted: image formats better suited for the conversion are listed first.ImageFormats contained
in this object, that can be converted to RGB24 by v4l4j.public ImageFormat getRGBEncodableFormat(String n)
ImageFormat that can be converted
to RGB24 by v4l4j in this list given its name, and returns it, or
null if not found.n - the name of the ImageFormat.ImageFormat, or null
if not found in the list.public ImageFormat getRGBEncodableFormat(int i)
ImageFormat that can be converted
to RGB24 by v4l4j given its index, and returns it, or null
if not found. A list of all known format indexes can be found in
V4L4JConstants.IMF_* .i - the index of the ImageFormat to look upImageFormat or null if not found.public List<ImageFormat> getBGREncodableFormats()
ImageFormats contained
in this object, that can be converted to BGR24 by v4l4j. The list is
sorted: image formats better suited for the conversion are listed first.ImageFormats contained
in this object, that can be converted to BGR24 by v4l4j.public ImageFormat getBGREncodableFormat(String n)
ImageFormat that can be converted
to BGR24 by v4l4j in this list given its name, and returns it, or
null if not found.n - the name of the ImageFormat.ImageFormat, or null
if not found in the list.public ImageFormat getBGREncodableFormat(int i)
ImageFormat that can be converted
to BGR24 by v4l4j given its index,
and returns it, or null if not found. A list of all known
format indexes can be found in V4L4JConstants.IMF_* .i - the index of the ImageFormat to look upImageFormat or null if not found.public List<ImageFormat> getYUVEncodableFormats()
ImageFormats contained
in this object, that can be converted to YUV420 by v4l4j. The list is
sorted: image formats better suited for the conversion are listed first.ImageFormats contained
in this object, that can be converted to YUV420 by v4l4j.public ImageFormat getYUVEncodableFormat(String n)
ImageFormat that can be converted
to YUV420 by v4l4j in this list given
its name, and returns it, or null if not found.n - the name of the ImageFormat.ImageFormat, or null
if not found in the list.public ImageFormat getYUVEncodableFormat(int i)
ImageFormat that can be converted
to YUV420 by v4l4j given its index,
and returns it, or null if not found. A list of all known
format indexes can be found in V4L4JConstants.IMF_* .i - the index of the ImageFormat to look upImageFormat or null if not found.public List<ImageFormat> getYVUEncodableFormats()
ImageFormats contained
in this object, that can be converted to YVU420 by v4l4j. The list is
sorted: image formats better suited for the conversion are listed first.ImageFormats contained
in this object, that can be converted to YVU420 by v4l4j.public ImageFormat getYVUEncodableFormat(String n)
ImageFormat that can be converted
to YVU420 by v4l4j in this list given
its name, and returns it, or null if not found.n - the name of the ImageFormat.ImageFormat, or null
if not found in the list.public ImageFormat getYVUEncodableFormat(int i)
ImageFormat that can be converted
to YVU420 by v4l4j given its index,
and returns it, or null if not found. A list of all known
format indexes can be found in V4L4JConstantsV4L4JConstants.IMF_*i - the index of the ImageFormat to look upImageFormat or null if not found.Copyright © 2013-2015 Bartosz Firyn (sarxos). All Rights Reserved.