internal

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timecode

type Timecode struct {
	FrameRate float64
	DropFrame bool
	// contains filtered or unexported fields
}

func NewTimecodeFromFrames

func NewTimecodeFromFrames(inputFrameIdx int64, frameRate float64, isDropframe bool) (*Timecode, error)

NewTimecodeFromFrames will create a Timecode object for given frames. The only time it will return an error is if DF is specified for a non-DF framerate.

func NewTimecodeFromString

func NewTimecodeFromString(inputTimecode string, frameRate float64) (*Timecode, error)

func ParseStringToTimecode

func ParseStringToTimecode(in string, fps float64, excludeLastTimecode bool, dropFrame bool) (*Timecode, error)

ParseStringToTimecode Will take a string that is either a timecode string or a frame count string and return a bonefied timecode object. This is only used in the context of calculate where we know if it's df or ndf. This dropframeness is ignored if it's a timecode string excludeLastTimecode will only work for inputs that are a timecode string - not a frame count.

func (*Timecode) AddFrames

func (t *Timecode) AddFrames(frames int)

func (*Timecode) GetFrameCount

func (t *Timecode) GetFrameCount() int

func (*Timecode) GetFrameIdx

func (t *Timecode) GetFrameIdx() int

func (*Timecode) GetFramerateString

func (t *Timecode) GetFramerateString() string

func (*Timecode) GetTimecode

func (t *Timecode) GetTimecode() string

func (*Timecode) Validate

func (t *Timecode) Validate() error

type TimecodeSpan

type TimecodeSpan struct {
	StartTimecode *Timecode
	LastTimecode  *Timecode
	Framerate     float64
	Dropframe     bool
}

func NewTimecodeSpan

func NewTimecodeSpan(firstTimecode, lastTimecode *Timecode) (*TimecodeSpan, error)

func (*TimecodeSpan) GetSpanRealtime

func (t *TimecodeSpan) GetSpanRealtime() string

func (*TimecodeSpan) GetSpanTimecode

func (t *TimecodeSpan) GetSpanTimecode() string

func (*TimecodeSpan) GetTotalFrames

func (t *TimecodeSpan) GetTotalFrames() int

func (*TimecodeSpan) GetTotalSeconds

func (t *TimecodeSpan) GetTotalSeconds() float64

TOdo: This calc appears to be wrong

Jump to

Keyboard shortcuts

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