streaming

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidHost = errors.New("Invalid hostname")

ErrInvalidHost describes an error for a hostname that is considered invalid if it's empty

View Source
var ErrUnparsedURL = errors.New("URL is not parsed correctly")

ErrUnparsedURL describes an error that occours when the parsing process cannot be deemed as successful

Functions

func ValidateURL added in v1.1.0

func ValidateURL(URL *url.URL) error

ValidateURL checks if everything is present for the given URL

Types

type IProcessor added in v1.1.0

type IProcessor interface {
	NewProcess(path, URI string) *exec.Cmd
	NewStream(URI string) (*Stream, string, string)
	Restart(stream *Stream, path string) error
}

IProcessor is an interface describing a processor service

type Processor added in v1.1.0

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

Processor is the main type for creating new processes

func NewProcessor added in v1.1.0

func NewProcessor(
	storeDir string,
	keepFiles bool,
	loggingOpts config.ProcessLogging,
) *Processor

NewProcessor creates a new instance of a processor

func (Processor) NewProcess added in v1.1.0

func (p Processor) NewProcess(path, URI string) *exec.Cmd

NewProcess creates only the process for the stream

func (Processor) NewStream added in v1.1.0

func (p Processor) NewStream(URI string) (*Stream, string, string)

NewStream creates a new transcoding process for ffmpeg

func (Processor) Restart added in v1.1.0

func (p Processor) Restart(strm *Stream, path string) error

Restart uses the processor to restart a given stream

type Stream

type Stream struct {
	CMD         *exec.Cmd            `json:"-"`
	Mux         *sync.RWMutex        `json:"-"`
	Path        string               `json:"path"`
	Streak      *hotstreak.Hotstreak `json:"-"`
	OriginalURI string               `json:"-"`
	StorePath   string               `json:"-"`
	KeepFiles   bool                 `json:"-"`
	Logger      *lumberjack.Logger   `json:"-"`
}

Stream describes a given host's streaming

func (*Stream) CleanProcess added in v1.1.0

func (strm *Stream) CleanProcess() error

CleanProcess makes sure that the transcoding process is killed correctly

Jump to

Keyboard shortcuts

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