encoder

package
v0.0.0-...-40848a7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Video = iota
	Audio
	Image
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

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

func NewData

func NewData(title string, formats []string, fileType FileTypeContract, encoder func() EncoderContract) *Data

func (Data) GetFileType

func (data Data) GetFileType() FileTypeContract

func (Data) GetFormats

func (data Data) GetFormats() []string

func (Data) GetTitle

func (data Data) GetTitle() string

func (Data) NewEncoder

func (data Data) NewEncoder() EncoderContract

type Encoder

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

func NewEncoder

func NewEncoder(name string, parameters map[string]ParameterContract, getParams func(parameters map[string]ParameterContract) []string) *Encoder

func (*Encoder) GetName

func (e *Encoder) GetName() string

func (*Encoder) GetParameter

func (e *Encoder) GetParameter(name string) (ParameterContract, error)

func (*Encoder) GetParams

func (e *Encoder) GetParams() []string

type EncoderContract

type EncoderContract interface {
	GetName() string
	GetParams() []string
	GetParameter(name string) (ParameterContract, error)
}

type EncoderDataContract

type EncoderDataContract interface {
	GetTitle() string
	GetFormats() []string
	GetFileType() FileTypeContract
	NewEncoder() EncoderContract
}

type FileType

type FileType uint

func (FileType) Name

func (fileType FileType) Name() string

func (FileType) Ordinal

func (fileType FileType) Ordinal() int

type FileTypeContract

type FileTypeContract interface {
	Name() string
	Ordinal() int
}

func GetListFileType

func GetListFileType() []FileTypeContract

type Parameter

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

func NewParameter

func NewParameter(name string, isEnabled bool, defaultParameter string, setParameter func(string) (string, error)) *Parameter

func (*Parameter) Get

func (p *Parameter) Get() string

func (*Parameter) GetName

func (p *Parameter) GetName() string

func (*Parameter) IsEnabled

func (p *Parameter) IsEnabled() bool

func (*Parameter) Set

func (p *Parameter) Set(s string) (err error)

func (*Parameter) SetDisable

func (p *Parameter) SetDisable()

func (*Parameter) SetEnable

func (p *Parameter) SetEnable()

type ParameterContract

type ParameterContract interface {
	GetName() string
	Set(string) error
	Get() string
	IsEnabled() bool
	SetEnable()
	SetDisable()
}

Jump to

Keyboard shortcuts

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