Class Overview
The CamcorderProfile class is used to retrieve the
predefined camcorder profile settings for camcorder applications.
These settings are read-only.
The compressed output from a recording session with a given
CamcorderProfile contains two tracks: one for auido and one for video.
Each profile specifies the following set of parameters:
- The file output format
- Video codec format
- Video bit rate in bits per second
- Video frame rate in frames per second
- Video frame width and height,
- Audio codec format
- Audio bit rate in bits per second,
- Audio sample rate
- Number of audio channels for recording.
Summary
Constants |
int |
QUALITY_HIGH |
|
int |
QUALITY_LOW |
The output from camcorder recording sessions can have different quality levels. |
Fields |
public
int |
audioBitRate |
The target audio output bit rate in bits per second
|
public
int |
audioChannels |
The number of audio channels used for the audio track
|
public
int |
audioCodec |
The audio encoder being used for the audio track. |
public
int |
audioSampleRate |
The audio sampling rate used for the audio track
|
public
int |
duration |
Default recording duration in seconds before the session is terminated. |
public
int |
fileFormat |
The file output format of the camcorder profile |
public
int |
quality |
The quality level of the camcorder profile
|
public
int |
videoBitRate |
The target video output bit rate in bits per second
|
public
int |
videoCodec |
The video encoder being used for the video track |
public
int |
videoFrameHeight |
The target video frame height in pixels
|
public
int |
videoFrameRate |
The target video frame rate in frames per second
|
public
int |
videoFrameWidth |
The target video frame width in pixels
|
Public Methods |
static
CamcorderProfile
|
get(int quality)
Returns the camcorder profile for the first back-facing camera on the
device at the given quality level.
|
static
CamcorderProfile
|
get(int cameraId, int quality)
Returns the camcorder profile for the given camera at the given
quality level.
|
[Expand]
Inherited Methods |
From class java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Called before the object's memory is reclaimed by the VM.
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Constants
public
static
final
int
QUALITY_HIGH
Constant Value:
1
(0x00000001)
public
static
final
int
QUALITY_LOW
The output from camcorder recording sessions can have different quality levels.
Currently, we define two quality levels: high quality and low quality.
A camcorder recording session with high quality level usually has higher output bit
rate, better video and/or audio recording quality, larger video frame
resolution and higher audio sampling rate, etc, than those with low quality
level.
Do not change these values/ordinals without updating their counterpart
in include/media/MediaProfiles.h!
Constant Value:
0
(0x00000000)
Fields
public
int
audioBitRate
The target audio output bit rate in bits per second
public
int
audioChannels
The number of audio channels used for the audio track
public
int
audioCodec
The audio encoder being used for the audio track.
public
int
audioSampleRate
The audio sampling rate used for the audio track
public
int
duration
Default recording duration in seconds before the session is terminated.
This is useful for applications like MMS has limited file size requirement.
public
int
fileFormat
The file output format of the camcorder profile
public
int
quality
The quality level of the camcorder profile
public
int
videoBitRate
The target video output bit rate in bits per second
public
int
videoCodec
The video encoder being used for the video track
public
int
videoFrameHeight
The target video frame height in pixels
public
int
videoFrameRate
The target video frame rate in frames per second
public
int
videoFrameWidth
The target video frame width in pixels
Public Methods
Returns the camcorder profile for the first back-facing camera on the
device at the given quality level. If the device has no back-facing
camera, this returns null.
Parameters
quality
| the target quality level for the camcorder profile
|
public
static
CamcorderProfile
get
(int cameraId, int quality)
Returns the camcorder profile for the given camera at the given
quality level.
Parameters
cameraId
| the id for the camera |
quality
| the target quality level for the camcorder profile
|