config

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioParams added in v1.5.3

type AudioParams struct {
	AudioEnabled   bool
	AudioCodec     types.MimeType
	AudioBitrate   int32
	AudioFrequency int32
}

type AzureConfig

type AzureConfig struct {
	AccountName   string `yaml:"account_name"` // (env AZURE_STORAGE_ACCOUNT)
	AccountKey    string `yaml:"account_key"`  // (env AZURE_STORAGE_KEY)
	ContainerName string `yaml:"container_name"`
}

func (*AzureConfig) ToAzureUpload added in v1.5.3

func (c *AzureConfig) ToAzureUpload() *livekit.AzureBlobUpload

type BaseConfig added in v1.5.3

type BaseConfig struct {
	NodeID string // do not supply - will be overwritten

	Redis                *redis.RedisConfig `yaml:"redis"`           // required
	ApiKey               string             `yaml:"api_key"`         // required (env LIVEKIT_API_KEY)
	ApiSecret            string             `yaml:"api_secret"`      // required (env LIVEKIT_API_SECRET)
	WsUrl                string             `yaml:"ws_url"`          // required (env LIVEKIT_WS_URL)
	TemplateBase         string             `yaml:"template_base"`   // custom template base url
	Insecure             bool               `yaml:"insecure"`        // allow chrome to connect to an insecure websocket
	LocalOutputDirectory string             `yaml:"local_directory"` // used for temporary storage before upload
	Logging              logger.Config      `yaml:"logging"`
	LogLevel             string             `yaml:"log_level"` // TODO: deprecate, debug, info, warn, or error

	S3     *S3Config    `yaml:"s3"`
	Azure  *AzureConfig `yaml:"azure"`
	GCP    *GCPConfig   `yaml:"gcp"`
	AliOSS *S3Config    `yaml:"alioss"`

	SessionLimits `yaml:"session_limits"`
}

type CPUCostConfig added in v1.0.4

type CPUCostConfig struct {
	RoomCompositeCpuCost  float64 `yaml:"room_composite_cpu_cost"`
	TrackCompositeCpuCost float64 `yaml:"track_composite_cpu_cost"`
	TrackCpuCost          float64 `yaml:"track_cpu_cost"`
	WebCpuCost            float64 `yaml:"web_cpu_cost"`
}

type FileParams added in v1.5.3

type FileParams struct {
	FileInfo        *livekit.FileInfo
	LocalFilepath   string
	StorageFilepath string
}

type GCPConfig

type GCPConfig struct {
	CredentialsJSON string `yaml:"credentials_json"` // (env GOOGLE_APPLICATION_CREDENTIALS)
	Bucket          string `yaml:"bucket"`
}

func (*GCPConfig) ToGCPUpload added in v1.5.3

func (c *GCPConfig) ToGCPUpload() *livekit.GCPUpload

type Manifest added in v1.5.3

type Manifest struct {
	EgressID          string `json:"egress_id,omitempty"`
	RoomID            string `json:"room_id,omitempty"`
	RoomName          string `json:"room_name,omitempty"`
	Url               string `json:"url,omitempty"`
	StartedAt         int64  `json:"started_at,omitempty"`
	EndedAt           int64  `json:"ended_at,omitempty"`
	PublisherIdentity string `json:"publisher_identity,omitempty"`
	TrackID           string `json:"track_id,omitempty"`
	TrackKind         string `json:"track_kind,omitempty"`
	TrackSource       string `json:"track_source,omitempty"`
	AudioTrackID      string `json:"audio_track_id,omitempty"`
	VideoTrackID      string `json:"video_track_id,omitempty"`
	SegmentCount      int64  `json:"segment_count,omitempty"`
}

type PipelineConfig added in v1.5.3

type PipelineConfig struct {
	BaseConfig `yaml:",inline"`

	HandlerID string    `yaml:"handler_id"`
	TmpDir    string    `yaml:"tmp_dir"`
	MutedChan chan bool `yaml:"-"`

	SourceParams        `yaml:"-"`
	AudioParams         `yaml:"-"`
	VideoParams         `yaml:"-"`
	StreamParams        `yaml:"-"`
	FileParams          `yaml:"-"`
	SegmentedFileParams `yaml:"-"`
	UploadParams        `yaml:"-"`
	types.EgressType    `yaml:"-"`
	types.OutputType    `yaml:"-"`

	GstReady chan struct{}       `yaml:"-"`
	Info     *livekit.EgressInfo `yaml:"-"`
}

