다음을 통해 공유


CamcorderProfile.GetAll(String, Int32) Method

Definition

Returns all encoder profiles of a camcorder profile for the given camera at the given quality level.

[Android.Runtime.Register("getAll", "(Ljava/lang/String;I)Landroid/media/EncoderProfiles;", "", ApiSince=31)]
public static Android.Media.EncoderProfiles? GetAll (string cameraId, int quality);
[<Android.Runtime.Register("getAll", "(Ljava/lang/String;I)Landroid/media/EncoderProfiles;", "", ApiSince=31)>]
static member GetAll : string * int -> Android.Media.EncoderProfiles

Parameters

cameraId
String

the id for the camera. Numeric camera ids from the list received by invoking CameraManager#getCameraIdList can be used as long as they are CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE and not CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL EXTERNAL.

quality
Int32

the target quality level for the camcorder profile.

Returns

null if there are no encoder profiles defined for the quality level for the given camera.

Attributes

Remarks

Returns all encoder profiles of a camcorder profile for the given camera at the given quality level.

Quality levels QUALITY_LOW, QUALITY_HIGH are guaranteed to be supported, while other levels may or may not be supported. The supported levels can be checked using #hasProfile(int, int). QUALITY_LOW refers to the lowest quality available, while QUALITY_HIGH refers to the highest quality available. QUALITY_LOW/QUALITY_HIGH have to match one of qcif, cif, 480p, 720p, 1080p or 2160p. E.g. if the device supports 480p, 720p, 1080p and 2160p, then low is 480p and high is 2160p.

The same is true for time lapse quality levels, i.e. QUALITY_TIME_LAPSE_LOW, QUALITY_TIME_LAPSE_HIGH are guaranteed to be supported and have to match one of qcif, cif, 480p, 720p, 1080p, or 2160p.

For high speed quality levels, they may or may not be supported. If a subset of the levels are supported, QUALITY_HIGH_SPEED_LOW and QUALITY_HIGH_SPEED_HIGH are guaranteed to be supported and have to match one of 480p, 720p, or 1080p.

A camcorder recording session with higher 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 lower quality level.

<b>Note:</b> as of android.os.Build.VERSION_CODES#TIRAMISU Android TIRAMISU, this method can return advanced encoder profiles.

Apps targeting Build.VERSION_CODES#S_V2 or before will only receive basic video encoder profiles that use output YUV 4:2:0 8-bit content. Apps targeting Build.VERSION_CODES#TIRAMISU or above will also receive advanced video encoder profiles that may output 10-bit, YUV 4:2:2/4:4:4 or HDR content.

Java documentation for android.media.CamcorderProfile.getAll(java.lang.String, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to