configs

package
v0.7.25 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: GPL-3.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	File                 string               `yaml:"-"`
	RPC                  RPC                  `yaml:"rpc"`
	Debug                bool                 `yaml:"debug"`
	Interval             int                  `yaml:"interval"`
	OutPutPath           string               `yaml:"out_put_path"`
	FfmpegPath           string               `yaml:"ffmpeg_path"`
	Log                  Log                  `yaml:"log"`
	Feature              Feature              `yaml:"feature"`
	LiveRooms            []LiveRoom           `yaml:"live_rooms"`
	OutputTmpl           string               `yaml:"out_put_tmpl"`
	VideoSplitStrategies VideoSplitStrategies `yaml:"video_split_strategies"`
	Cookies              map[string]string    `yaml:"cookies"`
	OnRecordFinished     OnRecordFinished     `yaml:"on_record_finished"`
	TimeoutInUs          int                  `yaml:"timeout_in_us"`
	// contains filtered or unexported fields
}

Config content all config info.

func NewConfig added in v0.7.1

func NewConfig() *Config

func NewConfigWithBytes added in v0.7.0

func NewConfigWithBytes(b []byte) (*Config, error)

func NewConfigWithFile

func NewConfigWithFile(file string) (*Config, error)

func (Config) GetFilePath added in v0.7.0

func (c Config) GetFilePath() (string, error)

func (*Config) GetLiveRoomByUrl added in v0.7.0

func (c *Config) GetLiveRoomByUrl(url string) (*LiveRoom, error)

func (*Config) Marshal

func (c *Config) Marshal() error

func (*Config) RefreshLiveRoomIndexCache added in v0.7.0

func (c *Config) RefreshLiveRoomIndexCache()

func (*Config) RemoveLiveRoomByUrl added in v0.7.0

func (c *Config) RemoveLiveRoomByUrl(url string) error

func (*Config) Verify

func (c *Config) Verify() error

Verify will return an error when this config has problem.

type Feature

type Feature struct {
	UseNativeFlvParser         bool `yaml:"use_native_flv_parser"`
	RemoveSymbolOtherCharacter bool `yaml:"remove_symbol_other_character"`
}

Feature info.

type LiveRoom added in v0.7.0

type LiveRoom struct {
	Url         string  `yaml:"url"`
	IsListening bool    `yaml:"is_listening"`
	LiveId      live.ID `yaml:"-"`
	Quality     int     `yaml:"quality"`
	AudioOnly   bool    `yaml:"audio_only"`
}

func NewLiveRoomsWithStrings added in v0.7.0

func NewLiveRoomsWithStrings(strings []string) []LiveRoom

func (*LiveRoom) UnmarshalYAML added in v0.7.0

func (l *LiveRoom) UnmarshalYAML(unmarshal func(interface{}) error) error

allow both string and LiveRoom format in config

type Log added in v0.7.6

type Log struct {
	OutPutFolder string `yaml:"out_put_folder"`
	SaveLastLog  bool   `yaml:"save_last_log"`
	SaveEveryLog bool   `yaml:"save_every_log"`
}

type OnRecordFinished added in v0.6.5

type OnRecordFinished struct {
	ConvertToMp4          bool   `yaml:"convert_to_mp4"`
	DeleteFlvAfterConvert bool   `yaml:"delete_flv_after_convert"`
	CustomCommandline     string `yaml:"custom_commandline"`
}

On record finished actions.

type RPC

type RPC struct {
	Enable bool   `yaml:"enable"`
	Bind   string `yaml:"bind"`
}

RPC info.

type VideoSplitStrategies

type VideoSplitStrategies struct {
	OnRoomNameChanged bool          `yaml:"on_room_name_changed"`
	MaxDuration       time.Duration `yaml:"max_duration"`
	MaxFileSize       int           `yaml:"max_file_size"`
}

VideoSplitStrategies info.

Jump to

Keyboard shortcuts

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