Documentation
¶
Index ¶
- Constants
- type AccessorProxy
- type AccessorStub
- type Buffer
- type BufferInvalidationMessage
- type BufferStatus
- type BufferStatusMessage
- type ClientManagerProxy
- func (p *ClientManagerProxy) AsBinder() binder.IBinder
- func (p *ClientManagerProxy) RegisterPassiveSender(ctx context.Context, bufferPool IAccessor) (IClientManagerRegistration, error)
- func (p *ClientManagerProxy) RegisterSender(ctx context.Context, bufferPool IAccessor) (IClientManagerRegistration, error)
- type ClientManagerStub
- type ConnectionProxy
- type ConnectionStub
- type IAccessor
- type IAccessorConnectionInfo
- type IAccessorServer
- type IClientManager
- type IClientManagerRegistration
- type IClientManagerServer
- type IConnection
- type IConnectionFetchInfo
- type IConnectionFetchResult
- func (u *IConnectionFetchResult) GetBuffer() (Buffer, bool)
- func (u *IConnectionFetchResult) GetFailure() (int32, bool)
- func (u *IConnectionFetchResult) MarshalParcel(p *parcel.Parcel) error
- func (u *IConnectionFetchResult) SetBuffer(v Buffer)
- func (u *IConnectionFetchResult) SetFailure(v int32)
- func (u *IConnectionFetchResult) UnmarshalParcel(p *parcel.Parcel) error
- type IConnectionServer
- type IObserver
- type IObserverServer
- type ObserverProxy
- type ObserverStub
- type ResultStatus
Constants ¶
const ( TransactionIClientManagerRegisterSender = binder.FirstCallTransaction + 0 TransactionIClientManagerRegisterPassiveSender = binder.FirstCallTransaction + 1 )
const ( MethodIClientManagerRegisterSender = "registerSender" MethodIClientManagerRegisterPassiveSender = "registerPassiveSender" )
const ( IConnectionFetchResultTagBuffer int32 = 0 IConnectionFetchResultTagFailure int32 = 1 )
const ( TransactionIConnectionFetch = binder.FirstCallTransaction + 0 TransactionIConnectionSync = binder.FirstCallTransaction + 1 )
const ( MethodIConnectionFetch = "fetch" MethodIConnectionSync = "sync" )
const ( ResultStatusOK int32 = 0 ResultStatusNoMemory int32 = 1 ResultStatusAlreadyExists int32 = 2 ResultStatusNotFound int32 = 3 ResultStatusCriticalError int32 = 4 )
const DescriptorIAccessor = "android.hardware.media.bufferpool2.IAccessor"
const DescriptorIClientManager = "android.hardware.media.bufferpool2.IClientManager"
const DescriptorIConnection = "android.hardware.media.bufferpool2.IConnection"
const DescriptorIObserver = "android.hardware.media.bufferpool2.IObserver"
const (
MethodIAccessorConnect = "connect"
)
const (
MethodIObserverOnMessage = "onMessage"
)
const (
TransactionIAccessorConnect = binder.FirstCallTransaction + 0
)
const (
TransactionIObserverOnMessage = binder.FirstCallTransaction + 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessorProxy ¶
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
}
type BufferInvalidationMessage ¶
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 ¶
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 ¶
func NewConnectionProxy ¶
func NewConnectionProxy( remote binder.IBinder, ) *ConnectionProxy
func (*ConnectionProxy) AsBinder ¶
func (p *ConnectionProxy) AsBinder() binder.IBinder
func (*ConnectionProxy) Fetch ¶
func (p *ConnectionProxy) Fetch( ctx context.Context, fetchInfos []IConnectionFetchInfo, ) ([]IConnectionFetchResult, 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 ¶
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 ¶
func (*IConnectionFetchInfo) MarshalParcel ¶
func (s *IConnectionFetchInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*IConnectionFetchInfo) UnmarshalParcel ¶
func (s *IConnectionFetchInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type IConnectionFetchResult ¶
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 ¶
func NewObserverProxy ¶
func NewObserverProxy( remote binder.IBinder, ) *ObserverProxy
func (*ObserverProxy) AsBinder ¶
func (p *ObserverProxy) AsBinder() binder.IBinder
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