device

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionICameraDeviceGetCameraCharacteristics                 = binder.FirstCallTransaction + 0
	TransactionICameraDeviceGetPhysicalCameraCharacteristics         = binder.FirstCallTransaction + 1
	TransactionICameraDeviceGetResourceCost                          = binder.FirstCallTransaction + 2
	TransactionICameraDeviceIsStreamCombinationSupported             = binder.FirstCallTransaction + 3
	TransactionICameraDeviceOpen                                     = binder.FirstCallTransaction + 4
	TransactionICameraDeviceOpenInjectionSession                     = binder.FirstCallTransaction + 5
	TransactionICameraDeviceSetTorchMode                             = binder.FirstCallTransaction + 6
	TransactionICameraDeviceTurnOnTorchWithStrengthLevel             = binder.FirstCallTransaction + 7
	TransactionICameraDeviceGetTorchStrengthLevel                    = binder.FirstCallTransaction + 8
	TransactionICameraDeviceConstructDefaultRequestSettings          = binder.FirstCallTransaction + 9
	TransactionICameraDeviceIsStreamCombinationWithSettingsSupported = binder.FirstCallTransaction + 10
	TransactionICameraDeviceGetSessionCharacteristics                = binder.FirstCallTransaction + 11
)
View Source
const (
	MethodICameraDeviceGetCameraCharacteristics                 = "getCameraCharacteristics"
	MethodICameraDeviceGetPhysicalCameraCharacteristics         = "getPhysicalCameraCharacteristics"
	MethodICameraDeviceGetResourceCost                          = "getResourceCost"
	MethodICameraDeviceIsStreamCombinationSupported             = "isStreamCombinationSupported"
	MethodICameraDeviceOpen                                     = "open"
	MethodICameraDeviceOpenInjectionSession                     = "openInjectionSession"
	MethodICameraDeviceSetTorchMode                             = "setTorchMode"
	MethodICameraDeviceTurnOnTorchWithStrengthLevel             = "turnOnTorchWithStrengthLevel"
	MethodICameraDeviceGetTorchStrengthLevel                    = "getTorchStrengthLevel"
	MethodICameraDeviceConstructDefaultRequestSettings          = "constructDefaultRequestSettings"
	MethodICameraDeviceIsStreamCombinationWithSettingsSupported = "isStreamCombinationWithSettingsSupported"
	MethodICameraDeviceGetSessionCharacteristics                = "getSessionCharacteristics"
)
View Source
const (
	TransactionICameraDeviceCallbackNotify               = binder.FirstCallTransaction + 0
	TransactionICameraDeviceCallbackProcessCaptureResult = binder.FirstCallTransaction + 1
	TransactionICameraDeviceCallbackRequestStreamBuffers = binder.FirstCallTransaction + 2
	TransactionICameraDeviceCallbackReturnStreamBuffers  = binder.FirstCallTransaction + 3
)
View Source
const (
	MethodICameraDeviceCallbackNotify               = "notify"
	MethodICameraDeviceCallbackProcessCaptureResult = "processCaptureResult"
	MethodICameraDeviceCallbackRequestStreamBuffers = "requestStreamBuffers"
	MethodICameraDeviceCallbackReturnStreamBuffers  = "returnStreamBuffers"
)
View Source
const (
	TransactionICameraDeviceSessionClose                           = binder.FirstCallTransaction + 0
	TransactionICameraDeviceSessionConfigureStreams                = binder.FirstCallTransaction + 1
	TransactionICameraDeviceSessionConstructDefaultRequestSettings = binder.FirstCallTransaction + 2
	TransactionICameraDeviceSessionFlush                           = binder.FirstCallTransaction + 3
	TransactionICameraDeviceSessionGetCaptureRequestMetadataQueue  = binder.FirstCallTransaction + 4
	TransactionICameraDeviceSessionGetCaptureResultMetadataQueue   = binder.FirstCallTransaction + 5
	TransactionICameraDeviceSessionIsReconfigurationRequired       = binder.FirstCallTransaction + 6
	TransactionICameraDeviceSessionProcessCaptureRequest           = binder.FirstCallTransaction + 7
	TransactionICameraDeviceSessionSignalStreamFlush               = binder.FirstCallTransaction + 8
	TransactionICameraDeviceSessionSwitchToOffline                 = binder.FirstCallTransaction + 9
	TransactionICameraDeviceSessionRepeatingRequestEnd             = binder.FirstCallTransaction + 10
	TransactionICameraDeviceSessionConfigureStreamsV2              = binder.FirstCallTransaction + 11
)
View Source
const (
	MethodICameraDeviceSessionClose                           = "close"
	MethodICameraDeviceSessionConfigureStreams                = "configureStreams"
	MethodICameraDeviceSessionConstructDefaultRequestSettings = "constructDefaultRequestSettings"
	MethodICameraDeviceSessionFlush                           = "flush"
	MethodICameraDeviceSessionGetCaptureRequestMetadataQueue  = "getCaptureRequestMetadataQueue"
	MethodICameraDeviceSessionGetCaptureResultMetadataQueue   = "getCaptureResultMetadataQueue"
	MethodICameraDeviceSessionIsReconfigurationRequired       = "isReconfigurationRequired"
	MethodICameraDeviceSessionProcessCaptureRequest           = "processCaptureRequest"
	MethodICameraDeviceSessionSignalStreamFlush               = "signalStreamFlush"
	MethodICameraDeviceSessionSwitchToOffline                 = "switchToOffline"
	MethodICameraDeviceSessionRepeatingRequestEnd             = "repeatingRequestEnd"
	MethodICameraDeviceSessionConfigureStreamsV2              = "configureStreamsV2"
)
View Source
const (
	TransactionICameraInjectionSessionConfigureInjectionStreams = binder.FirstCallTransaction + 0
	TransactionICameraInjectionSessionGetCameraDeviceSession    = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodICameraInjectionSessionConfigureInjectionStreams = "configureInjectionStreams"
	MethodICameraInjectionSessionGetCameraDeviceSession    = "getCameraDeviceSession"
)
View Source
const (
	TransactionICameraOfflineSessionClose                         = binder.FirstCallTransaction + 0
	TransactionICameraOfflineSessionGetCaptureResultMetadataQueue = binder.FirstCallTransaction + 1
	TransactionICameraOfflineSessionSetCallback                   = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodICameraOfflineSessionClose                         = "close"
	MethodICameraOfflineSessionGetCaptureResultMetadataQueue = "getCaptureResultMetadataQueue"
	MethodICameraOfflineSessionSetCallback                   = "setCallback"
)
View Source
const (
	NotifyMsgTagError   int32 = 0
	NotifyMsgTagShutter int32 = 1
)
View Source
const (
	StreamBuffersValTagError   int32 = 0
	StreamBuffersValTagBuffers int32 = 1
)
View Source
const DescriptorICameraDevice = "android.hardware.camera.device.ICameraDevice"
View Source
const DescriptorICameraDeviceCallback = "android.hardware.camera.device.ICameraDeviceCallback"
View Source
const DescriptorICameraDeviceSession = "android.hardware.camera.device.ICameraDeviceSession"
View Source
const DescriptorICameraInjectionSession = "android.hardware.camera.device.ICameraInjectionSession"
View Source
const DescriptorICameraOfflineSession = "android.hardware.camera.device.ICameraOfflineSession"

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferCache

