types

package
v0.0.0-...-4503ccc Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: CC0-1.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppKey

type AppKey string

func StreamID2LocalAppName

func StreamID2LocalAppName(
	streamID StreamID,
) AppKey

type AppKeys

type AppKeys []AppKey

func (AppKeys) Strings

func (s AppKeys) Strings() []string

type BrowserOpener

type BrowserOpener interface {
	OpenURL(ctx context.Context, url string) error
}

type Config

type Config struct {
	PortServers  []streamportserver.Config            `yaml:"servers"`
	Streams      map[StreamID]*StreamConfig           `yaml:"streams"`
	Destinations map[DestinationID]*DestinationConfig `yaml:"destinations"`
	VideoPlayer  struct {
		MPV struct {
			Path string `yaml:"path"`
		} `yaml:"mpv"`
	} `yaml:"video_player"`
}

type Counter

type Counter interface {
	Count() uint64
}

type DestinationConfig

type DestinationConfig struct {
	URL       string `yaml:"url"`
	StreamKey string `yaml:"stream_key"`
}

type DestinationID

type DestinationID = streamtypes.DestinationID

type ForwardingConfig

type ForwardingConfig struct {
	Disabled bool               `yaml:"disabled,omitempty"`
	Quirks   ForwardingQuirks   `yaml:"quirks,omitempty"`
	Convert  VideoConvertConfig `yaml:"convert,omitempty"`
}

type ForwardingQuirks

type ForwardingQuirks struct {
	RestartUntilYoutubeRecognizesStream RestartUntilYoutubeRecognizesStream `yaml:"restart_until_youtube_recognizes_stream,omitempty"`
	StartAfterYoutubeRecognizedStream   StartAfterYoutubeRecognizedStream   `yaml:"start_after_youtube_recognizes_stream"`
}

type GetPortServerser

type GetPortServerser = streamportserver.GetPortServerser

type IncomingStream

type IncomingStream struct {
	StreamID StreamID

	NumBytesWrote uint64
	NumBytesRead  uint64
}

type InitConfig

type InitConfig struct {
	DefaultStreamPlayerOptions streamplayer.Options
}

type InitOption

type InitOption interface {
	// contains filtered or unexported methods
}

type InitOptionDefaultStreamPlayerOptions

type InitOptionDefaultStreamPlayerOptions streamplayer.Options

type InitOptions

type InitOptions []InitOption

func (InitOptions) Config

func (s InitOptions) Config() InitConfig

type IntPtrCounter

type IntPtrCounter struct {
	Pointer *int
}

func NewIntPtrCounter

func NewIntPtrCounter(v *int) *IntPtrCounter

func (*IntPtrCounter) Count

func (c *IntPtrCounter) Count() uint64

type NumBytesReader

type NumBytesReader interface {
	NumBytesRead() uint64
}

type NumBytesReaderWroter

type NumBytesReaderWroter interface {
	NumBytesReader
	NumBytesWroter
}

type NumBytesWroter

type NumBytesWroter interface {
	NumBytesWrote() uint64
}

type PlatformsController

type PlatformsController interface {
	CheckStreamStartedByURL(ctx context.Context, destination *url.URL) (bool, error)
	CheckStreamStartedByPlatformID(
		ctx context.Context,
		platID streamcontrol.PlatformName,
	) (bool, error)
}

type PlayerConfig

type PlayerConfig struct {
	Player         player.Backend `yaml:"player,omitempty"`
	Disabled       bool           `yaml:"disabled,omitempty"`
	StreamPlayback sptypes.Config `yaml:"stream_playback,omitempty"`
}

type Publisher

type Publisher = streamplayer.Publisher

type PubsubNameser

type PubsubNameser interface {
	PubsubNames() (AppKeys, error)
}

type ReaderWriteCloseCounter

type ReaderWriteCloseCounter struct {
	Backend      io.ReadWriteCloser
	ReadCounter  Uint64PtrCounter
	WriteCounter Uint64PtrCounter
}

func NewReaderWriterCloseCounter

func NewReaderWriterCloseCounter(
	backend io.ReadWriteCloser,
	readCountPtr, writeCountPtr *uint64,
) *ReaderWriteCloseCounter

func (*ReaderWriteCloseCounter) Close

func (h *ReaderWriteCloseCounter) Close() error

func (*ReaderWriteCloseCounter) Read

func (h *ReaderWriteCloseCounter) Read(b []byte) (int, error)

func (*ReaderWriteCloseCounter) Write

func (h *ReaderWriteCloseCounter) Write(b []byte) (int, error)

type RestartUntilYoutubeRecognizesStream

type RestartUntilYoutubeRecognizesStream struct {
	Enabled        bool          `yaml:"enabled,omitempty"`
	StartTimeout   time.Duration `yaml:"start_timeout,omitempty"`
	StopStartDelay time.Duration `yaml:"stop_start_delay,omitempty"`
}

func DefaultRestartUntilYoutubeRecognizesStreamConfig

func DefaultRestartUntilYoutubeRecognizesStreamConfig() RestartUntilYoutubeRecognizesStream

type StartAfterYoutubeRecognizedStream

type StartAfterYoutubeRecognizedStream struct {
	Enabled bool `yaml:"enabled,omitempty"`
}

func DefaultStartAfterYoutubeRecognizedStreamConfig

func DefaultStartAfterYoutubeRecognizedStreamConfig() StartAfterYoutubeRecognizedStream

type StreamConfig

type StreamConfig struct {
	Forwardings map[DestinationID]ForwardingConfig `yaml:"forwardings"`
	Player      *PlayerConfig                      `yaml:"player,omitempty"`
}

type StreamDestination

type StreamDestination struct {
	ID        DestinationID
	URL       string
	StreamKey secret.String
}

type StreamID

type StreamID = streamtypes.StreamID

type StreamPlayer

type StreamPlayer struct {
	StreamID             StreamID
	PlayerType           player.Backend
	Disabled             bool
	StreamPlaybackConfig sptypes.Config
}

type StreamPlayerConfig

type StreamPlayerConfig struct {
	DefaultStreamPlayerOptions streamplayer.Options
}

type StreamPlayerOption

type StreamPlayerOption interface {
	// contains filtered or unexported methods
}

type StreamPlayerOptionDefaultOptions

type StreamPlayerOptionDefaultOptions streamplayer.Options

type StreamPlayerOptions

type StreamPlayerOptions []StreamPlayerOption

func (StreamPlayerOptions) Config

type Sub

type Sub interface {
	io.Closer
	ClosedChan() <-chan struct{}
}

type TrafficCounter

type TrafficCounter struct {
	xsync.Mutex
	ReaderCounter Counter
	WriterCounter Counter
}

func (*TrafficCounter) NumBytesRead

func (tc *TrafficCounter) NumBytesRead() uint64

func (*TrafficCounter) NumBytesWrote

func (tc *TrafficCounter) NumBytesWrote() uint64

type Uint64PtrCounter

type Uint64PtrCounter struct {
	Pointer *uint64
}

func (*Uint64PtrCounter) Add

func (c *Uint64PtrCounter) Add(a uint64) uint64

func (*Uint64PtrCounter) Count

func (c *Uint64PtrCounter) Count() uint64

type VideoConvertConfig

type VideoConvertConfig = streamtypes.VideoConvertConfig

type WaitPublisherChaner

type WaitPublisherChaner = streamplayer.WaitPublisherChaner

type WithConfiger

type WithConfiger interface {
	WithConfig(
		ctx context.Context,
		callback func(context.Context, *Config),
	)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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