Search in sources :

Example 1 with HighSpeedVideoConfiguration

use of android.hardware.camera2.params.HighSpeedVideoConfiguration in project platform_frameworks_base by android.

the class CameraMetadataTest method testReadWriteHighSpeedVideoConfiguration.

@SmallTest
public void testReadWriteHighSpeedVideoConfiguration() {
    // int32 x 5 x 1
    checkKeyMarshal("android.control.availableHighSpeedVideoConfigurations", new HighSpeedVideoConfiguration(/*width*/
    1000, /*height*/
    255, /*fpsMin*/
    30, /*fpsMax*/
    200, /*batchSizeMax*/
    8), /* width, height, fpsMin, fpsMax */
    toByteArray(1000, 255, 30, 200, 8));
    // int32 x 5 x 3
    checkKeyMarshal("android.control.availableHighSpeedVideoConfigurations", new HighSpeedVideoConfiguration[] { new HighSpeedVideoConfiguration(/*width*/
    1280, /*height*/
    720, /*fpsMin*/
    60, /*fpsMax*/
    120, /*batchSizeMax*/
    8), new HighSpeedVideoConfiguration(/*width*/
    123, /*height*/
    456, /*fpsMin*/
    1, /*fpsMax*/
    200, /*batchSizeMax*/
    4), new HighSpeedVideoConfiguration(/*width*/
    4096, /*height*/
    2592, /*fpsMin*/
    30, /*fpsMax*/
    60, /*batchSizeMax*/
    2) }, toByteArray(1280, 720, 60, 120, 8, 123, 456, 1, 200, 4, 4096, 2592, 30, 60, 2));
}
Also used : HighSpeedVideoConfiguration(android.hardware.camera2.params.HighSpeedVideoConfiguration) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 2 with HighSpeedVideoConfiguration

use of android.hardware.camera2.params.HighSpeedVideoConfiguration in project platform_frameworks_base by android.

the class CameraMetadataNative method getStreamConfigurationMap.

private StreamConfigurationMap getStreamConfigurationMap() {
    StreamConfiguration[] configurations = getBase(CameraCharacteristics.SCALER_AVAILABLE_STREAM_CONFIGURATIONS);
    StreamConfigurationDuration[] minFrameDurations = getBase(CameraCharacteristics.SCALER_AVAILABLE_MIN_FRAME_DURATIONS);
    StreamConfigurationDuration[] stallDurations = getBase(CameraCharacteristics.SCALER_AVAILABLE_STALL_DURATIONS);
    StreamConfiguration[] depthConfigurations = getBase(CameraCharacteristics.DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS);
    StreamConfigurationDuration[] depthMinFrameDurations = getBase(CameraCharacteristics.DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS);
    StreamConfigurationDuration[] depthStallDurations = getBase(CameraCharacteristics.DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS);
    HighSpeedVideoConfiguration[] highSpeedVideoConfigurations = getBase(CameraCharacteristics.CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS);
    ReprocessFormatsMap inputOutputFormatsMap = getBase(CameraCharacteristics.SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP);
    int[] capabilities = getBase(CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES);
    boolean listHighResolution = false;
    for (int capability : capabilities) {
        if (capability == CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE) {
            listHighResolution = true;
            break;
        }
    }
    return new StreamConfigurationMap(configurations, minFrameDurations, stallDurations, depthConfigurations, depthMinFrameDurations, depthStallDurations, highSpeedVideoConfigurations, inputOutputFormatsMap, listHighResolution);
}
Also used : StreamConfigurationDuration(android.hardware.camera2.params.StreamConfigurationDuration) MarshalQueryableStreamConfigurationDuration(android.hardware.camera2.marshal.impl.MarshalQueryableStreamConfigurationDuration) MarshalQueryableStreamConfiguration(android.hardware.camera2.marshal.impl.MarshalQueryableStreamConfiguration) StreamConfiguration(android.hardware.camera2.params.StreamConfiguration) StreamConfigurationMap(android.hardware.camera2.params.StreamConfigurationMap) ReprocessFormatsMap(android.hardware.camera2.params.ReprocessFormatsMap) MarshalQueryableReprocessFormatsMap(android.hardware.camera2.marshal.impl.MarshalQueryableReprocessFormatsMap) MarshalQueryableHighSpeedVideoConfiguration(android.hardware.camera2.marshal.impl.MarshalQueryableHighSpeedVideoConfiguration) HighSpeedVideoConfiguration(android.hardware.camera2.params.HighSpeedVideoConfiguration) Point(android.graphics.Point)