type BufferCache struct {
	StreamId int32
	BufferId int64
}

func (*BufferCache) MarshalParcel

func (s *BufferCache) MarshalParcel(
	p *parcel.Parcel,
) error

func (*BufferCache) UnmarshalParcel

func (s *BufferCache) UnmarshalParcel(
	p *parcel.Parcel,
) error

type BufferRequest

type BufferRequest struct {
	StreamId            int32
	NumBuffersRequested int32
}

func (*BufferRequest) MarshalParcel

func (s *BufferRequest) MarshalParcel(
	p *parcel.Parcel,
) error

func (*BufferRequest) UnmarshalParcel

func (s *BufferRequest) UnmarshalParcel(
	p *parcel.Parcel,
) error

type BufferRequestStatus

type BufferRequestStatus int32
const (
	BufferRequestStatusOK                     BufferRequestStatus = 0
	BufferRequestStatusFailedPartial          BufferRequestStatus = 1
	BufferRequestStatusFailedConfiguring      BufferRequestStatus = 2
	BufferRequestStatusFailedIllegalArguments BufferRequestStatus = 3
	BufferRequestStatusFailedUnknown          BufferRequestStatus = 4
)

type BufferStatus

type BufferStatus int32
const (
	BufferStatusOK    BufferStatus = 0
	BufferStatusERROR BufferStatus = 1
)

type CameraBlob

type CameraBlob struct {
	BlobId        CameraBlobId
	BlobSizeBytes int32
}

func (*CameraBlob) MarshalParcel

func (s *CameraBlob) MarshalParcel(
	p *parcel.Parcel,
) error

func (*CameraBlob) UnmarshalParcel

func (s *CameraBlob) UnmarshalParcel(
	p *parcel.Parcel,
) error

type CameraBlobId

type CameraBlobId int32
const (
	CameraBlobIdJPEG            CameraBlobId = 255
	CameraBlobIdJpegAppSegments CameraBlobId = 256
)

type CameraDeviceCallbackProxy

type CameraDeviceCallbackProxy struct {
	Remote binder.IBinder
}

func NewCameraDeviceCallbackProxy

func NewCameraDeviceCallbackProxy(
	remote binder.IBinder,
) *CameraDeviceCallbackProxy

func (*CameraDeviceCallbackProxy) AsBinder

func (*CameraDeviceCallbackProxy) Notify

func (p *CameraDeviceCallbackProxy) Notify(
	ctx context.Context,
	msgs []NotifyMsg,
) error

func (*CameraDeviceCallbackProxy) ProcessCaptureResult

func (p *CameraDeviceCallbackProxy) ProcessCaptureResult(
	ctx context.Context,
	results []CaptureResult,
) error

func (*CameraDeviceCallbackProxy) RequestStreamBuffers

func (p *CameraDeviceCallbackProxy) RequestStreamBuffers(
	ctx context.Context,
	bufReqs []BufferRequest,
	buffers []StreamBufferRet,
) (BufferRequestStatus, error)

func (*CameraDeviceCallbackProxy) ReturnStreamBuffers

func (p *CameraDeviceCallbackProxy) ReturnStreamBuffers(
	ctx context.Context,
	buffers []StreamBuffer,
) error

