lib

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2018 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(lv lua.LValue, v interface{}) error

Decode unmarshal lua value into given variable using json bridge (make sure to pass pointer!)

func Encode

func Encode(v interface{}, l *lua.LState) (lua.LValue, error)

Encode marshals given interface into value within lua state (using json bridge)

func NewPrompter

func NewPrompter(args []string) func(l *lua.LState) int

NewPrompter returns new lua function which works as prompt and associated with set of defaults values provided as args.

func Print

func Print(l *lua.LState) int

Print replaces default function in lua with Printf analog plus `<red+hb>color formatting support</reset>`.

func RenderMedia

func RenderMedia(info *ffmpeg.Media)

RenderMedia displays basic information about media.

func RenderStreams

func RenderStreams(info *ffmpeg.Media)

RenderStreams displays table with streams information.

Types

type Prompter

type Prompter struct {
	Args []string
	// contains filtered or unexported fields
}

Prompter wraps set of default values (stack) and creates lua function to retrieve such values or request user input.

type VM

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

VM wraps at top of lua VM and tmpDir storage.

func NewVM

func NewVM(args []string) *VM

NewVM returns new instance of lua VM wrapper.

func (*VM) Close

func (vm *VM) Close()

Close closes lua VM and cleans temp files (if any).

func (*VM) DoFile

func (vm *VM) DoFile(path string) error

DoFile executes given lua script by it's path.

Jump to

Keyboard shortcuts

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