func GetValidatedPipelineConfig added in v1.5.3

func GetValidatedPipelineConfig(conf *ServiceConfig, req *livekit.StartEgressRequest) (*PipelineConfig, error)

func NewPipelineConfig added in v1.5.3

func NewPipelineConfig(confString string, req *livekit.StartEgressRequest) (*PipelineConfig, error)

func (*PipelineConfig) GetManifest added in v1.5.3

func (p *PipelineConfig) GetManifest() ([]byte, error)

func (*PipelineConfig) GetSegmentOutputType added in v1.5.3

func (p *PipelineConfig) GetSegmentOutputType() types.OutputType

func (*PipelineConfig) Update added in v1.5.3

func (p *PipelineConfig) Update(request *livekit.StartEgressRequest) error

func (*PipelineConfig) UpdateFileInfoFromSDK added in v1.5.3

func (p *PipelineConfig) UpdateFileInfoFromSDK(fileIdentifier string, replacements map[string]string) error

used for sdk input source

func (*PipelineConfig) UpdatePlaylistNamesFromSDK added in v1.5.3

func (p *PipelineConfig) UpdatePlaylistNamesFromSDK(replacements map[string]string)

func (*PipelineConfig) VerifyUrl added in v1.5.3

func (p *PipelineConfig) VerifyUrl(url string) error

type S3Config

type S3Config struct {
	AccessKey      string `yaml:"access_key"` // (env AWS_ACCESS_KEY_ID)
	Secret         string `yaml:"secret"`     // (env AWS_SECRET_ACCESS_KEY)
	Region         string `yaml:"region"`     // (env AWS_DEFAULT_REGION)
	Endpoint       string `yaml:"endpoint"`
	Bucket         string `yaml:"bucket"`
	ForcePathStyle bool   `yaml:"force_path_style"`
}

func (*S3Config) ToAliOSSUpload added in v1.5.3

func (c *S3Config) ToAliOSSUpload() *livekit.AliOSSUpload

func (*S3Config) ToS3Upload added in v1.5.3

func (c *S3Config) ToS3Upload() *livekit.S3Upload

type SegmentedFileParams added in v1.5.3

type SegmentedFileParams struct {
	SegmentsInfo      *livekit.SegmentsInfo
	LocalFilePrefix   string
	StoragePathPrefix string
	PlaylistFilename  string
	SegmentDuration   int
}

func (*SegmentedFileParams) GetStorageFilepath added in v1.5.3

func (p *SegmentedFileParams) GetStorageFilepath(filename string) string

type ServiceConfig added in v1.5.3

type ServiceConfig struct {
	BaseConfig `yaml:",inline"`

	HealthPort       int `yaml:"health_port"`
	PrometheusPort   int `yaml:"prometheus_port"`
	DebugHandlerPort int `yaml:"debug_handler_port"` // Port used to launch the egress debug handler. 0 means debug handler disabled.

	CPUCostConfig `yaml:"cpu_cost"` // CPU costs for various egress types
}

func NewServiceConfig added in v1.5.3

func NewServiceConfig(confString string) (*ServiceConfig, error)

type SessionLimits added in v1.2.0

type SessionLimits struct {
	FileOutputMaxDuration    time.Duration `yaml:"file_output_max_duration"`
	StreamOutputMaxDuration  time.Duration `yaml:"stream_output_max_duration"`
	SegmentOutputMaxDuration time.Duration `yaml:"segment_output_max_duration"`
}

type SourceParams added in v1.5.3

type SourceParams struct {
	// source
	Token string

	// web source
	Display    string
	Layout     string
	CustomBase string
	WebUrl     string

	// sdk source
	TrackID             string
	TrackSource         string
	TrackKind           string
	AudioTrackID        string
	VideoTrackID        string
	ParticipantIdentity string
}

type StreamParams added in v1.5.3

type StreamParams struct {
	WebsocketUrl string
	StreamUrls   []string
	StreamInfo   map[string]*livekit.StreamInfo
}

type UploadParams added in v1.5.3

type UploadParams struct {
	UploadConfig    interface{}
	DisableManifest bool
}

type VideoParams added in v1.5.3

type VideoParams struct {
	VideoEnabled     bool
	VideoTranscoding bool
	VideoCodec       types.MimeType
	VideoProfile     types.Profile
	Width            int32
	Height           int32
	Depth            int32
	Framerate        int32
	VideoBitrate     int32
	KeyFrameInterval float64
}

Jump to

Keyboard shortcuts

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