Example 3 with HighSpeedVideoConfiguration

use of android.hardware.camera2.params.HighSpeedVideoConfiguration in project android_frameworks_base by DirtyUnicorns.

the class CameraMetadataNative method getStreamConfigurationMap.

private StreamConfigurationMap getStreamConfigurationMap() {
    StreamConfiguration[] configurations = getBase(CameraCharacteristics.SCALER_AVAILABLE_STREAM_CONFIGURATIONS);
    StreamConfigurationDuration[] minFrameDurations = getBase(CameraCharacteristics.SCALER_AVAILABLE_MIN_FRAME_DURATIONS);
    StreamConfigurationDuration[] stallDurations = getBase(CameraCharacteristics.SCALER_AVAILABLE_STALL_DURATIONS);
    StreamConfiguration[] depthConfigurations = getBase(CameraCharacteristics.DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS);
    StreamConfigurationDuration[] depthMinFrameDurations = getBase(CameraCharacteristics.DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS);
    StreamConfigurationDuration[] depthStallDurations = getBase(CameraCharacteristics.DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS);
    HighSpeedVideoConfiguration[] highSpeedVideoConfigurations = getBase(CameraCharacteristics.CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS);
    ReprocessFormatsMap inputOutputFormatsMap = getBase(CameraCharacteristics.SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP);
    int[] capabilities = getBase(CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES);
    boolean listHighResolution = false;
    for (int capability : capabilities) {
        if (capability == CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE) {
            listHighResolution = true;
            break;
        }
    }
    return new StreamConfigurationMap(configurations, minFrameDurations, stallDurations, depthConfigurations, depthMinFrameDurations, depthStallDurations, highSpeedVideoConfigurations, inputOutputFormatsMap, listHighResolution);
}
Also used : StreamConfigurationDuration(android.hardware.camera2.params.StreamConfigurationDuration) MarshalQueryableStreamConfigurationDuration(android.hardware.camera2.marshal.impl.MarshalQueryableStreamConfigurationDuration) MarshalQueryableStreamConfiguration(android.hardware.camera2.marshal.impl.MarshalQueryableStreamConfiguration) StreamConfiguration(android.hardware.camera2.params.StreamConfiguration) StreamConfigurationMap(android.hardware.camera2.params.StreamConfigurationMap) ReprocessFormatsMap(android.hardware.camera2.params.ReprocessFormatsMap) MarshalQueryableReprocessFormatsMap(android.hardware.camera2.marshal.impl.MarshalQueryableReprocessFormatsMap) MarshalQueryableHighSpeedVideoConfiguration(android.hardware.camera2.marshal.impl.MarshalQueryableHighSpeedVideoConfiguration) HighSpeedVideoConfiguration(android.hardware.camera2.params.HighSpeedVideoConfiguration) Point(android.graphics.Point)

Example 4 with HighSpeedVideoConfiguration

use of android.hardware.camera2.params.HighSpeedVideoConfiguration in project android_frameworks_base by AOSPA.

the class CameraMetadataTest method testReadWriteHighSpeedVideoConfiguration.

