hal3

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServiceTestConfigGenerators = map[cameraboxpb.HAL3CameraTest]ServiceTestConfigGenerator{
	cameraboxpb.HAL3CameraTest_DEVICE:         defaultServiceCfgGenerator{DeviceTestConfig},
	cameraboxpb.HAL3CameraTest_FRAME:          defaultServiceCfgGenerator{FrameTestConfig},
	cameraboxpb.HAL3CameraTest_JDA:            defaultServiceCfgGenerator{JDATestConfig},
	cameraboxpb.HAL3CameraTest_JEA:            defaultServiceCfgGenerator{JEATestConfig},
	cameraboxpb.HAL3CameraTest_MODULE:         defaultServiceCfgGenerator{ModuleTestConfig},
	cameraboxpb.HAL3CameraTest_PERF:           defaultServiceCfgGenerator{PerfTestConfig},
	cameraboxpb.HAL3CameraTest_PREVIEW:        defaultServiceCfgGenerator{PreviewTestConfig},
	cameraboxpb.HAL3CameraTest_RECORDING:      defaultServiceCfgGenerator{RecordingTestConfig},
	cameraboxpb.HAL3CameraTest_STILL_CAPTURE:  defaultServiceCfgGenerator{StillCaptureTestConfig},
	cameraboxpb.HAL3CameraTest_STREAM:         defaultServiceCfgGenerator{StreamTestConfig},
	cameraboxpb.HAL3CameraTest_FACE_DETECTION: faceDetectionServiceCfgGenerator{},
}

ServiceTestConfigGenerators maps from test type to test config generator for HAL3Service.

Functions

func ArcCameraUID

func ArcCameraUID() (int, error)

ArcCameraUID returns the user id used by camera service and camera test binary.

func IsV1Legacy

func IsV1Legacy(ctx context.Context) (bool, error)

IsV1Legacy returns true if the built-in camera is not qualified for Android Camera HALv3 LIMITED hardware level.

func RunTest

func RunTest(ctx context.Context, cfg TestConfig) (retErr error)

RunTest runs cros_camera_test with proper environment setup and arguments according to the given config.

Types

type ServiceTestConfigGenerator

type ServiceTestConfigGenerator interface {
	TestConfig(req *cameraboxpb.RunTestRequest) TestConfig
}

ServiceTestConfigGenerator generates |TestConfig| from test request for HAL3Service.

type TestConfig

type TestConfig struct {
	// CameraHALs is a list of camera HALs to test, such as "usb".  If
	// unspecified, all available camera HALs would be tested.
	CameraHALs []string
	// CameraFacing is the facing of the camera to test, such as "front" or
	// "back".  This field and CameraHALs are mutually exclusive.
	CameraFacing string
	// GtestFilter would be passed to cros_camera_test as the value of
	// --gtest_filter command line switch.
	GtestFilter string
	// GeneratePerfLog describes whether the performance log file should be
	// generated by cros_camera_test.
	GeneratePerfLog bool
	// RequireRecordingParams describes whether the recording parameters should
	// be generated for cros_camera_test.
	RequireRecordingParams bool
	// ForceJPEGHWEnc is the flag to enforce hardware encode for JPEG, so it
	// won't fall back to SW encode when the HW encode failed.
	ForceJPEGHWEnc bool
	// ForceJPEGHWDec is the flag to enforce hardware decode for JPEG, so it
	// won't fall back to SW decode when the HW decode failed.
	ForceJPEGHWDec bool
	// ConnectToCameraService is the flag to connect to the cros-camera service,
	// instead of loading camera HALs.
	ConnectToCameraService bool
	// PortraitModeTestData is the portrait mode test data to be downloaded.
	PortraitModeTestData string
	// Number of faces should be detected for face detection test.
	ExpectedNumFaces string
}

TestConfig is the config for HAL3 tests.

func DeviceTestConfig

func DeviceTestConfig() TestConfig

DeviceTestConfig returns test config for running HAL3Device test.

func FrameTestConfig

func FrameTestConfig() TestConfig

FrameTestConfig returns test config for running HAL3Frame test.

func JDATestConfig

func JDATestConfig() TestConfig

JDATestConfig returns test config for running HAL3JDA test.

func JEATestConfig

func JEATestConfig() TestConfig

JEATestConfig returns test config for running HAL3JEA test.

func JEAUSBTestConfig

func JEAUSBTestConfig() TestConfig

JEAUSBTestConfig returns test config for running HAL3JEA test on USB HAL.

func ModuleTestConfig

func ModuleTestConfig() TestConfig

ModuleTestConfig returns test config for running HAL3Module test.

func PerfTestConfig

func PerfTestConfig() TestConfig

PerfTestConfig returns test config for running HAL3Perf test.

func PortraitModeTestConfig

func PortraitModeTestConfig(generatePerfLog bool, portraitModeTestFile string) TestConfig

PortraitModeTestConfig returns test config for running HAL3PortraitMode test.

func PreviewTestConfig

func PreviewTestConfig() TestConfig

PreviewTestConfig returns test config for running HAL3Preview test.

func RecordingTestConfig

func RecordingTestConfig() TestConfig

RecordingTestConfig returns test config for running HAL3Recording test.

func StillCaptureTestConfig

func StillCaptureTestConfig() TestConfig

StillCaptureTestConfig returns test config for running HAL3StillCapture test.

func StillCaptureZSLTestConfig

func StillCaptureZSLTestConfig() TestConfig

StillCaptureZSLTestConfig returns test config for running HAL3StillCaptureZSL test.

func StreamTestConfig

func StreamTestConfig() TestConfig

StreamTestConfig returns test config for running HAL3Stream test.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL