Documentation
¶
Index ¶
- Constants
- type CableConnectionStatus
- type ITvInput
- type ITvInputCallback
- type ITvInputCallbackServer
- type ITvInputServer
- type TvInputCallbackProxy
- type TvInputCallbackStub
- type TvInputDeviceInfo
- type TvInputEvent
- type TvInputEventType
- type TvInputProxy
- func (p *TvInputProxy) AsBinder() binder.IBinder
- func (p *TvInputProxy) CloseStream(ctx context.Context, deviceId int32, streamId int32) error
- func (p *TvInputProxy) GetStreamConfigurations(ctx context.Context, deviceId int32) ([]TvStreamConfig, error)
- func (p *TvInputProxy) GetTvMessageQueueDesc(ctx context.Context, queue fmq.MQDescriptor, deviceId int32, streamId int32) error
- func (p *TvInputProxy) OpenStream(ctx context.Context, deviceId int32, streamId int32) (common.NativeHandle, error)
- func (p *TvInputProxy) SetCallback(ctx context.Context, callback ITvInputCallback) error
- func (p *TvInputProxy) SetTvMessageEnabled(ctx context.Context, deviceId int32, streamId int32, type_ TvMessageEventType, ...) error
- type TvInputStub
- type TvInputType
- type TvMessage
- type TvMessageEvent
- type TvMessageEventType
- type TvStreamConfig
Constants ¶
const ( TransactionITvInputCloseStream = binder.FirstCallTransaction + 0 TransactionITvInputGetStreamConfigurations = binder.FirstCallTransaction + 1 TransactionITvInputOpenStream = binder.FirstCallTransaction + 2 TransactionITvInputSetCallback = binder.FirstCallTransaction + 3 TransactionITvInputSetTvMessageEnabled = binder.FirstCallTransaction + 4 TransactionITvInputGetTvMessageQueueDesc = binder.FirstCallTransaction + 5 )
const ( MethodITvInputCloseStream = "closeStream" MethodITvInputGetStreamConfigurations = "getStreamConfigurations" MethodITvInputOpenStream = "openStream" MethodITvInputSetCallback = "setCallback" MethodITvInputSetTvMessageEnabled = "setTvMessageEnabled" MethodITvInputGetTvMessageQueueDesc = "getTvMessageQueueDesc" )
const ( ITvInputStatusUnknown int32 = 1 ITvInputStatusNoResource int32 = 2 ITvInputStatusInvalidArguments int32 = 3 ITvInputStatusInvalidState int32 = 4 )
const ( TransactionITvInputCallbackNotify = binder.FirstCallTransaction + 0 TransactionITvInputCallbackNotifyTvMessageEvent = binder.FirstCallTransaction + 1 )
const ( MethodITvInputCallbackNotify = "notify" MethodITvInputCallbackNotifyTvMessageEvent = "notifyTvMessageEvent" )
const DescriptorITvInput = "android.hardware.tv.input.ITvInput"
const DescriptorITvInputCallback = "android.hardware.tv.input.ITvInputCallback"
const (
TvMessageNoGroupId int64 = -1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CableConnectionStatus ¶
type CableConnectionStatus int32
const ( CableConnectionStatusUNKNOWN CableConnectionStatus = 0 CableConnectionStatusCONNECTED CableConnectionStatus = 1 CableConnectionStatusDISCONNECTED CableConnectionStatus = 2 )
type ITvInput ¶
type ITvInput interface {
AsBinder() binder.IBinder
CloseStream(ctx context.Context, deviceId int32, streamId int32) error
GetStreamConfigurations(ctx context.Context, deviceId int32) ([]TvStreamConfig, error)
OpenStream(ctx context.Context, deviceId int32, streamId int32) (common.NativeHandle, error)
SetCallback(ctx context.Context, callback ITvInputCallback) error
SetTvMessageEnabled(ctx context.Context, deviceId int32, streamId int32, type_ TvMessageEventType, enabled bool) error
GetTvMessageQueueDesc(ctx context.Context, queue fmq.MQDescriptor, deviceId int32, streamId int32) error
}
func NewTvInputStub ¶
func NewTvInputStub( impl ITvInputServer, ) ITvInput
NewTvInputStub creates a server-side ITvInput wrapping the given server implementation. The returned value satisfies ITvInput 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 ITvInputCallback ¶
type ITvInputCallback interface {
AsBinder() binder.IBinder
Notify(ctx context.Context, event TvInputEvent) error
NotifyTvMessageEvent(ctx context.Context, event TvMessageEvent) error
}
func NewTvInputCallbackStub ¶
func NewTvInputCallbackStub( impl ITvInputCallbackServer, ) ITvInputCallback
NewTvInputCallbackStub creates a server-side ITvInputCallback wrapping the given server implementation. The returned value satisfies ITvInputCallback 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 ITvInputCallbackServer ¶
type ITvInputCallbackServer interface {
Notify(ctx context.Context, event TvInputEvent) error
NotifyTvMessageEvent(ctx context.Context, event TvMessageEvent) error
}
ITvInputCallbackServer is the server-side interface that user implementations provide to NewTvInputCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type ITvInputServer ¶
type ITvInputServer interface {
CloseStream(ctx context.Context, deviceId int32, streamId int32) error
GetStreamConfigurations(ctx context.Context, deviceId int32) ([]TvStreamConfig, error)
OpenStream(ctx context.Context, deviceId int32, streamId int32) (common.NativeHandle, error)
SetCallback(ctx context.Context, callback ITvInputCallback) error
SetTvMessageEnabled(ctx context.Context, deviceId int32, streamId int32, type_ TvMessageEventType, enabled bool) error
GetTvMessageQueueDesc(ctx context.Context, queue fmq.MQDescriptor, deviceId int32, streamId int32) error
}
ITvInputServer is the server-side interface that user implementations provide to NewTvInputStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type TvInputCallbackProxy ¶
func NewTvInputCallbackProxy ¶
func NewTvInputCallbackProxy( remote binder.IBinder, ) *TvInputCallbackProxy
func (*TvInputCallbackProxy) AsBinder ¶
func (p *TvInputCallbackProxy) AsBinder() binder.IBinder
func (*TvInputCallbackProxy) Notify ¶
func (p *TvInputCallbackProxy) Notify( ctx context.Context, event TvInputEvent, ) error
func (*TvInputCallbackProxy) NotifyTvMessageEvent ¶
func (p *TvInputCallbackProxy) NotifyTvMessageEvent( ctx context.Context, event TvMessageEvent, ) error
type TvInputCallbackStub ¶
type TvInputCallbackStub struct {
Impl ITvInputCallback
Transport binder.VersionAwareTransport
}
TvInputCallbackStub dispatches incoming binder transactions to a typed ITvInputCallback implementation.
func (*TvInputCallbackStub) Descriptor ¶
func (s *TvInputCallbackStub) Descriptor() string
func (*TvInputCallbackStub) OnTransaction ¶
func (s *TvInputCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type TvInputDeviceInfo ¶
type TvInputDeviceInfo struct {
DeviceId int32
Type TvInputType
PortId int32
CableConnectionStatus CableConnectionStatus
AudioDevice common.AudioDevice
}
func (*TvInputDeviceInfo) MarshalParcel ¶
func (s *TvInputDeviceInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*TvInputDeviceInfo) UnmarshalParcel ¶
func (s *TvInputDeviceInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type TvInputEvent ¶
type TvInputEvent struct {
Type TvInputEventType
DeviceInfo TvInputDeviceInfo
}
func (*TvInputEvent) MarshalParcel ¶
func (s *TvInputEvent) MarshalParcel( p *parcel.Parcel, ) error
func (*TvInputEvent) UnmarshalParcel ¶
func (s *TvInputEvent) UnmarshalParcel( p *parcel.Parcel, ) error
type TvInputEventType ¶
type TvInputEventType int32
const ( TvInputEventTypeDeviceAvailable TvInputEventType = 1 TvInputEventTypeStreamConfigurationsChanged TvInputEventType = 3 )
type TvInputProxy ¶
func NewTvInputProxy ¶
func NewTvInputProxy( remote binder.IBinder, ) *TvInputProxy
func (*TvInputProxy) AsBinder ¶
func (p *TvInputProxy) AsBinder() binder.IBinder
func (*TvInputProxy) CloseStream ¶
func (*TvInputProxy) GetStreamConfigurations ¶
func (p *TvInputProxy) GetStreamConfigurations( ctx context.Context, deviceId int32, ) ([]TvStreamConfig, error)
func (*TvInputProxy) GetTvMessageQueueDesc ¶
func (p *TvInputProxy) GetTvMessageQueueDesc( ctx context.Context, queue fmq.MQDescriptor, deviceId int32, streamId int32, ) error
func (*TvInputProxy) OpenStream ¶
func (p *TvInputProxy) OpenStream( ctx context.Context, deviceId int32, streamId int32, ) (common.NativeHandle, error)
func (*TvInputProxy) SetCallback ¶
func (p *TvInputProxy) SetCallback( ctx context.Context, callback ITvInputCallback, ) error
func (*TvInputProxy) SetTvMessageEnabled ¶
func (p *TvInputProxy) SetTvMessageEnabled( ctx context.Context, deviceId int32, streamId int32, type_ TvMessageEventType, enabled bool, ) error
type TvInputStub ¶
type TvInputStub struct {
Impl ITvInput
Transport binder.VersionAwareTransport
}
TvInputStub dispatches incoming binder transactions to a typed ITvInput implementation.
func (*TvInputStub) Descriptor ¶
func (s *TvInputStub) Descriptor() string
func (*TvInputStub) OnTransaction ¶
func (s *TvInputStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type TvInputType ¶
type TvInputType int32
const ( TvInputTypeOTHER TvInputType = 1 TvInputTypeTUNER TvInputType = 2 TvInputTypeCOMPOSITE TvInputType = 3 TvInputTypeSVIDEO TvInputType = 4 TvInputTypeSCART TvInputType = 5 TvInputTypeCOMPONENT TvInputType = 6 TvInputTypeVGA TvInputType = 7 TvInputTypeDVI TvInputType = 8 TvInputTypeHDMI TvInputType = 9 TvInputTypeDisplayPort TvInputType = 10 )
type TvMessageEvent ¶
type TvMessageEvent struct {
Type TvMessageEventType
StreamId int32
Messages []TvMessage
DeviceId int32
}
func (*TvMessageEvent) MarshalParcel ¶
func (s *TvMessageEvent) MarshalParcel( p *parcel.Parcel, ) error
func (*TvMessageEvent) UnmarshalParcel ¶
func (s *TvMessageEvent) UnmarshalParcel( p *parcel.Parcel, ) error
type TvMessageEventType ¶
type TvMessageEventType int32
const ( TvMessageEventTypeWATERMARK TvMessageEventType = 1 TvMessageEventTypeClosedCaption TvMessageEventType = 2 TvMessageEventTypeOTHER TvMessageEventType = 1000 )
type TvStreamConfig ¶
func (*TvStreamConfig) MarshalParcel ¶
func (s *TvStreamConfig) MarshalParcel( p *parcel.Parcel, ) error
func (*TvStreamConfig) UnmarshalParcel ¶
func (s *TvStreamConfig) UnmarshalParcel( p *parcel.Parcel, ) error