Help us shape the future of Go! Take the 2026 Go Developer Survey

bufferpool2

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIClientManagerRegisterSender        = binder.FirstCallTransaction + 0
	TransactionIClientManagerRegisterPassiveSender = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIClientManagerRegisterSender        = "registerSender"
	MethodIClientManagerRegisterPassiveSender = "registerPassiveSender"
)
View Source
const (
	IConnectionFetchResultTagBuffer  int32 = 0
	IConnectionFetchResultTagFailure int32 = 1
)
View Source
const (
	TransactionIConnectionFetch = binder.FirstCallTransaction + 0
	TransactionIConnectionSync  = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIConnectionFetch = "fetch"
	MethodIConnectionSync  = "sync"
)
View Source
const (
	ResultStatusOK            int32 = 0
	ResultStatusNoMemory      int32 = 1
	ResultStatusAlreadyExists int32 = 2
	ResultStatusNotFound      int32 = 3
	ResultStatusCriticalError int32 = 4
)
View Source
const DescriptorIAccessor = "android.hardware.media.bufferpool2.IAccessor"
View Source
const DescriptorIClientManager = "android.hardware.media.bufferpool2.IClientManager"
View Source
const DescriptorIConnection = "android.hardware.media.bufferpool2.IConnection"
View Source
const DescriptorIObserver = "android.hardware.media.bufferpool2.IObserver"
View Source
const (
	MethodIAccessorConnect = "connect"
)
View Source
const (
	MethodIObserverOnMessage = "onMessage"
)
View Source
const (
	TransactionIAccessorConnect = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIObserverOnMessage = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessorProxy

type AccessorProxy struct {
	Remote binder.IBinder
}

func NewAccessorProxy

func NewAccessorProxy(
	remote binder.IBinder,
) *AccessorProxy

func (*AccessorProxy) AsBinder

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

func (*AccessorProxy) Connect

func (p *AccessorProxy) Connect(
	ctx context.Context,
	observer IObserver,
) (IAccessorConnectionInfo, error)

type AccessorStub

type AccessorStub struct {
	Impl      IAccessor
	Transport binder.VersionAwareTransport
}

AccessorStub dispatches incoming binder transactions to a typed IAccessor implementation.

func (*AccessorStub) Descriptor

func (s *AccessorStub) Descriptor() string

func (*AccessorStub) OnTransaction

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

type Buffer

type Buffer struct {
	Id        int32
	Buffer    *common.NativeHandle
	HwbBuffer *graphicsCommon.HardwareBuffer
}

func (*Buffer) MarshalParcel

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

func (*Buffer) UnmarshalParcel

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

type BufferInvalidationMessage

type BufferInvalidationMessage struct {
	MessageId    int32
	FromBufferId int32
	ToBufferId   int32
}

func (*BufferInvalidationMessage) MarshalParcel

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

func (*BufferInvalidationMessage) UnmarshalParcel

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

type BufferStatus

type BufferStatus int32
const (
	BufferStatusNotUsed         BufferStatus = 0
	BufferStatusUSED            BufferStatus = 1
	BufferStatusTransferTo      BufferStatus = 2
	BufferStatusTransferFrom    BufferStatus = 3
	BufferStatusTransferTimeout BufferStatus = 4
	BufferStatusTransferLost    BufferStatus = 5
	BufferStatusTransferFetch   BufferStatus = 6
	BufferStatusTransferOk      BufferStatus = 7
	BufferStatusTransferError   BufferStatus = 8
	BufferStatusInvalidationAck BufferStatus = 9
)

type BufferStatusMessage

type BufferStatusMessage struct {
	TransactionId      int64
	BufferId           int32
	Status             BufferStatus
	ConnectionId       int64
	TargetConnectionId int64
	TimestampUs        int64
}

func (*BufferStatusMessage) MarshalParcel

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

func (*BufferStatusMessage) UnmarshalParcel

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

type ClientManagerProxy

type ClientManagerProxy struct {
	Remote binder.IBinder
}

func NewClientManagerProxy

func NewClientManagerProxy(
	remote binder.IBinder,
) *ClientManagerProxy

func (*ClientManagerProxy) AsBinder

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

func (*ClientManagerProxy) RegisterPassiveSender

func (p *ClientManagerProxy) RegisterPassiveSender(
	ctx context.Context,
	bufferPool IAccessor,
) (IClientManagerRegistration, error)

func (*ClientManagerProxy) RegisterSender

func (p *ClientManagerProxy) RegisterSender(
	ctx context.Context,
	bufferPool IAccessor,
) (IClientManagerRegistration, error)

type ClientManagerStub

type ClientManagerStub struct {
	Impl      IClientManager
	Transport binder.VersionAwareTransport
}

ClientManagerStub dispatches incoming binder transactions to a typed IClientManager implementation.

func (*ClientManagerStub) Descriptor

func (s *ClientManagerStub) Descriptor() string

func (*ClientManagerStub) OnTransaction

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

type ConnectionProxy

type ConnectionProxy struct {
	Remote binder.IBinder
}

func NewConnectionProxy

func NewConnectionProxy(
	remote binder.IBinder,
) *ConnectionProxy

func (*ConnectionProxy) AsBinder

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

func (*ConnectionProxy) Fetch

func (*ConnectionProxy) Sync

func (p *ConnectionProxy) Sync(
	ctx context.Context,
) error

type ConnectionStub

type ConnectionStub struct {
	Impl      IConnection
	Transport binder.VersionAwareTransport
}

ConnectionStub dispatches incoming binder transactions to a typed IConnection implementation.

func (*ConnectionStub) Descriptor

func (s *ConnectionStub) Descriptor() string

func (*ConnectionStub) OnTransaction

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

type IAccessor

type IAccessor interface {
	AsBinder() binder.IBinder
	Connect(ctx context.Context, observer IObserver) (IAccessorConnectionInfo, error)
}

func NewAccessorStub

func NewAccessorStub(
	impl IAccessorServer,
) IAccessor

NewAccessorStub creates a server-side IAccessor wrapping the given server implementation. The returned value satisfies IAccessor 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 IAccessorConnectionInfo

type IAccessorConnectionInfo struct {
	Connection   IConnection
	ConnectionId int64
	MsgId        int32
	ToFmqDesc    fmq.MQDescriptor
	FromFmqDesc  fmq.MQDescriptor
}

func (*IAccessorConnectionInfo) MarshalParcel

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

func (*IAccessorConnectionInfo) UnmarshalParcel

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

type IAccessorServer

type IAccessorServer interface {
	Connect(ctx context.Context, observer IObserver) (IAccessorConnectionInfo, error)
}

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

type IClientManager

type IClientManager interface {
	AsBinder() binder.IBinder
	RegisterSender(ctx context.Context, bufferPool IAccessor) (IClientManagerRegistration, error)
	RegisterPassiveSender(ctx context.Context, bufferPool IAccessor) (IClientManagerRegistration, error)
}

func NewClientManagerStub

func NewClientManagerStub(
	impl IClientManagerServer,
) IClientManager

NewClientManagerStub creates a server-side IClientManager wrapping the given server implementation. The returned value satisfies IClientManager 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 IClientManagerRegistration

type IClientManagerRegistration struct {
	ConnectionId int64
	IsNew        bool
}

func (*IClientManagerRegistration) MarshalParcel

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

func (*IClientManagerRegistration) UnmarshalParcel

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

type IClientManagerServer

type IClientManagerServer interface {
	RegisterSender(ctx context.Context, bufferPool IAccessor) (IClientManagerRegistration, error)
	RegisterPassiveSender(ctx context.Context, bufferPool IAccessor) (IClientManagerRegistration, error)
}

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

type IConnection

type IConnection interface {
	AsBinder() binder.IBinder
	Fetch(ctx context.Context, fetchInfos []IConnectionFetchInfo) ([]IConnectionFetchResult, error)
	Sync(ctx context.Context) error
}

func NewConnectionStub

func NewConnectionStub(
	impl IConnectionServer,
) IConnection

NewConnectionStub creates a server-side IConnection wrapping the given server implementation. The returned value satisfies IConnection 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 IConnectionFetchInfo

type IConnectionFetchInfo struct {
	TransactionId int64
	BufferId      int32
}

func (*IConnectionFetchInfo) MarshalParcel

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

func (*IConnectionFetchInfo) UnmarshalParcel

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

type IConnectionFetchResult

type IConnectionFetchResult struct {
	Tag     int32
	Buffer  Buffer
	Failure int32
}

func (*IConnectionFetchResult) GetBuffer

func (u *IConnectionFetchResult) GetBuffer() (Buffer, bool)

func (*IConnectionFetchResult) GetFailure

func (u *IConnectionFetchResult) GetFailure() (int32, bool)

func (*IConnectionFetchResult) MarshalParcel

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

func (*IConnectionFetchResult) SetBuffer

func (u *IConnectionFetchResult) SetBuffer(
	v Buffer,
)

func (*IConnectionFetchResult) SetFailure

func (u *IConnectionFetchResult) SetFailure(
	v int32,
)

func (*IConnectionFetchResult) UnmarshalParcel

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

type IConnectionServer

type IConnectionServer interface {
	Fetch(ctx context.Context, fetchInfos []IConnectionFetchInfo) ([]IConnectionFetchResult, error)
	Sync(ctx context.Context) error
}

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

type IObserver

type IObserver interface {
	AsBinder() binder.IBinder
	OnMessage(ctx context.Context, connectionId int64, msgId int32) error
}

func NewObserverStub

func NewObserverStub(
	impl IObserverServer,
) IObserver

NewObserverStub creates a server-side IObserver wrapping the given server implementation. The returned value satisfies IObserver 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 IObserverServer

type IObserverServer interface {
	OnMessage(ctx context.Context, connectionId int64, msgId int32) error
}

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

type ObserverProxy

type ObserverProxy struct {
	Remote binder.IBinder
}

func NewObserverProxy

func NewObserverProxy(
	remote binder.IBinder,
) *ObserverProxy

func (*ObserverProxy) AsBinder

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

func (*ObserverProxy) OnMessage

func (p *ObserverProxy) OnMessage(
	ctx context.Context,
	connectionId int64,
	msgId int32,
) error

type ObserverStub

type ObserverStub struct {
	Impl      IObserver
	Transport binder.VersionAwareTransport
}

ObserverStub dispatches incoming binder transactions to a typed IObserver implementation.

func (*ObserverStub) Descriptor

func (s *ObserverStub) Descriptor() string

func (*ObserverStub) OnTransaction

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

type ResultStatus

type ResultStatus struct {
}

func (*ResultStatus) MarshalParcel

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

func (*ResultStatus) UnmarshalParcel

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

Jump to

Keyboard shortcuts

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