utils

package
v0.0.0-...-8220668 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BufferSize - The amount of data read from disk before seeking to the next location in the file.
	BufferSize = 4096

	// MaxSeekSize - The max size of a seek operation, this has the affect of reading 'BufferSize' amount of data for
	// every 'MaxSeekSize' until we reach the end of the file.
	MaxSeekSize = 64 * 1024 * 1024
)

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(s []string, i string) bool

ContainsString - Returns a boolean indicating whether the provided slice contains the given element.

func HashFile

func HashFile(path string) (uint32, error)

HashFile - Open then hash the file at the provided path.

func Int64P

func Int64P(n int64) *int64

Int64P - Utility function to return a pointer to the provided integer.

func PathExists

func PathExists(path string) bool

PathExists - Returns a boolean indicating whether the provided path exists.

func ReplaceExtension

func ReplaceExtension(path, extension string) string

ReplaceExtension - Replace the extension for the provided path with the given extension.

func TranscodeFile

func TranscodeFile(path string) error

TranscodeFile - Use ffmpeg to transcode the file at the provided path, note that the resulting file will have the '.transcoding.mp4' extension.

Types

type LoggingHandler

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

LoggingHandler - Handler with implements the apex logging handler interface.

func NewLoggingHandler

func NewLoggingHandler() *LoggingHandler

NewLoggingHandler - Create a new LoggingHandler which will log to stdout.

func (*LoggingHandler) HandleLog

func (h *LoggingHandler) HandleLog(e *log.Entry) error

HandleLog - Implement the handler interface for the apex logging module.

type LoudnormStats

type LoudnormStats struct {
	MeasuredI         string `json:"input_i"`
	MeasuredTP        string `json:"input_tp"`
	MeasuredLRA       string `json:"input_lra"`
	MeasuredThreshold string `json:"input_thresh"`
	TargetOffset      string `json:"target_offset"`
}

LoudnormStats - Represents the raw stats from the first pass with the loudnorm filter which will be used in the second pass.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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