type CameraDeviceCallbackStub

type CameraDeviceCallbackStub struct {
	Impl      ICameraDeviceCallback
	Transport binder.VersionAwareTransport
}

CameraDeviceCallbackStub dispatches incoming binder transactions to a typed ICameraDeviceCallback implementation.

func (*CameraDeviceCallbackStub) Descriptor

func (s *CameraDeviceCallbackStub) Descriptor() string

func (*CameraDeviceCallbackStub) OnTransaction

func (s *CameraDeviceCallbackStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type CameraDeviceProxy

type CameraDeviceProxy struct {
	Remote binder.IBinder
}

func NewCameraDeviceProxy

func NewCameraDeviceProxy(
	remote binder.IBinder,
) *CameraDeviceProxy

func (*CameraDeviceProxy) AsBinder

func (p *CameraDeviceProxy) AsBinder() binder.IBinder

func (*CameraDeviceProxy) ConstructDefaultRequestSettings

func (p *CameraDeviceProxy) ConstructDefaultRequestSettings(
	ctx context.Context,
	type_ RequestTemplate,
) (CameraMetadata, error)

func (*CameraDeviceProxy) GetCameraCharacteristics

func (p *CameraDeviceProxy) GetCameraCharacteristics(
	ctx context.Context,
) (CameraMetadata, error)

func (*CameraDeviceProxy) GetPhysicalCameraCharacteristics

func (p *CameraDeviceProxy) GetPhysicalCameraCharacteristics(
	ctx context.Context,
	physicalCameraId string,
) (CameraMetadata, error)

func (*CameraDeviceProxy) GetResourceCost

func (p *CameraDeviceProxy) GetResourceCost(
	ctx context.Context,
) (common.CameraResourceCost, error)

func (*CameraDeviceProxy) GetSessionCharacteristics

func (p *CameraDeviceProxy) GetSessionCharacteristics(
	ctx context.Context,
	sessionConfig StreamConfiguration,
) (CameraMetadata, error)

func (*CameraDeviceProxy) GetTorchStrengthLevel

func (p *CameraDeviceProxy) GetTorchStrengthLevel(
	ctx context.Context,
) (int32, error)

func (*CameraDeviceProxy) IsStreamCombinationSupported

func (p *CameraDeviceProxy) IsStreamCombinationSupported(
	ctx context.Context,
	streams StreamConfiguration,
) (bool, error)

func (*CameraDeviceProxy) IsStreamCombinationWithSettingsSupported

func (p *CameraDeviceProxy) IsStreamCombinationWithSettingsSupported(
	ctx context.Context,
	streams StreamConfiguration,
) (bool, error)

func (*CameraDeviceProxy) Open

func (*CameraDeviceProxy) OpenInjectionSession

func (p *CameraDeviceProxy) OpenInjectionSession(
	ctx context.Context,
	callback ICameraDeviceCallback,
) (ICameraInjectionSession, error)

func (*CameraDeviceProxy) SetTorchMode

func (p *CameraDeviceProxy) SetTorchMode(
	ctx context.Context,
	on bool,
) error

func (*CameraDeviceProxy) TurnOnTorchWithStrengthLevel

func (p *CameraDeviceProxy) TurnOnTorchWithStrengthLevel(
	ctx context.Context,
	torchStrength int32,
) error

type CameraDeviceSessionProxy

type CameraDeviceSessionProxy struct {
	Remote binder.IBinder
}

func NewCameraDeviceSessionProxy

func NewCameraDeviceSessionProxy(
	remote binder.IBinder,
) *CameraDeviceSessionProxy

func (*CameraDeviceSessionProxy) AsBinder

func (p *CameraDeviceSessionProxy) AsBinder() binder.IBinder

func (*CameraDeviceSessionProxy) Close

func (p *CameraDeviceSessionProxy) Close(
	ctx context.Context,
) error

func (*CameraDeviceSessionProxy) ConfigureStreams

func (p *CameraDeviceSessionProxy) ConfigureStreams(
	ctx context.Context,
	requestedConfiguration StreamConfiguration,
) ([]HalStream, error)

func (*CameraDeviceSessionProxy) ConfigureStreamsV2

func (p *CameraDeviceSessionProxy) ConfigureStreamsV2(
	ctx context.Context,
	requestedConfiguration StreamConfiguration,
) (ConfigureStreamsRet, error)

func (*CameraDeviceSessionProxy) ConstructDefaultRequestSettings

func (p *CameraDeviceSessionProxy) ConstructDefaultRequestSettings(
	ctx context.Context,
	type_ RequestTemplate,
) (CameraMetadata, error)

func (*CameraDeviceSessionProxy) Flush

func (p *CameraDeviceSessionProxy) Flush(
	ctx context.Context,
) error

func (*CameraDeviceSessionProxy) GetCaptureRequestMetadataQueue

func (p *CameraDeviceSessionProxy) GetCaptureRequestMetadataQueue(
	ctx context.Context,
) (fmq.MQDescriptor, error)

func (*CameraDeviceSessionProxy) GetCaptureResultMetadataQueue

func (p *CameraDeviceSessionProxy) GetCaptureResultMetadataQueue(
	ctx context.Context,
) (fmq.MQDescriptor, error)

func (*CameraDeviceSessionProxy) IsReconfigurationRequired

func (p *CameraDeviceSessionProxy) IsReconfigurationRequired(
	ctx context.Context,
	oldSessionParams CameraMetadata,
	newSessionParams CameraMetadata,
) (bool, error)

func (*CameraDeviceSessionProxy) ProcessCaptureRequest

func (p *CameraDeviceSessionProxy) ProcessCaptureRequest(
	ctx context.Context,
	requests []CaptureRequest,
	cachesToRemove []BufferCache,
) (int32, error)

func (*CameraDeviceSessionProxy) RepeatingRequestEnd

func (p *CameraDeviceSessionProxy) RepeatingRequestEnd(
	ctx context.Context,
	frameNumber int32,
	streamIds []int32,
) error

func (*CameraDeviceSessionProxy) SignalStreamFlush

func (p *CameraDeviceSessionProxy) SignalStreamFlush(
	ctx context.Context,
	streamIds []int32,
	streamConfigCounter int32,
) error

func (*CameraDeviceSessionProxy) SwitchToOffline

func (p *CameraDeviceSessionProxy) SwitchToOffline(
	ctx context.Context,
	streamsToKeep []int32,
	offlineSessionInfo CameraOfflineSessionInfo,
) (ICameraOfflineSession, error)

type CameraDeviceSessionStub

type CameraDeviceSessionStub struct {
	Impl      ICameraDeviceSession
	Transport binder.VersionAwareTransport
}

CameraDeviceSessionStub dispatches incoming binder transactions to a typed ICameraDeviceSession implementation.

func (*CameraDeviceSessionStub) Descriptor

func (s *CameraDeviceSessionStub) Descriptor() string

func (*CameraDeviceSessionStub) OnTransaction

func (s *CameraDeviceSessionStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type CameraDeviceStub

type CameraDeviceStub struct {
	Impl      ICameraDevice
	Transport binder.VersionAwareTransport
}

CameraDeviceStub dispatches incoming binder transactions to a typed ICameraDevice implementation.

func (*CameraDeviceStub) Descriptor

func (s *CameraDeviceStub) Descriptor() string

func (*CameraDeviceStub) OnTransaction

func (s *CameraDeviceStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type CameraInjectionSessionProxy

type CameraInjectionSessionProxy struct {
	Remote binder.IBinder
}

func NewCameraInjectionSessionProxy

func NewCameraInjectionSessionProxy(
	remote binder.IBinder,
) *CameraInjectionSessionProxy

func (*CameraInjectionSessionProxy) AsBinder

func (*CameraInjectionSessionProxy) ConfigureInjectionStreams

func (p *CameraInjectionSessionProxy) ConfigureInjectionStreams(
	ctx context.Context,
	requestedConfiguration StreamConfiguration,
	characteristics CameraMetadata,
) error

func (*CameraInjectionSessionProxy) GetCameraDeviceSession

func (p *CameraInjectionSessionProxy) GetCameraDeviceSession(
	ctx context.Context,
) (ICameraDeviceSession, error)

type CameraInjectionSessionStub

type CameraInjectionSessionStub struct {
	Impl      ICameraInjectionSession
	Transport binder.VersionAwareTransport
}

CameraInjectionSessionStub dispatches incoming binder transactions to a typed ICameraInjectionSession implementation.

func (*CameraInjectionSessionStub) Descriptor

func (s *CameraInjectionSessionStub) Descriptor() string

func (*CameraInjectionSessionStub) OnTransaction

func (s *CameraInjectionSessionStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type CameraMetadata

type CameraMetadata struct {
	Metadata []byte
}

func (*CameraMetadata) MarshalParcel

func (s *CameraMetadata) MarshalParcel(
	p *parcel.Parcel,
) error

func (*CameraMetadata) UnmarshalParcel

func (s *CameraMetadata) UnmarshalParcel(
	p *parcel.Parcel,
) error

type CameraOfflineSessionInfo

type CameraOfflineSessionInfo struct {
	OfflineStreams  []OfflineStream
	OfflineRequests []OfflineRequest
}

func (*CameraOfflineSessionInfo) MarshalParcel

func (s *CameraOfflineSessionInfo) MarshalParcel(
	p *parcel.Parcel,
) error

func (*CameraOfflineSessionInfo) UnmarshalParcel

func (s *CameraOfflineSessionInfo) UnmarshalParcel(
	p *parcel.Parcel,
) error

type CameraOfflineSessionProxy

type CameraOfflineSessionProxy struct {
	Remote binder.IBinder
}

func NewCameraOfflineSessionProxy

func NewCameraOfflineSessionProxy(
	remote binder.IBinder,
) *CameraOfflineSessionProxy

func (*CameraOfflineSessionProxy) AsBinder

func (*CameraOfflineSessionProxy) Close

func (*CameraOfflineSessionProxy) GetCaptureResultMetadataQueue

func (p *CameraOfflineSessionProxy) GetCaptureResultMetadataQueue(
	ctx context.Context,
) (fmq.MQDescriptor, error)

func (*CameraOfflineSessionProxy) SetCallback

type CameraOfflineSessionStub

type CameraOfflineSessionStub struct {
	Impl      ICameraOfflineSession
	Transport binder.VersionAwareTransport
}

CameraOfflineSessionStub dispatches incoming binder transactions to a typed ICameraOfflineSession implementation.

func (*CameraOfflineSessionStub) Descriptor

func (s *CameraOfflineSessionStub) Descriptor() string

func (*CameraOfflineSessionStub) OnTransaction

func (s *CameraOfflineSessionStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type CaptureRequest

type CaptureRequest struct {
	FrameNumber            int32
	FmqSettingsSize        int64
	Settings               CameraMetadata
	InputBuffer            StreamBuffer
	InputWidth             int32
	InputHeight            int32
	OutputBuffers          []StreamBuffer
	PhysicalCameraSettings []PhysicalCameraSetting
}

func (*CaptureRequest) MarshalParcel

func (s *CaptureRequest) MarshalParcel(
	p *parcel.Parcel,
) error

func (*CaptureRequest) UnmarshalParcel

func (s *CaptureRequest) UnmarshalParcel(
	p *parcel.Parcel,
) error

type CaptureResult

type CaptureResult struct {
	FrameNumber            int32
	FmqResultSize          int64
	Result                 CameraMetadata
	OutputBuffers          []StreamBuffer
	InputBuffer            StreamBuffer
	PartialResult          int32
	PhysicalCameraMetadata []PhysicalCameraMetadata
}

func (*CaptureResult) MarshalParcel

func (s *CaptureResult) MarshalParcel(
	p *parcel.Parcel,
) error

func (*CaptureResult) UnmarshalParcel

func (s *CaptureResult) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ConfigureStreamsRet

type ConfigureStreamsRet struct {
	HalStreams []HalStream
}

func (*ConfigureStreamsRet) MarshalParcel

func (s *ConfigureStreamsRet) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ConfigureStreamsRet) UnmarshalParcel

func (s *ConfigureStreamsRet) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ErrorCode

type ErrorCode int32
const (
	ErrorCodeErrorDevice  ErrorCode = 1
	ErrorCodeErrorRequest ErrorCode = 2
	ErrorCodeErrorResult  ErrorCode = 3
	ErrorCodeErrorBuffer  ErrorCode = 4
)

type ErrorMsg

type ErrorMsg struct {
	FrameNumber   int32
	ErrorStreamId int32
	ErrorCode     ErrorCode
}

func (*ErrorMsg) MarshalParcel

func (s *ErrorMsg) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ErrorMsg) UnmarshalParcel

func (s *ErrorMsg) UnmarshalParcel(
	p *parcel.Parcel,
) error

type HalStream

type HalStream struct {
	Id                     int32
	OverrideFormat         common.PixelFormat
	ProducerUsage          common.BufferUsage
	ConsumerUsage          common.BufferUsage
	MaxBuffers             int32
	OverrideDataSpace      common.Dataspace
	PhysicalCameraId       string
	SupportOffline         bool
	EnableHalBufferManager bool
}

func (*HalStream) MarshalParcel

func (s *HalStream) MarshalParcel(
	p *parcel.Parcel,
) error

func (*HalStream) UnmarshalParcel

func (s *HalStream) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ICameraDevice

type ICameraDevice interface {
	AsBinder() binder.IBinder
	GetCameraCharacteristics(ctx context.Context) (CameraMetadata, error)
	GetPhysicalCameraCharacteristics(ctx context.Context, physicalCameraId string) (CameraMetadata, error)
	GetResourceCost(ctx context.Context) (common.CameraResourceCost, error)
	IsStreamCombinationSupported(ctx context.Context, streams StreamConfiguration) (bool, error)
	Open(ctx context.Context, callback ICameraDeviceCallback) (ICameraDeviceSession, error)
	OpenInjectionSession(ctx context.Context, callback ICameraDeviceCallback) (ICameraInjectionSession, error)
	SetTorchMode(ctx context.Context, on bool) error
	TurnOnTorchWithStrengthLevel(ctx context.Context, torchStrength int32) error
	GetTorchStrengthLevel(ctx context.Context) (int32, error)
	ConstructDefaultRequestSettings(ctx context.Context, type_ RequestTemplate) (CameraMetadata, error)
	IsStreamCombinationWithSettingsSupported(ctx context.Context, streams StreamConfiguration) (bool, error)
	GetSessionCharacteristics(ctx context.Context, sessionConfig StreamConfiguration) (CameraMetadata, error)
}

func NewCameraDeviceStub

func NewCameraDeviceStub(
	impl ICameraDeviceServer,
) ICameraDevice

NewCameraDeviceStub creates a server-side ICameraDevice wrapping the given server implementation. The returned value satisfies ICameraDevice and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ICameraDeviceCallback

type ICameraDeviceCallback interface {
	AsBinder() binder.IBinder
	Notify(ctx context.Context, msgs []NotifyMsg) error
	ProcessCaptureResult(ctx context.Context, results []CaptureResult) error
	RequestStreamBuffers(ctx context.Context, bufReqs []BufferRequest, buffers []StreamBufferRet) (BufferRequestStatus, error)
	ReturnStreamBuffers(ctx context.Context, buffers []StreamBuffer) error
}

func NewCameraDeviceCallbackStub

func NewCameraDeviceCallbackStub(
	impl ICameraDeviceCallbackServer,
) ICameraDeviceCallback

NewCameraDeviceCallbackStub creates a server-side ICameraDeviceCallback wrapping the given server implementation. The returned value satisfies ICameraDeviceCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ICameraDeviceCallbackServer

type ICameraDeviceCallbackServer interface {
	Notify(ctx context.Context, msgs []NotifyMsg) error
	ProcessCaptureResult(ctx context.Context, results []CaptureResult) error
	RequestStreamBuffers(ctx context.Context, bufReqs []BufferRequest, buffers []StreamBufferRet) (BufferRequestStatus, error)
	ReturnStreamBuffers(ctx context.Context, buffers []StreamBuffer) error
}

ICameraDeviceCallbackServer is the server-side interface that user implementations provide to NewCameraDeviceCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ICameraDeviceServer

type ICameraDeviceServer interface {
	GetCameraCharacteristics(ctx context.Context) (CameraMetadata, error)
	GetPhysicalCameraCharacteristics(ctx context.Context, physicalCameraId string) (CameraMetadata, error)
	GetResourceCost(ctx context.Context) (common.CameraResourceCost, error)
	IsStreamCombinationSupported(ctx context.Context, streams StreamConfiguration) (bool, error)
	Open(ctx context.Context, callback ICameraDeviceCallback) (ICameraDeviceSession, error)
	OpenInjectionSession(ctx context.Context, callback ICameraDeviceCallback) (ICameraInjectionSession, error)
	SetTorchMode(ctx context.Context, on bool) error
	TurnOnTorchWithStrengthLevel(ctx context.Context, torchStrength int32) error
	GetTorchStrengthLevel(ctx context.Context) (int32, error)
	ConstructDefaultRequestSettings(ctx context.Context, type_ RequestTemplate) (CameraMetadata, error)
	IsStreamCombinationWithSettingsSupported(ctx context.Context, streams StreamConfiguration) (bool, error)
	GetSessionCharacteristics(ctx context.Context, sessionConfig StreamConfiguration) (CameraMetadata, error)
}

ICameraDeviceServer is the server-side interface that user implementations provide to NewCameraDeviceStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ICameraDeviceSession

type ICameraDeviceSession interface {
	AsBinder() binder.IBinder
	Close(ctx context.Context) error
	ConfigureStreams(ctx context.Context, requestedConfiguration StreamConfiguration) ([]HalStream, error)
	ConstructDefaultRequestSettings(ctx context.Context, type_ RequestTemplate) (CameraMetadata, error)
	Flush(ctx context.Context) error
	GetCaptureRequestMetadataQueue(ctx context.Context) (fmq.MQDescriptor, error)
	GetCaptureResultMetadataQueue(ctx context.Context) (fmq.MQDescriptor, error)
	IsReconfigurationRequired(ctx context.Context, oldSessionParams CameraMetadata, newSessionParams CameraMetadata) (bool, error)
	ProcessCaptureRequest(ctx context.Context, requests []CaptureRequest, cachesToRemove []BufferCache) (int32, error)
	SignalStreamFlush(ctx context.Context, streamIds []int32, streamConfigCounter int32) error
	SwitchToOffline(ctx context.Context, streamsToKeep []int32, offlineSessionInfo CameraOfflineSessionInfo) (ICameraOfflineSession, error)
	RepeatingRequestEnd(ctx context.Context, frameNumber int32, streamIds []int32) error
	ConfigureStreamsV2(ctx context.Context, requestedConfiguration StreamConfiguration) (ConfigureStreamsRet, error)
}

func NewCameraDeviceSessionStub

func NewCameraDeviceSessionStub(
	impl ICameraDeviceSessionServer,
) ICameraDeviceSession

NewCameraDeviceSessionStub creates a server-side ICameraDeviceSession wrapping the given server implementation. The returned value satisfies ICameraDeviceSession and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ICameraDeviceSessionServer

type ICameraDeviceSessionServer interface {
	Close(ctx context.Context) error
	ConfigureStreams(ctx context.Context, requestedConfiguration StreamConfiguration) ([]HalStream, error)
	ConstructDefaultRequestSettings(ctx context.Context, type_ RequestTemplate) (CameraMetadata, error)
	Flush(ctx context.Context) error
	GetCaptureRequestMetadataQueue(ctx context.Context) (fmq.MQDescriptor, error)
	GetCaptureResultMetadataQueue(ctx context.Context) (fmq.MQDescriptor, error)
	IsReconfigurationRequired(ctx context.Context, oldSessionParams CameraMetadata, newSessionParams CameraMetadata) (bool, error)
	ProcessCaptureRequest(ctx context.Context, requests []CaptureRequest, cachesToRemove []BufferCache) (int32, error)
	SignalStreamFlush(ctx context.Context, streamIds []int32, streamConfigCounter int32) error
	SwitchToOffline(ctx context.Context, streamsToKeep []int32, offlineSessionInfo CameraOfflineSessionInfo) (ICameraOfflineSession, error)
	RepeatingRequestEnd(ctx context.Context, frameNumber int32, streamIds []int32) error
	ConfigureStreamsV2(ctx context.Context, requestedConfiguration StreamConfiguration) (ConfigureStreamsRet, error)
}

ICameraDeviceSessionServer is the server-side interface that user implementations provide to NewCameraDeviceSessionStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ICameraInjectionSession

type ICameraInjectionSession interface {
	AsBinder() binder.IBinder
	ConfigureInjectionStreams(ctx context.Context, requestedConfiguration StreamConfiguration, characteristics CameraMetadata) error
	GetCameraDeviceSession(ctx context.Context) (ICameraDeviceSession, error)
}

func NewCameraInjectionSessionStub

func NewCameraInjectionSessionStub(
	impl ICameraInjectionSessionServer,
) ICameraInjectionSession

NewCameraInjectionSessionStub creates a server-side ICameraInjectionSession wrapping the given server implementation. The returned value satisfies ICameraInjectionSession and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ICameraInjectionSessionServer

type ICameraInjectionSessionServer interface {
	ConfigureInjectionStreams(ctx context.Context, requestedConfiguration StreamConfiguration, characteristics CameraMetadata) error
	GetCameraDeviceSession(ctx context.Context) (ICameraDeviceSession, error)
}

ICameraInjectionSessionServer is the server-side interface that user implementations provide to NewCameraInjectionSessionStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ICameraOfflineSession

type ICameraOfflineSession interface {
	AsBinder() binder.IBinder
	Close(ctx context.Context) error
	GetCaptureResultMetadataQueue(ctx context.Context) (fmq.MQDescriptor, error)
	SetCallback(ctx context.Context, cb ICameraDeviceCallback) error
}

func NewCameraOfflineSessionStub

func NewCameraOfflineSessionStub(
	impl ICameraOfflineSessionServer,
) ICameraOfflineSession

NewCameraOfflineSessionStub creates a server-side ICameraOfflineSession wrapping the given server implementation. The returned value satisfies ICameraOfflineSession and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ICameraOfflineSessionServer

type ICameraOfflineSessionServer interface {
	Close(ctx context.Context) error
	GetCaptureResultMetadataQueue(ctx context.Context) (fmq.MQDescriptor, error)
	SetCallback(ctx context.Context, cb ICameraDeviceCallback) error
}

ICameraOfflineSessionServer is the server-side interface that user implementations provide to NewCameraOfflineSessionStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type NotifyMsg

type NotifyMsg struct {
	Tag     int32
	Error   ErrorMsg
	Shutter ShutterMsg
}

func (*NotifyMsg) GetError

func (u *NotifyMsg) GetError() (ErrorMsg, bool)

func (*NotifyMsg) GetShutter

func (u *NotifyMsg) GetShutter() (ShutterMsg, bool)

func (*NotifyMsg) MarshalParcel

func (u *NotifyMsg) MarshalParcel(
	p *parcel.Parcel,
) error

func (*NotifyMsg) SetError

func (u *NotifyMsg) SetError(
	v ErrorMsg,
)

func (*NotifyMsg) SetShutter

func (u *NotifyMsg) SetShutter(
	v ShutterMsg,
)

func (*NotifyMsg) UnmarshalParcel

func (u *NotifyMsg) UnmarshalParcel(
	p *parcel.Parcel,
) error

type OfflineRequest

type OfflineRequest struct {
	FrameNumber    int32
	PendingStreams []int32
}

func (*OfflineRequest) MarshalParcel

func (s *OfflineRequest) MarshalParcel(
	p *parcel.Parcel,
) error

func (*OfflineRequest) UnmarshalParcel

func (s *OfflineRequest) UnmarshalParcel(
	p *parcel.Parcel,
) error

type OfflineStream

type OfflineStream struct {
	Id                    int32
	NumOutstandingBuffers int32
	CirculatingBufferIds  []int64
}

func (*OfflineStream) MarshalParcel

func (s *OfflineStream) MarshalParcel(
	p *parcel.Parcel,
) error

func (*OfflineStream) UnmarshalParcel

func (s *OfflineStream) UnmarshalParcel(
	p *parcel.Parcel,
) error

type PhysicalCameraMetadata

type PhysicalCameraMetadata struct {
	FmqMetadataSize  int64
	PhysicalCameraId string
	Metadata         CameraMetadata
}

func (*PhysicalCameraMetadata) MarshalParcel

func (s *PhysicalCameraMetadata) MarshalParcel(
	p *parcel.Parcel,
) error

func (*PhysicalCameraMetadata) UnmarshalParcel

func (s *PhysicalCameraMetadata) UnmarshalParcel(
	p *parcel.Parcel,
) error

type PhysicalCameraSetting

type PhysicalCameraSetting struct {
	FmqSettingsSize  int64
	PhysicalCameraId string
	Settings         CameraMetadata
}

func (*PhysicalCameraSetting) MarshalParcel

func (s *PhysicalCameraSetting) MarshalParcel(
	p *parcel.Parcel,
) error

func (*PhysicalCameraSetting) UnmarshalParcel

func (s *PhysicalCameraSetting) UnmarshalParcel(
	p *parcel.Parcel,
) error

type RequestTemplate

type RequestTemplate int32
const (
	RequestTemplatePREVIEW             RequestTemplate = 1
	RequestTemplateStillCapture        RequestTemplate = 2
	RequestTemplateVideoRecord         RequestTemplate = 3
	RequestTemplateVideoSnapshot       RequestTemplate = 4
	RequestTemplateZeroShutterLag      RequestTemplate = 5
	RequestTemplateMANUAL              RequestTemplate = 6
	RequestTemplateVendorTemplateStart RequestTemplate = 1073741824
)

type ShutterMsg

type ShutterMsg struct {
	FrameNumber      int32
	Timestamp        int64
	ReadoutTimestamp int64
}

func (*ShutterMsg) MarshalParcel

func (s *ShutterMsg) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ShutterMsg) UnmarshalParcel

func (s *ShutterMsg) UnmarshalParcel(
	p *parcel.Parcel,
) error

type Stream

type Stream struct {
	Id                   int32
	StreamType           StreamType
	Width                int32
	Height               int32
	Format               common.PixelFormat
	Usage                common.BufferUsage
	DataSpace            common.Dataspace
	Rotation             StreamRotation
	PhysicalCameraId     string
	BufferSize           int32
	GroupId              int32
	SensorPixelModesUsed []metadata.SensorPixelMode
	DynamicRangeProfile  metadata.RequestAvailableDynamicRangeProfilesMap
	UseCase              metadata.ScalerAvailableStreamUseCases
	ColorSpace           int32
}

func (*Stream) MarshalParcel

func (s *Stream) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Stream) UnmarshalParcel

func (s *Stream) UnmarshalParcel(
	p *parcel.Parcel,
) error

type StreamBuffer

type StreamBuffer struct {
	StreamId     int32
	BufferId     int64
	Buffer       common.NativeHandle
	Status       BufferStatus
	AcquireFence common.NativeHandle
	ReleaseFence common.NativeHandle
}

func (*StreamBuffer) MarshalParcel

func (s *StreamBuffer) MarshalParcel(
	p *parcel.Parcel,
) error

func (*StreamBuffer) UnmarshalParcel

func (s *StreamBuffer) UnmarshalParcel(
	p *parcel.Parcel,
) error

type StreamBufferRequestError

type StreamBufferRequestError int32
const (
	StreamBufferRequestErrorNoBufferAvailable  StreamBufferRequestError = 1
	StreamBufferRequestErrorMaxBufferExceeded  StreamBufferRequestError = 2
	StreamBufferRequestErrorStreamDisconnected StreamBufferRequestError = 3
	StreamBufferRequestErrorUnknownError       StreamBufferRequestError = 4
)

type StreamBufferRet

type StreamBufferRet struct {
	StreamId int32
	Val      StreamBuffersVal
}

func (*StreamBufferRet) MarshalParcel

func (s *StreamBufferRet) MarshalParcel(
	p *parcel.Parcel,
) error

func (*StreamBufferRet) UnmarshalParcel

func (s *StreamBufferRet) UnmarshalParcel(
	p *parcel.Parcel,
) error

type StreamBuffersVal

type StreamBuffersVal struct {
	Tag     int32
	Error   StreamBufferRequestError
	Buffers []StreamBuffer
}

func (*StreamBuffersVal) GetBuffers

func (u *StreamBuffersVal) GetBuffers() ([]StreamBuffer, bool)

func (*StreamBuffersVal) GetError

func (*StreamBuffersVal) MarshalParcel

func (u *StreamBuffersVal) MarshalParcel(
	p *parcel.Parcel,
) error

func (*StreamBuffersVal) SetBuffers

func (u *StreamBuffersVal) SetBuffers(
	v []StreamBuffer,
)

func (*StreamBuffersVal) SetError

func (u *StreamBuffersVal) SetError(
	v StreamBufferRequestError,
)

func (*StreamBuffersVal) UnmarshalParcel

func (u *StreamBuffersVal) UnmarshalParcel(
	p *parcel.Parcel,
) error

type StreamConfiguration

type StreamConfiguration struct {
	Streams                   []Stream
	OperationMode             StreamConfigurationMode
	SessionParams             CameraMetadata
	StreamConfigCounter       int32
	MultiResolutionInputImage bool
	LogId                     int64
}

func (*StreamConfiguration) MarshalParcel

func (s *StreamConfiguration) MarshalParcel(
	p *parcel.Parcel,
) error

func (*StreamConfiguration) UnmarshalParcel

func (s *StreamConfiguration) UnmarshalParcel(
	p *parcel.Parcel,
) error

type StreamConfigurationMode

type StreamConfigurationMode int32
const (
	StreamConfigurationModeNormalMode               StreamConfigurationMode = 0
	StreamConfigurationModeConstrainedHighSpeedMode StreamConfigurationMode = 1
	StreamConfigurationModeVendorMode0              StreamConfigurationMode = 32768
	StreamConfigurationModeVendorMode1              StreamConfigurationMode = 32769
	StreamConfigurationModeVendorMode2              StreamConfigurationMode = 32770
	StreamConfigurationModeVendorMode3              StreamConfigurationMode = 32771
	StreamConfigurationModeVendorMode4              StreamConfigurationMode = 32772
	StreamConfigurationModeVendorMode5              StreamConfigurationMode = 32773
	StreamConfigurationModeVendorMode6              StreamConfigurationMode = 32774
	StreamConfigurationModeVendorMode7              StreamConfigurationMode = 32775
)

type StreamRotation

type StreamRotation int32
const (
	StreamRotationRotation0   StreamRotation = 0
	StreamRotationRotation90  StreamRotation = 1
	StreamRotationRotation180 StreamRotation = 2
	StreamRotationRotation270 StreamRotation = 3
)

type StreamType

type StreamType int32
const (
	StreamTypeOUTPUT StreamType = 0
	StreamTypeINPUT  StreamType = 1
)

Jump to

Keyboard shortcuts

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