Package maya (v1.45.7) [up] [repository]

api.go

cli.go

dash.go

downloader.go

drm.go

hls.go

orchestrator.go

resume.go

Index

Variables

var StopKey = true

StopKey enables the interactive stop: press q (plus Enter on a normal terminal) to cleanly stop the download. Set to false when stdin is not a keyboard — tests, daemons, or programs that read stdin themselves. One download per process is assumed. Read once at download start.

Functions

func DashBitrate(streamId string, manifestData *Manifest) error

DashBitrate logs the actual average bitrate of a DASH stream, measured by dividing the total content length of each representation's media file by the total presentation duration. Only representations with a BaseURL and a server that reports content length are supported.

func DashDownload(streamId string, manifestData *Manifest, optionsData *Options) error
func HlsDownload(streamId int, manifestData *Manifest, optionsData *Options) error

Types

type Cache

type Cache string

Methods

func (c Cache) Decode(values ...CacheValue) error
func (c Cache) Encode(values ...CacheValue) error
func (c *Cache) Setup() error

type CacheValue

type CacheValue interface {
	CachePath() string
}

type DrmSystem

type DrmSystem int

Constants

const (
	DrmNone DrmSystem = iota
	DrmPlayReady
	DrmWidevine
)

type Flag

type Flag struct {
	Name  string
	Usage string
	Value FlagValue
	Needs string
	// contains filtered or unexported fields
}

type FlagBool

type FlagBool bool

Methods

func (b FlagBool) Default() string
func (FlagBool) Example() string
func (b *FlagBool) Parse(value string) error
func (FlagBool) Type() string

type FlagInt

type FlagInt int

Methods

func (i FlagInt) Default() string
func (FlagInt) Example() string
func (i *FlagInt) Parse(value string) error
func (FlagInt) Type() string

type FlagSet

type FlagSet []*Flag

Methods

func (set FlagSet) IsSet(value FlagValue) bool
func (set FlagSet) Parse(args []string) error
func (set FlagSet) Usage(w io.Writer, name string) error

type FlagString

type FlagString string

Methods

func (s FlagString) Default() string
func (FlagString) Example() string
func (s *FlagString) Parse(value string) error
func (FlagString) Type() string

type FlagValue

type FlagValue interface {
	Parse(string) error
	Type() string
	Default() string
	Example() string
}

type Manifest

type Manifest struct {
	Url  *url.URL
	Body []byte
}

Functions

func DashList(baseUrl *url.URL) (*Manifest, error)
func HlsList(baseUrl *url.URL) (*Manifest, error)

Methods

func (*Manifest) CachePath() string

type Options

type Options struct {
	Drm     DrmSystem
	Device  string
	License func([]byte) ([]byte, error)
}