Files
liv/filter.go
dengxiaochuan e021650142 init
2021-04-30 23:47:16 +08:00

31 lines
557 B
Go

package ffmpeg
import "fmt"
type Filter struct {
alias string
content string
others []string
}
func NewFilter(alias string, content string, others ...string) *Filter {
return &Filter{
alias: alias,
content: content,
others: others,
}
}
//
func (f *Filter) String() string {
var steamsAlias string
for _, other := range f.others {
steamsAlias = fmt.Sprintf("%s[%s]", steamsAlias, other)
}
var alias string
if f.alias != "" {
alias = fmt.Sprintf("[%s]", f.alias)
}
return fmt.Sprintf("%s%s%s", steamsAlias, f.content, alias)
}