Documentation ¶
Overview ¶
Package conf contains the struct that holds the configuration of the software.
Index ¶
- func IsValidPathName(name string) error
- type AuthMethods
- type Conf
- type Credential
- type Encryption
- type HLSVariant
- type IPsOrCIDRs
- type LogDestinations
- type LogLevel
- type PathConf
- type Protocol
- type Protocols
- type RtspRangeType
- type SourceProtocol
- type StringDuration
- type StringSize
- type WebRTCICEServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidPathName ¶
IsValidPathName checks if a path name is valid.
Types ¶
type AuthMethods ¶
type AuthMethods []headers.AuthMethod
AuthMethods is the authMethods parameter.
func (AuthMethods) MarshalJSON ¶
func (d AuthMethods) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*AuthMethods) UnmarshalEnv ¶
func (d *AuthMethods) UnmarshalEnv(s string) error
UnmarshalEnv implements envUnmarshaler.
func (*AuthMethods) UnmarshalJSON ¶
func (d *AuthMethods) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Conf ¶
type Conf struct { // general LogLevel LogLevel `json:"logLevel"` LogDestinations LogDestinations `json:"logDestinations"` LogFile string `json:"logFile"` ReadTimeout StringDuration `json:"readTimeout"` WriteTimeout StringDuration `json:"writeTimeout"` ReadBufferCount int `json:"readBufferCount"` UDPMaxPayloadSize int `json:"udpMaxPayloadSize"` ExternalAuthenticationURL string `json:"externalAuthenticationURL"` API bool `json:"api"` APIAddress string `json:"apiAddress"` Metrics bool `json:"metrics"` MetricsAddress string `json:"metricsAddress"` PPROF bool `json:"pprof"` PPROFAddress string `json:"pprofAddress"` RunOnConnect string `json:"runOnConnect"` RunOnConnectRestart bool `json:"runOnConnectRestart"` // RTSP RTSP bool `json:"rtsp"` RTSPDisable bool `json:"rtspDisable"` // deprecated Protocols Protocols `json:"protocols"` Encryption Encryption `json:"encryption"` RTSPAddress string `json:"rtspAddress"` RTSPSAddress string `json:"rtspsAddress"` RTPAddress string `json:"rtpAddress"` RTCPAddress string `json:"rtcpAddress"` MulticastIPRange string `json:"multicastIPRange"` MulticastRTPPort int `json:"multicastRTPPort"` MulticastRTCPPort int `json:"multicastRTCPPort"` ServerKey string `json:"serverKey"` ServerCert string `json:"serverCert"` AuthMethods AuthMethods `json:"authMethods"` // RTMP RTMP bool `json:"rtmp"` RTMPDisable bool `json:"rtmpDisable"` // deprecated RTMPAddress string `json:"rtmpAddress"` RTMPEncryption Encryption `json:"rtmpEncryption"` RTMPSAddress string `json:"rtmpsAddress"` RTMPServerKey string `json:"rtmpServerKey"` RTMPServerCert string `json:"rtmpServerCert"` // HLS HLS bool `json:"hls"` HLSDisable bool `json:"hlsDisable"` // depreacted HLSAddress string `json:"hlsAddress"` HLSEncryption bool `json:"hlsEncryption"` HLSServerKey string `json:"hlsServerKey"` HLSServerCert string `json:"hlsServerCert"` HLSAlwaysRemux bool `json:"hlsAlwaysRemux"` HLSVariant HLSVariant `json:"hlsVariant"` HLSSegmentCount int `json:"hlsSegmentCount"` HLSSegmentDuration StringDuration `json:"hlsSegmentDuration"` HLSPartDuration StringDuration `json:"hlsPartDuration"` HLSSegmentMaxSize StringSize `json:"hlsSegmentMaxSize"` HLSAllowOrigin string `json:"hlsAllowOrigin"` HLSTrustedProxies IPsOrCIDRs `json:"hlsTrustedProxies"` HLSDirectory string `json:"hlsDirectory"` // WebRTC WebRTC bool `json:"webrtc"` WebRTCDisable bool `json:"webrtcDisable"` // deprecated WebRTCAddress string `json:"webrtcAddress"` WebRTCEncryption bool `json:"webrtcEncryption"` WebRTCServerKey string `json:"webrtcServerKey"` WebRTCServerCert string `json:"webrtcServerCert"` WebRTCAllowOrigin string `json:"webrtcAllowOrigin"` WebRTCTrustedProxies IPsOrCIDRs `json:"webrtcTrustedProxies"` WebRTCICEServers []string `json:"webrtcICEServers"` // deprecated WebRTCICEServers2 []WebRTCICEServer `json:"webrtcICEServers2"` WebRTCICEHostNAT1To1IPs []string `json:"webrtcICEHostNAT1To1IPs"` WebRTCICEUDPMuxAddress string `json:"webrtcICEUDPMuxAddress"` WebRTCICETCPMuxAddress string `json:"webrtcICETCPMuxAddress"` // SRT SRT bool `json:"srt"` SRTAddress string `json:"srtAddress"` // paths Paths map[string]*PathConf `json:"paths"` }
Conf is a configuration.
func (*Conf) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler. It is used to set default values.
type Credential ¶
type Credential string
Credential is a parameter that is used as username or password.
func (Credential) MarshalJSON ¶
func (d Credential) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*Credential) UnmarshalEnv ¶
func (d *Credential) UnmarshalEnv(s string) error
UnmarshalEnv implements envUnmarshaler.
func (*Credential) UnmarshalJSON ¶
func (d *Credential) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Encryption ¶
type Encryption int
Encryption is the encryption parameter.
const ( EncryptionNo Encryption = iota EncryptionOptional EncryptionStrict )
supported encryption policies.
func (Encryption) MarshalJSON ¶
func (d Encryption) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*Encryption) UnmarshalEnv ¶
func (d *Encryption) UnmarshalEnv(s string) error
UnmarshalEnv implements envUnmarshaler.
func (*Encryption) UnmarshalJSON ¶
func (d *Encryption) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type HLSVariant ¶
type HLSVariant gohlslib.MuxerVariant
HLSVariant is the hlsVariant parameter.
func (HLSVariant) MarshalJSON ¶
func (d HLSVariant) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*HLSVariant) UnmarshalEnv ¶
func (d *HLSVariant) UnmarshalEnv(s string) error
UnmarshalEnv implements envUnmarshaler.
func (*HLSVariant) UnmarshalJSON ¶
func (d *HLSVariant) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type IPsOrCIDRs ¶
IPsOrCIDRs is a parameter that contains a list of IPs or CIDRs.
func (IPsOrCIDRs) MarshalJSON ¶
func (d IPsOrCIDRs) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*IPsOrCIDRs) ToTrustedProxies ¶ added in v1.0.0
func (d *IPsOrCIDRs) ToTrustedProxies() []string
ToTrustedProxies converts IPsOrCIDRs into a string slice for SetTrustedProxies.
func (*IPsOrCIDRs) UnmarshalEnv ¶
func (d *IPsOrCIDRs) UnmarshalEnv(s string) error
UnmarshalEnv implements envUnmarshaler.
func (*IPsOrCIDRs) UnmarshalJSON ¶
func (d *IPsOrCIDRs) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type LogDestinations ¶
type LogDestinations []logger.Destination
LogDestinations is the logDestionations parameter.
func (LogDestinations) MarshalJSON ¶
func (d LogDestinations) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*LogDestinations) UnmarshalEnv ¶
func (d *LogDestinations) UnmarshalEnv(s string) error
UnmarshalEnv implements envUnmarshaler.
func (*LogDestinations) UnmarshalJSON ¶
func (d *LogDestinations) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type LogLevel ¶
LogLevel is the logLevel parameter.
func (LogLevel) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*LogLevel) UnmarshalEnv ¶
UnmarshalEnv implements envUnmarshaler.
func (*LogLevel) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type PathConf ¶
type PathConf struct { Regexp *regexp.Regexp `json:"-"` // source Source string `json:"source"` // general SourceFingerprint string `json:"sourceFingerprint"` SourceOnDemand bool `json:"sourceOnDemand"` SourceOnDemandStartTimeout StringDuration `json:"sourceOnDemandStartTimeout"` SourceOnDemandCloseAfter StringDuration `json:"sourceOnDemandCloseAfter"` MaxReaders int `json:"maxReaders"` // authentication PublishUser Credential `json:"publishUser"` PublishPass Credential `json:"publishPass"` PublishIPs IPsOrCIDRs `json:"publishIPs"` ReadUser Credential `json:"readUser"` ReadPass Credential `json:"readPass"` ReadIPs IPsOrCIDRs `json:"readIPs"` // publisher OverridePublisher bool `json:"overridePublisher"` DisablePublisherOverride bool `json:"disablePublisherOverride"` // deprecated Fallback string `json:"fallback"` // rtsp SourceProtocol SourceProtocol `json:"sourceProtocol"` SourceAnyPortEnable bool `json:"sourceAnyPortEnable"` RtspRangeType RtspRangeType `json:"rtspRangeType"` RtspRangeStart string `json:"rtspRangeStart"` // redirect SourceRedirect string `json:"sourceRedirect"` // raspberry pi camera RPICameraCamID int `json:"rpiCameraCamID"` RPICameraWidth int `json:"rpiCameraWidth"` RPICameraHeight int `json:"rpiCameraHeight"` RPICameraHFlip bool `json:"rpiCameraHFlip"` RPICameraVFlip bool `json:"rpiCameraVFlip"` RPICameraBrightness float64 `json:"rpiCameraBrightness"` RPICameraContrast float64 `json:"rpiCameraContrast"` RPICameraSaturation float64 `json:"rpiCameraSaturation"` RPICameraSharpness float64 `json:"rpiCameraSharpness"` RPICameraExposure string `json:"rpiCameraExposure"` RPICameraAWB string `json:"rpiCameraAWB"` RPICameraDenoise string `json:"rpiCameraDenoise"` RPICameraShutter int `json:"rpiCameraShutter"` RPICameraMetering string `json:"rpiCameraMetering"` RPICameraGain float64 `json:"rpiCameraGain"` RPICameraEV float64 `json:"rpiCameraEV"` RPICameraROI string `json:"rpiCameraROI"` RPICameraHDR bool `json:"rpiCameraHDR"` RPICameraTuningFile string `json:"rpiCameraTuningFile"` RPICameraMode string `json:"rpiCameraMode"` RPICameraFPS float64 `json:"rpiCameraFPS"` RPICameraIDRPeriod int `json:"rpiCameraIDRPeriod"` RPICameraBitrate int `json:"rpiCameraBitrate"` RPICameraProfile string `json:"rpiCameraProfile"` RPICameraLevel string `json:"rpiCameraLevel"` RPICameraAfMode string `json:"rpiCameraAfMode"` RPICameraAfRange string `json:"rpiCameraAfRange"` RPICameraAfSpeed string `json:"rpiCameraAfSpeed"` RPICameraLensPosition float64 `json:"rpiCameraLensPosition"` RPICameraAfWindow string `json:"rpiCameraAfWindow"` RPICameraTextOverlayEnable bool `json:"rpiCameraTextOverlayEnable"` RPICameraTextOverlay string `json:"rpiCameraTextOverlay"` // external commands RunOnInit string `json:"runOnInit"` RunOnInitRestart bool `json:"runOnInitRestart"` RunOnDemand string `json:"runOnDemand"` RunOnDemandRestart bool `json:"runOnDemandRestart"` RunOnDemandStartTimeout StringDuration `json:"runOnDemandStartTimeout"` RunOnDemandCloseAfter StringDuration `json:"runOnDemandCloseAfter"` RunOnReady string `json:"runOnReady"` RunOnReadyRestart bool `json:"runOnReadyRestart"` RunOnRead string `json:"runOnRead"` RunOnReadRestart bool `json:"runOnReadRestart"` }
PathConf is a path configuration.
func (PathConf) HasOnDemandPublisher ¶
HasOnDemandPublisher checks whether the path has a on-demand publisher.
func (PathConf) HasOnDemandStaticSource ¶
HasOnDemandStaticSource checks whether the path has a on demand static source.
func (PathConf) HasStaticSource ¶
HasStaticSource checks whether the path has a static source.
func (*PathConf) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler. It is used to set default values.
type Protocols ¶
type Protocols map[Protocol]struct{}
Protocols is the protocols parameter.
func (Protocols) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Protocols) UnmarshalEnv ¶
UnmarshalEnv implements envUnmarshaler.
func (*Protocols) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type RtspRangeType ¶
type RtspRangeType int
RtspRangeType is the type used in the Range header.
const ( RtspRangeTypeUndefined RtspRangeType = iota RtspRangeTypeClock RtspRangeTypeNPT RtspRangeTypeSMPTE )
supported rtsp range types.
func (RtspRangeType) MarshalJSON ¶
func (d RtspRangeType) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*RtspRangeType) UnmarshalEnv ¶
func (d *RtspRangeType) UnmarshalEnv(s string) error
UnmarshalEnv implements envUnmarshaler.
func (*RtspRangeType) UnmarshalJSON ¶
func (d *RtspRangeType) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type SourceProtocol ¶
type SourceProtocol struct {
*gortsplib.Transport
}
SourceProtocol is the sourceProtocol parameter.
func (SourceProtocol) MarshalJSON ¶
func (d SourceProtocol) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*SourceProtocol) UnmarshalEnv ¶
func (d *SourceProtocol) UnmarshalEnv(s string) error
UnmarshalEnv implements envUnmarshaler.
func (*SourceProtocol) UnmarshalJSON ¶
func (d *SourceProtocol) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type StringDuration ¶
StringDuration is a duration that is unmarshaled from a string. Durations are normally unmarshaled from numbers.
func (StringDuration) MarshalJSON ¶
func (d StringDuration) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*StringDuration) UnmarshalEnv ¶
func (d *StringDuration) UnmarshalEnv(s string) error
UnmarshalEnv implements envUnmarshaler.
func (*StringDuration) UnmarshalJSON ¶
func (d *StringDuration) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type StringSize ¶
type StringSize uint64
StringSize is a size that is unmarshaled from a string.
func (StringSize) MarshalJSON ¶
func (s StringSize) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*StringSize) UnmarshalEnv ¶
func (s *StringSize) UnmarshalEnv(v string) error
UnmarshalEnv implements envUnmarshaler.
func (*StringSize) UnmarshalJSON ¶
func (s *StringSize) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type WebRTCICEServer ¶ added in v0.23.7
type WebRTCICEServer struct { URL string `json:"url"` Username string `json:"username"` Password string `json:"password"` }
WebRTCICEServer is a WebRTC ICE Server.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package decrypt contains the Decrypt function.
|
Package decrypt contains the Decrypt function. |
Package env contains a function to load configuration from environment.
|
Package env contains a function to load configuration from environment. |
Package yaml contains a yaml loader.
|
Package yaml contains a yaml loader. |