public class LegacyMetadataMapper extends Object
Modifier and Type | Field and Description |
---|---|
static int |
HAL_PIXEL_FORMAT_BGRA_8888 |
static int |
HAL_PIXEL_FORMAT_BLOB |
static int |
HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED |
static int |
HAL_PIXEL_FORMAT_RGBA_8888 |
Constructor and Description |
---|
LegacyMetadataMapper() |
Modifier and Type | Method and Description |
---|---|
static void |
convertRequestMetadata(LegacyRequest request)
Set the legacy parameters using the
legacy request . |
static CameraCharacteristics |
createCharacteristics(Camera.Parameters parameters,
Camera.CameraInfo info)
Create characteristics for a legacy device by mapping the
parameters
and info |
static CameraCharacteristics |
createCharacteristics(String parameters,
CameraInfo info)
Create characteristics for a legacy device by mapping the
parameters
and info |
static CameraMetadataNative |
createRequestTemplate(CameraCharacteristics c,
int templateId)
Create a request template
|
public static final int HAL_PIXEL_FORMAT_RGBA_8888
public static final int HAL_PIXEL_FORMAT_BGRA_8888
public static final int HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED
public static final int HAL_PIXEL_FORMAT_BLOB
public static CameraCharacteristics createCharacteristics(Camera.Parameters parameters, Camera.CameraInfo info)
parameters
and info
parameters
- A non-null
parameters setinfo
- Camera info with camera facing direction and angle of orientationNullPointerException
- if any of the args were null
public static CameraCharacteristics createCharacteristics(String parameters, CameraInfo info)
parameters
and info
parameters
- A string parseable by Camera.Parameters#unflatten
info
- Camera info with camera facing direction and angle of orientationNullPointerException
- if any of the args were null
public static void convertRequestMetadata(LegacyRequest request)
legacy request
.
The legacy request's parameters are changed as a side effect of calling this method.
request
- a non-null
legacy requestpublic static CameraMetadataNative createRequestTemplate(CameraCharacteristics c, int templateId)
c
- a non-null
camera characteristics for this cameratemplateId
- a non-negative template IDnull
request templateIllegalArgumentException
- if templateId
was invalidCameraDevice.TEMPLATE_MANUAL