subtitle

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Subtitle

type Subtitle struct {
	StartTime time.Time
	EndTime   time.Time
	Text      string
	Style     intertitle.Style
}

Subtitle defines a single subtitle in a set of subtitles, that being when it starts and ends, and what text it displays.

func AlignSubtitles

func AlignSubtitles(subs []Subtitle, interRanges []intertitle.Range) []Subtitle

AlignSubtitles tries to align the given subtitles to the detected intertitles

such that when the subtitles are played back, they align exactly with each
intertitle segment in the film - barring some edge cases arising due to
imperfect data.

func (Subtitle) End

func (s Subtitle) End() time.Time

End returns the end of a subtitle

func (Subtitle) Start

func (s Subtitle) Start() time.Time

Start returns the start of a subtitle

func (Subtitle) TransformToNew

func (s Subtitle) TransformToNew(start, end time.Time) period.Period

TransformToNew returns a new subtitle which changes the start and end to

the desired times.

func (Subtitle) Valid

func (s Subtitle) Valid() bool

Valid returns true if a subtitle is not a valid Period, otherwise false.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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