configuration

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfiguration

type APIConfiguration struct {
	Enabled bool   `json:"enabled"`
	Host    string `json:"host"`
	Port    int32  `json:"port"`
	// 'release' or 'debug' for GIN
	Mode string `json:"mode"`
}

APIConfiguration is needed for configuring REST API part

type CORSConfiguration

type CORSConfiguration struct {
	Enabled          bool     `json:"enabled"`
	AllowOrigins     []string `json:"allow_origins"`
	AllowMethods     []string `json:"allow_methods"`
	AllowHeaders     []string `json:"allow_headers"`
	ExposeHeaders    []string `json:"expose_headers"`
	AllowCredentials bool     `json:"allow_credentials"`
}

CORSConfiguration is settings for CORS

type Configuration

type Configuration struct {
	APICfg         APIConfiguration            `json:"api"`
	VideoServerCfg VideoConfiguration          `json:"video"`
	HLSCfg         HLSConfiguration            `json:"hls"`
	CorsConfig     CORSConfiguration           `json:"cors"`
	RTSPStreams    []SingleStreamConfiguration `json:"rtsp_streams"`
}

Configuration represents user defined settings for video server

func PrepareConfiguration

func PrepareConfiguration(fname string) (*Configuration, error)

PrepareConfiguration

type HLSConfiguration

type HLSConfiguration struct {
	MsPerSegment int64  `json:"ms_per_segment"`
	Directory    string `json:"directory"`
	WindowSize   uint   `json:"window_size"`
	Capacity     uint   `json:"window_capacity"`
}

HLSConfiguration is a HLS configuration for every stream with provided "hls" type in 'stream_types' field of 'rtsp_streams' objects

type SingleStreamConfiguration

type SingleStreamConfiguration struct {
	GUID        string   `json:"guid"`
	URL         string   `json:"url"`
	StreamTypes []string `json:"stream_types"`
	// Level of verbose. Pick 'v' or 'vvv' (or leave it empty)
	Verbose string `json:"verbose"`
}

SingleStreamConfiguration is needed for configuring certain RTSP stream

type VideoConfiguration

type VideoConfiguration struct {
	Host string `json:"host"`
	Port int32  `json:"port"`
	// 'release' or 'debug' for GIN
	Mode string `json:"mode"`
}

VideoConfiguration is needed for configuring actual video server part

Jump to

Keyboard shortcuts

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