android.hardware.Camera.Parameters
Handles the parameters for pictures created by a Camera service.
Summary
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Methods
public
String
flatten()
Creates a single string with all the parameters set in
this Parameters object.
The unflatten(String) method does the reverse.
Returns
- a String with all values from this Parameters object, in
semi-colon delimited key-value pairs
Returns the value of a String parameter.
Parameters
key
| the key name for the parameter |
Returns
- the String value of the parameter
public
int
getInt(String key)
Returns the value of an integer parameter.
Parameters
key
| the key name for the parameter |
Returns
- the int value of the parameter
public
int
getPictureFormat()
Returns the image format for pictures.
Returns
- the PixelFormat int representing the picture format
public
Camera.Size
getPictureSize()
Returns the dimension setting for pictures.
Returns
- a Size object with the height and width setting
for pictures
public
int
getPreviewFormat()
Returns the image format for preview pictures.
Returns
- the PixelFormat int representing the preview picture format
public
int
getPreviewFrameRate()
Returns the setting for the rate at which preview frames
are received.
Returns
- the frame rate setting (frames per second)
public
Camera.Size
getPreviewSize()
Returns the dimensions setting for preview pictures.
Returns
- a Size object with the height and width setting
for the preview picture
public
void
remove(String key)
public
void
set(String key, int value)
Sets an integer parameter.
Parameters
key
| the key name for the parameter |
value
| the int value of the parameter
|
public
void
set(String key, String value)
Sets a String parameter.
Parameters
key
| the key name for the parameter |
value
| the String value of the parameter
|
public
void
setPictureFormat(int pixel_format)
Sets the image format for pictures.
Parameters
pixel_format
| the desired picture format
(PixelFormat.YCbCr_422_SP,
PixelFormat.RGB_565, or
PixelFormat.JPEG) |
public
void
setPictureSize(int width, int height)
Sets the dimensions for pictures.
Parameters
width
| the width for pictures, in pixels |
height
| the height for pictures, in pixels
|
public
void
setPreviewFormat(int pixel_format)
Sets the image format for preview pictures.
Parameters
pixel_format
| the desired preview picture format
(PixelFormat.YCbCr_422_SP,
PixelFormat.RGB_565, or
PixelFormat.JPEG) |
public
void
setPreviewFrameRate(int fps)
Sets the rate at which preview frames are received.
Parameters
fps
| the frame rate (frames per second)
|
public
void
setPreviewSize(int width, int height)
Sets the dimensions for preview pictures.
Parameters
width
| the width of the pictures, in pixels |
height
| the height of the pictures, in pixels
|
public
void
unflatten(String flattened)
Takes a flattened string of parameters and adds each one to
this Parameters object.
The flatten() method does the reverse.
Parameters
flattened
| a String of parameters (key-value paired) that
are semi-colon delimited
|