Documentation ¶
Overview ¶
Argument parsing and utility functions
Index ¶
- Variables
- func DecodeSpeed(arg string) (string, error)
- func IsEmpty(arg string) bool
- func IsExistProgram(execName string) (bool, error)
- func ParseStartTime(ss string, total time.Duration) (time.Duration, error)
- func SanitizeFile(path string) (string, error)
- func ToPort(port int) string
- func ValidatePort(port int) error
- type Arguments
- type Instant
- type ScaleType
- type TimeCode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MissingProgramError = errors.New("program name is invalid") InvalidPath = errors.New("bad path supplied") )
View Source
var ErrNoArgs = errors.New("At least 1 arg must be provided")
View Source
var ErrScaleOutOfRange = errors.New("ScaleType not recognized")
View Source
var ErrTwoArgs = errors.New("2 args must be provided")
View Source
var HelpMessage = `` /* 2782-byte string literal not displayed */
View Source
var ShortHelp = `See 'seneca -h' for help`
Functions ¶
func DecodeSpeed ¶
Converts speed specification to ffmpeg option
speedup: -vf "setpts=(1/X)*PTS" slowdown: -vf "setpts=(X/1)*PTS"
func IsExistProgram ¶
func ParseStartTime ¶
total - total time of the video ss - string representation of an instant to start the capture
func SanitizeFile ¶
func ValidatePort ¶
Types ¶
type Arguments ¶
type Arguments struct { Help bool Version bool DryRun bool Verbose bool VideoIn string Port int NeedScaling bool ScaleFilter string Fps int SpeedSpec string From TimeCode Length time.Duration }
func NewArguments ¶
func NewArguments() *Arguments
Click to show internal directories.
Click to hide internal directories.