Documentation
¶
Index ¶
- Constants
- type Format
- type IVirtualCameraCallback
- type IVirtualCameraCallbackServer
- type IVirtualCameraService
- type IVirtualCameraServiceServer
- type LensFacing
- type SensorOrientation
- type SupportedStreamConfiguration
- type VirtualCameraCallbackProxy
- func (p *VirtualCameraCallbackProxy) AsBinder() binder.IBinder
- func (p *VirtualCameraCallbackProxy) OnProcessCaptureRequest(ctx context.Context, streamId int32, frameId int32) error
- func (p *VirtualCameraCallbackProxy) OnStreamClosed(ctx context.Context, streamId int32) error
- func (p *VirtualCameraCallbackProxy) OnStreamConfigured(ctx context.Context, streamId int32, surface view.Surface, width int32, ...) error
- type VirtualCameraCallbackStub
- type VirtualCameraConfiguration
- type VirtualCameraServiceProxy
- func (p *VirtualCameraServiceProxy) AsBinder() binder.IBinder
- func (p *VirtualCameraServiceProxy) GetCameraId(ctx context.Context, token binder.IBinder) (int32, error)
- func (p *VirtualCameraServiceProxy) RegisterCamera(ctx context.Context, token binder.IBinder, ...) (bool, error)
- func (p *VirtualCameraServiceProxy) UnregisterCamera(ctx context.Context, token binder.IBinder) error
- type VirtualCameraServiceStub
Constants ¶
const ( TransactionIVirtualCameraCallbackOnStreamConfigured = binder.FirstCallTransaction + 0 TransactionIVirtualCameraCallbackOnProcessCaptureRequest = binder.FirstCallTransaction + 1 TransactionIVirtualCameraCallbackOnStreamClosed = binder.FirstCallTransaction + 2 )
const ( MethodIVirtualCameraCallbackOnStreamConfigured = "onStreamConfigured" MethodIVirtualCameraCallbackOnProcessCaptureRequest = "onProcessCaptureRequest" MethodIVirtualCameraCallbackOnStreamClosed = "onStreamClosed" )
const ( TransactionIVirtualCameraServiceRegisterCamera = binder.FirstCallTransaction + 0 TransactionIVirtualCameraServiceUnregisterCamera = binder.FirstCallTransaction + 1 TransactionIVirtualCameraServiceGetCameraId = binder.FirstCallTransaction + 2 )
const ( MethodIVirtualCameraServiceRegisterCamera = "registerCamera" MethodIVirtualCameraServiceUnregisterCamera = "unregisterCamera" MethodIVirtualCameraServiceGetCameraId = "getCameraId" )
const DescriptorIVirtualCameraCallback = "android.companion.virtualcamera.IVirtualCameraCallback"
const DescriptorIVirtualCameraService = "android.companion.virtualcamera.IVirtualCameraService"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IVirtualCameraCallback ¶
type IVirtualCameraCallback interface {
AsBinder() binder.IBinder
OnStreamConfigured(ctx context.Context, streamId int32, surface view.Surface, width int32, height int32, pixelFormat Format) error
OnProcessCaptureRequest(ctx context.Context, streamId int32, frameId int32) error
OnStreamClosed(ctx context.Context, streamId int32) error
}
func NewVirtualCameraCallbackStub ¶
func NewVirtualCameraCallbackStub( impl IVirtualCameraCallbackServer, ) IVirtualCameraCallback
NewVirtualCameraCallbackStub creates a server-side IVirtualCameraCallback wrapping the given server implementation. The returned value satisfies IVirtualCameraCallback 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 IVirtualCameraCallbackServer ¶
type IVirtualCameraCallbackServer interface {
OnStreamConfigured(ctx context.Context, streamId int32, surface view.Surface, width int32, height int32, pixelFormat Format) error
OnProcessCaptureRequest(ctx context.Context, streamId int32, frameId int32) error
OnStreamClosed(ctx context.Context, streamId int32) error
}
IVirtualCameraCallbackServer is the server-side interface that user implementations provide to NewVirtualCameraCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IVirtualCameraService ¶
type IVirtualCameraService interface {
AsBinder() binder.IBinder
RegisterCamera(ctx context.Context, token binder.IBinder, configuration VirtualCameraConfiguration) (bool, error)
UnregisterCamera(ctx context.Context, token binder.IBinder) error
GetCameraId(ctx context.Context, token binder.IBinder) (int32, error)
}
func NewVirtualCameraServiceStub ¶
func NewVirtualCameraServiceStub( impl IVirtualCameraServiceServer, ) IVirtualCameraService
NewVirtualCameraServiceStub creates a server-side IVirtualCameraService wrapping the given server implementation. The returned value satisfies IVirtualCameraService 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 IVirtualCameraServiceServer ¶
type IVirtualCameraServiceServer interface {
RegisterCamera(ctx context.Context, token binder.IBinder, configuration VirtualCameraConfiguration) (bool, error)
UnregisterCamera(ctx context.Context, token binder.IBinder) error
GetCameraId(ctx context.Context, token binder.IBinder) (int32, error)
}
IVirtualCameraServiceServer is the server-side interface that user implementations provide to NewVirtualCameraServiceStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type LensFacing ¶
type LensFacing int32
const ( LensFacingFRONT LensFacing = 0 LensFacingBACK LensFacing = 1 LensFacingEXTERNAL LensFacing = 2 )
type SensorOrientation ¶
type SensorOrientation int32
const ( SensorOrientationOrientation0 SensorOrientation = 0 SensorOrientationOrientation90 SensorOrientation = 90 SensorOrientationOrientation180 SensorOrientation = 180 SensorOrientationOrientation270 SensorOrientation = 270 )
type SupportedStreamConfiguration ¶
type SupportedStreamConfiguration struct {
Width int32
Height int32
PixelFormat Format
MaxFps int32
}
func (*SupportedStreamConfiguration) MarshalParcel ¶
func (s *SupportedStreamConfiguration) MarshalParcel( p *parcel.Parcel, ) error
func (*SupportedStreamConfiguration) UnmarshalParcel ¶
func (s *SupportedStreamConfiguration) UnmarshalParcel( p *parcel.Parcel, ) error
type VirtualCameraCallbackProxy ¶
func NewVirtualCameraCallbackProxy ¶
func NewVirtualCameraCallbackProxy( remote binder.IBinder, ) *VirtualCameraCallbackProxy
func (*VirtualCameraCallbackProxy) AsBinder ¶
func (p *VirtualCameraCallbackProxy) AsBinder() binder.IBinder
func (*VirtualCameraCallbackProxy) OnProcessCaptureRequest ¶
func (*VirtualCameraCallbackProxy) OnStreamClosed ¶
func (p *VirtualCameraCallbackProxy) OnStreamClosed( ctx context.Context, streamId int32, ) error
type VirtualCameraCallbackStub ¶
type VirtualCameraCallbackStub struct {
Impl IVirtualCameraCallback
Transport binder.VersionAwareTransport
}
VirtualCameraCallbackStub dispatches incoming binder transactions to a typed IVirtualCameraCallback implementation.
func (*VirtualCameraCallbackStub) Descriptor ¶
func (s *VirtualCameraCallbackStub) Descriptor() string
func (*VirtualCameraCallbackStub) OnTransaction ¶
func (s *VirtualCameraCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type VirtualCameraConfiguration ¶
type VirtualCameraConfiguration struct {
SupportedStreamConfigs []SupportedStreamConfiguration
VirtualCameraCallback IVirtualCameraCallback
SensorOrientation SensorOrientation
LensFacing LensFacing
}
func (*VirtualCameraConfiguration) MarshalParcel ¶
func (s *VirtualCameraConfiguration) MarshalParcel( p *parcel.Parcel, ) error
func (*VirtualCameraConfiguration) UnmarshalParcel ¶
func (s *VirtualCameraConfiguration) UnmarshalParcel( p *parcel.Parcel, ) error
type VirtualCameraServiceProxy ¶
func NewVirtualCameraServiceProxy ¶
func NewVirtualCameraServiceProxy( remote binder.IBinder, ) *VirtualCameraServiceProxy
func (*VirtualCameraServiceProxy) AsBinder ¶
func (p *VirtualCameraServiceProxy) AsBinder() binder.IBinder
func (*VirtualCameraServiceProxy) GetCameraId ¶
func (*VirtualCameraServiceProxy) RegisterCamera ¶
func (p *VirtualCameraServiceProxy) RegisterCamera( ctx context.Context, token binder.IBinder, configuration VirtualCameraConfiguration, ) (bool, error)
func (*VirtualCameraServiceProxy) UnregisterCamera ¶
type VirtualCameraServiceStub ¶
type VirtualCameraServiceStub struct {
Impl IVirtualCameraService
Transport binder.VersionAwareTransport
}
VirtualCameraServiceStub dispatches incoming binder transactions to a typed IVirtualCameraService implementation.
func (*VirtualCameraServiceStub) Descriptor ¶
func (s *VirtualCameraServiceStub) Descriptor() string
func (*VirtualCameraServiceStub) OnTransaction ¶
func (s *VirtualCameraServiceStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)