core

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewFileCache added in v0.27.0

func NewFileCache(name, cacheSize, cacheFolder string, maxItems int, getReader ReadFunc) *fileCache

Types

type Archiver added in v0.29.0

type Archiver interface {
	Zip(ctx context.Context, id string, w io.Writer) error
}

func NewArchiver added in v0.29.0

func NewArchiver(ds model.DataStore) Archiver

type Artwork added in v0.28.0

type Artwork interface {
	Get(ctx context.Context, id string, size int, out io.Writer) error
}

func NewArtwork added in v0.28.0

func NewArtwork(ds model.DataStore, cache ArtworkCache) Artwork

type ArtworkCache added in v0.28.0

type ArtworkCache FileCache

func NewImageCache

func NewImageCache() ArtworkCache

type CachedStream added in v0.27.0

type CachedStream struct {
	io.Reader
	io.Seeker
	Cached bool
}

func (*CachedStream) Close added in v0.27.0

func (s *CachedStream) Close() error

func (*CachedStream) Seekable added in v0.27.0

func (s *CachedStream) Seekable() bool

type FileCache added in v0.27.0

type FileCache interface {
	Get(ctx context.Context, arg fmt.Stringer) (*CachedStream, error)
	Ready() bool
}

type MediaStreamer

type MediaStreamer interface {
	NewStream(ctx context.Context, id string, reqFormat string, reqBitRate int) (*Stream, error)
}

type ReadFunc added in v0.27.0

type ReadFunc func(ctx context.Context, arg fmt.Stringer) (io.Reader, error)

type Stream

type Stream struct {
	io.ReadCloser
	io.Seeker
	// contains filtered or unexported fields
}

func (*Stream) ContentType

func (s *Stream) ContentType() string

func (*Stream) Duration

func (s *Stream) Duration() float32

func (*Stream) EstimatedContentLength

func (s *Stream) EstimatedContentLength() int

func (*Stream) ModTime

func (s *Stream) ModTime() time.Time

func (*Stream) Name

func (s *Stream) Name() string

func (*Stream) Seekable

func (s *Stream) Seekable() bool

type TranscodingCache

type TranscodingCache FileCache

func NewTranscodingCache

func NewTranscodingCache() TranscodingCache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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