models

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResultKeepOriginal = Result("Kept original")
	ResultReplaced     = Result("Replaced with new")
	ResultError        = Result("Error")
	ResultSkipped      = Result("Skipped, kept original")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileMetadata

type FileMetadata struct {
	Streams []Stream `json:"streams"`
	Format  Format   `json:"format"`
}

func (FileMetadata) Frames added in v0.1.10

func (m FileMetadata) Frames() int

type Format

type Format struct {
	Filename   string `json:"filename"`
	FormatName string `json:"format_name"`
	Duration   string `json:"duration"`
	Size       string `json:"size"`
	BitRate    string `json:"bit_rate"`
}

func (Format) SizeInt

func (format Format) SizeInt() int64

type NotificationData

type NotificationData struct {
	Started time.Time

	Filename       string
	OriginalFrames int
	OriginalSize   int

	CurrentFrame int
	CurrentSize  int
	FPS          float64
	Bitrate      float64
	Speed        float64
}

type ProgressReport

type ProgressReport struct {
	Frame     int
	FPS       float64
	Bitrate   float64
	TotalSize int
	Speed     float64
	Progress  string
}

func (*ProgressReport) Log

func (report *ProgressReport) Log(filename string)

type Result

type Result string

type Stream

type Stream struct {
	CodecName      string  `json:"codec_name"`
	CodecType      string  `json:"codec_type"`
	PixelFormat    *string `json:"pix_fmt"`
	Level          int     `json:"level"`
	ColorRange     *string `json:"color_range"`
	ColorSpace     *string `json:"color_space"`
	ColorTransfer  *string `json:"color_transfer"`
	ColorPrimaries *string `json:"color_primaries"`
	NumberFrames   string  `json:"nb_frames"`
	RFrameRate     *string `json:"r_frame_rate"`
	AvgFrameRate   *string `json:"avg_frame_rate"`
}

func (Stream) FrameRate

func (stream Stream) FrameRate() float64

Jump to

Keyboard shortcuts

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