types

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStreamSource

type BaseStreamSource struct {
	StreamSource
	// contains filtered or unexported fields
}

func (*BaseStreamSource) Active

func (s *BaseStreamSource) Active() bool

func (*BaseStreamSource) Diagnostic

func (s *BaseStreamSource) Diagnostic() StreamSourceDiag

func (*BaseStreamSource) HealthCheck

func (s *BaseStreamSource) HealthCheck() error

func (*BaseStreamSource) IsRadio

func (s *BaseStreamSource) IsRadio() bool

func (*BaseStreamSource) M3UTags

func (s *BaseStreamSource) M3UTags() m3uparser.M3UTags

func (*BaseStreamSource) MediaName

func (s *BaseStreamSource) MediaName() string

func (*BaseStreamSource) MediaType

func (s *BaseStreamSource) MediaType() contenttype.MediaType

func (*BaseStreamSource) Url

func (s *BaseStreamSource) Url() string

type HttpDiags

type HttpDiags struct {
	Url       string `json:"url,omitempty"`
	Body      string `json:"body,omitempty"`
	MediaType string `json:"media_type,omitempty"`
	Error     string `json:"error,omitempty"`
	Status    int    `json:"status,omitempty"`
}

type M3U8StreamSource

type M3U8StreamSource struct {
	BaseStreamSource
}

func (*M3U8StreamSource) MasterPlaylist

func (s *M3U8StreamSource) MasterPlaylist() string

func (*M3U8StreamSource) ServeManifest

func (s *M3U8StreamSource) ServeManifest(w http.ResponseWriter, r *http.Request, timeout int)

func (*M3U8StreamSource) ServeMedia

func (s *M3U8StreamSource) ServeMedia(w http.ResponseWriter, r *http.Request, timeout int)

type MPDStreamSource

type MPDStreamSource struct {
	BaseStreamSource
}

func (*MPDStreamSource) MasterPlaylist

func (s *MPDStreamSource) MasterPlaylist() string

func (*MPDStreamSource) ServeManifest

func (s *MPDStreamSource) ServeManifest(w http.ResponseWriter, r *http.Request, timeout int)

func (*MPDStreamSource) ServeMedia

func (s *MPDStreamSource) ServeMedia(w http.ResponseWriter, r *http.Request, timeout int)

type StreamSource

type StreamSource interface {
	ServeManifest(w http.ResponseWriter, r *http.Request, timeout int)
	ServeMedia(w http.ResponseWriter, r *http.Request, timeout int)
	HealthCheck() error
	Diagnostic() StreamSourceDiag
	Active() bool
	MediaType() contenttype.MediaType
	MediaName() string
	MasterPlaylist() string
	M3UTags() m3uparser.M3UTags
	IsRadio() bool
	Url() string
}

func NewSource

func NewSource(entry m3uparser.M3UEntry, timeout int) (StreamSource, error)

type StreamSourceDiag

type StreamSourceDiag struct {
	Entry       m3uparser.M3UEntry `json:"entry,omitempty"`
	Headers     map[string]string  `json:"headers,omitempty"`
	HttpProxy   string             `json:"http_proxy,omitempty"`
	Active      bool               `json:"active,omitempty"`
	Diagnostics []HttpDiags        `json:"diagnostics,omitempty"`
}

Jump to

Keyboard shortcuts

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