Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 23.976 has exactly 24 frames per second. However, the textual representation of timecodes using this rate // skip two frames every minute, except when the minute is a multiple of 10. This is because 23.976 footage // actually does display at a rate of 23.976 frames each second on televisions. To ensure that the first // timecode in an hour of footage is 00:00:00;00 and the last timecode in that hour is 01:00:00;00, drop // frame was invented. It is purely a matter of presentation. Rate_23_976 = Rate{"23.976", 24, 2, 24000, 1001} Rate_24 = Rate{"24", 24, 0, 24, 1} Rate_30 = Rate{"30", 30, 0, 30, 1} Rate_29_97 = Rate{"29.97", 30, 2, 30000, 1001} Rate_60 = Rate{"60", 60, 0, 60, 1} Rate_59_94 = Rate{"59.94", 60, 4, 60000, 1001} )
View Source
var TimecodeRegex = regexp.MustCompile(`^(\d\d)(:|;)(\d\d)(:|;)(\d\d)(:|;)(\d+)$`)
TimecodeRegex is the pattern for a valid SMPTE timecode
Functions ¶
This section is empty.
Types ¶
type Components ¶
type Components struct {
Hours, Minutes, Seconds, Frames int64
}
func (Components) Equals ¶
func (c Components) Equals(other Components) bool
type Frame ¶
type Frame int64
Frame type represents a specific frame index within some media content
type Framer ¶
type Framer interface {
Frame() int64
}
Framer defines the interface for something that can be converted into a specific frame index. Currently, this is limited only to Frame and Timecode
type Timecode ¶
type Timecode struct {
// contains filtered or unexported fields
}
Timecode represents a timecode value, either as a duration or a specific point in time
func FromComponents ¶
func FromComponents(components Components, rate Rate, dropFrame bool) *Timecode
func MustParse ¶
MustParse parses a timecode from a string, and treats it using the provided frame rate value
func Parse ¶
Parse parses a timecode from a string, and treats it using the provided frame rate value
func (*Timecode) Components ¶
func (t *Timecode) Components() Components
Components gets the components of the timecode: hours, minutes, seconds, frames.
Click to show internal directories.
Click to hide internal directories.