media

package
v0.0.0-...-12f777f Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constraints

type Constraints interface {
	GetTitle() string
	GetMinAspectRatio() float64
	GetMaxAspectRatio() float64
	GetRecommendedRatio() float64
	GetRecommendedRatioDeviation() float64
	UseRecommendedRatioByDefault() bool
	GetMinDuration() float64
	GetMaxDuration() float64
}

type Details

type Details interface {
	GetWidth() int
	GetHeight() int
	GetType() string
	GetAspectRatio() float64
	GetFileName() string
	GetBaseName() string
	GetFileSize() int
	GetMinAllowedWidth() int
	GetMaxAllowedWidth() int
	HasSwappedAxes() bool
	IsHorizontallyFlipped() bool
	IsVerticallyFlipped() bool
	Validate(constraints Constraints) error
}

type Media

type Media struct {
	Details
	// contains filtered or unexported fields
}

func NewMedia

func NewMedia(fileName string, fileSize int64, width, height int) (m Media)

func (*Media) GetAspectRatio

func (m *Media) GetAspectRatio() float64

func (*Media) GetBaseName

func (m *Media) GetBaseName() string

func (*Media) GetFileName

func (m *Media) GetFileName() string

func (*Media) GetHeight

func (m *Media) GetHeight() int

func (*Media) GetWidth

func (m *Media) GetWidth() int

func (*Media) Validate

func (m *Media) Validate(constraints Constraints) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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