@SmallTest
public void testReadWriteHighSpeedVideoConfiguration() {
    // int32 x 5 x 1
    checkKeyMarshal("android.control.availableHighSpeedVideoConfigurations", new HighSpeedVideoConfiguration(/*width*/
    1000, /*height*/
    255, /*fpsMin*/
    30, /*fpsMax*/
    200, /*batchSizeMax*/
    8), /* width, height, fpsMin, fpsMax */
    toByteArray(1000, 255, 30, 200, 8));
    // int32 x 5 x 3
    checkKeyMarshal("android.control.availableHighSpeedVideoConfigurations", new HighSpeedVideoConfiguration[] { new HighSpeedVideoConfiguration(/*width*/
    1280, /*height*/
    720, /*fpsMin*/
    60, /*fpsMax*/
    120, /*batchSizeMax*/
    8), new HighSpeedVideoConfiguration(/*width*/
    123, /*height*/
    456, /*fpsMin*/
    1, /*fpsMax*/
    200, /*batchSizeMax*/
    4), new HighSpeedVideoConfiguration(/*width*/
    4096, /*height*/
    2592, /*fpsMin*/
    30, /*fpsMax*/
    60, /*batchSizeMax*/
    2) }, toByteArray(1280, 720, 60, 120, 8, 123, 456, 1, 200, 4, 4096, 2592, 30, 60, 2));
}
Also used : HighSpeedVideoConfiguration(android.hardware.camera2.params.HighSpeedVideoConfiguration) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 5 with HighSpeedVideoConfiguration

use of android.hardware.camera2.params.HighSpeedVideoConfiguration in project android_frameworks_base by ResurrectionRemix.

the class CameraMetadataTest method testReadWriteHighSpeedVideoConfiguration.

@SmallTest
public void testReadWriteHighSpeedVideoConfiguration() {
    // int32 x 5 x 1
    checkKeyMarshal("android.control.availableHighSpeedVideoConfigurations", new HighSpeedVideoConfiguration(/*width*/
    1000, /*height*/
    255, /*fpsMin*/
    30, /*fpsMax*/
    200, /*batchSizeMax*/
    8), /* width, height, fpsMin, fpsMax */
    toByteArray(1000, 255, 30, 200, 8));
    // int32 x 5 x 3
    checkKeyMarshal("android.control.availableHighSpeedVideoConfigurations", new HighSpeedVideoConfiguration[] { new HighSpeedVideoConfiguration(/*width*/
    1280, /*height*/
    720, /*fpsMin*/
    60, /*fpsMax*/
    120, /*batchSizeMax*/
    8), new HighSpeedVideoConfiguration(/*width*/
    123, /*height*/
    456, /*fpsMin*/
    1, /*fpsMax*/
    200, /*batchSizeMax*/
    4), new HighSpeedVideoConfiguration(/*width*/
    4096, /*height*/
    2592, /*fpsMin*/
    30, /*fpsMax*/
    60, /*batchSizeMax*/
    2) }, toByteArray(1280, 720, 60, 120, 8, 123, 456, 1, 200, 4, 4096, 2592, 30, 60, 2));
}
Also used : HighSpeedVideoConfiguration(android.hardware.camera2.params.HighSpeedVideoConfiguration) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Aggregations

HighSpeedVideoConfiguration (android.hardware.camera2.params.HighSpeedVideoConfiguration)10 Point (android.graphics.Point)5 MarshalQueryableHighSpeedVideoConfiguration (android.hardware.camera2.marshal.impl.MarshalQueryableHighSpeedVideoConfiguration)5 MarshalQueryableReprocessFormatsMap (android.hardware.camera2.marshal.impl.MarshalQueryableReprocessFormatsMap)5 MarshalQueryableStreamConfiguration (android.hardware.camera2.marshal.impl.MarshalQueryableStreamConfiguration)5 MarshalQueryableStreamConfigurationDuration (android.hardware.camera2.marshal.impl.MarshalQueryableStreamConfigurationDuration)5 ReprocessFormatsMap (android.hardware.camera2.params.ReprocessFormatsMap)5 StreamConfiguration (android.hardware.camera2.params.StreamConfiguration)5 StreamConfigurationDuration (android.hardware.camera2.params.StreamConfigurationDuration)5 StreamConfigurationMap (android.hardware.camera2.params.StreamConfigurationMap)5 SmallTest (android.test.suitebuilder.annotation.SmallTest)5