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

input

package
v0.0.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
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
)
View Source
const (
	MethodITvInputCloseStream             = "closeStream"
	MethodITvInputGetStreamConfigurations = "getStreamConfigurations"
	MethodITvInputOpenStream              = "openStream"
	MethodITvInputSetCallback             = "setCallback"
	MethodITvInputSetTvMessageEnabled     = "setTvMessageEnabled"
	MethodITvInputGetTvMessageQueueDesc   = "getTvMessageQueueDesc"
)
View Source
const (
	ITvInputStatusUnknown          int32 = 1
	ITvInputStatusNoResource       int32 = 2
	ITvInputStatusInvalidArguments int32 = 3
	ITvInputStatusInvalidState     int32 = 4
)
View Source
const (
	TransactionITvInputCallbackNotify               = binder.FirstCallTransaction + 0
	TransactionITvInputCallbackNotifyTvMessageEvent = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodITvInputCallbackNotify               = "notify"
	MethodITvInputCallbackNotifyTvMessageEvent = "notifyTvMessageEvent"
)
View Source
const DescriptorITvInput = "android.hardware.tv.input.ITvInput"
View Source
const DescriptorITvInputCallback = "android.hardware.tv.input.ITvInputCallback"
View Source
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

type TvInputCallbackProxy struct {
	Remote binder.IBinder
}

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
	TvInputEventTypeDeviceUnavailable           TvInputEventType = 2
	TvInputEventTypeStreamConfigurationsChanged TvInputEventType = 3
)

type TvInputProxy

type TvInputProxy struct {
	Remote binder.IBinder
}

func NewTvInputProxy

func NewTvInputProxy(
	remote binder.IBinder,
) *TvInputProxy

func (*TvInputProxy) AsBinder

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

func (*TvInputProxy) CloseStream

func (p *TvInputProxy) CloseStream(
	ctx context.Context,
	deviceId int32,
	streamId int32,
) error

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 TvMessage

type TvMessage struct {
	SubType         string
	GroupId         int64
	DataLengthBytes int32
}

func (*TvMessage) MarshalParcel

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

func (*TvMessage) UnmarshalParcel

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

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

type TvStreamConfig struct {
	StreamId       int32
	MaxVideoWidth  int32
	MaxVideoHeight int32
}

func (*TvStreamConfig) MarshalParcel

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

func (*TvStreamConfig) UnmarshalParcel

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

Jump to

Keyboard shortcuts

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