device

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatePlaying   = "PLAYING"
	StateBuffering = "BUFFERING"
	StateIdle      = "IDLE"
	StateAd        = 1081

	NoMutedSegment   = -1
	NoSkippedSegment = -1
)

Variables

View Source
var ErrDeviceNotFound = errors.New("device not found")
View Source
var ErrMissingCapabilities = errors.New("capabilities not found")

Functions

func BeginDiscover added in v0.1.0

func BeginDiscover(ctx context.Context) (<-chan castdns.CastEntry, error)

func DiscoverCastDNSEntries

func DiscoverCastDNSEntries(ctx context.Context, iface *net.Interface, ch chan castdns.CastEntry) error

func DiscoverCastDNSEntryByUuid

func DiscoverCastDNSEntryByUuid(ctx context.Context, uuid string) (castdns.CastEntry, error)

func HasVideoOut added in v0.2.0

func HasVideoOut(entry dns.CastEntry) (bool, error)

Types

type Capability added in v0.2.0

type Capability uint8
const (
	VideoOut Capability = 1 << iota
	VideoIn
	AudioOut
	AudioIn
	DevMode
)

func (*Capability) UnmarshalString added in v0.2.0

func (c *Capability) UnmarshalString(s string) error

type Device added in v0.4.0

type Device struct {
	// contains filtered or unexported fields
}

func NewDevice added in v0.4.0

func NewDevice(entry castdns.CastEntry, opts ...Option) *Device

func (*Device) BeginTick added in v0.4.0

func (d *Device) BeginTick(opts ...application.ApplicationOption) error

func (*Device) Close added in v0.4.0

func (d *Device) Close() error

type Option added in v0.4.1

type Option func(device *Device)

func WithContext added in v0.4.1

func WithContext(ctx context.Context) Option

type VideoMeta added in v0.5.4

type VideoMeta struct {
	CurrVideoId string
	CurrArtist  string
	CurrTitle   string

	PrevVideoId string
	PrevArtist  string
	PrevTitle   string
}

func (*VideoMeta) Clear added in v0.5.4

func (v *VideoMeta) Clear()

func (VideoMeta) Empty added in v0.5.4

func (v VideoMeta) Empty() bool

func (VideoMeta) SameVideo added in v0.5.4

func (v VideoMeta) SameVideo() bool

Jump to

Keyboard shortcuts

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