Documentation
¶
Index ¶
- Variables
- func CORSMiddleware() gin.HandlerFunc
- func HTTPAPIServerStreamCodec(c *gin.Context)
- func HTTPAPIServerStreamWebRTC(c *gin.Context)
- func HTTPAPIServerStreamWebRTC2(c *gin.Context)
- func RTSPWorker(name string, ctx context.Context, url string, ...) (error, bool)
- func RTSPWorkerLoop(name string, ctx context.Context, url string, ...)
- func RemoveStream(name string)
- func ServeGin(router *gin.Engine)
- func ServeStream(name string, config StreamST)
- func SetConfig(c *ConfigST)
- type ConfigST
- func (element *ConfigST) GetICECredential() string
- func (element *ConfigST) GetICEServers() []string
- func (element *ConfigST) GetICEUsername() string
- func (element *ConfigST) GetWebRTCPortMax() uint16
- func (element *ConfigST) GetWebRTCPortMin() uint16
- func (element *ConfigST) HasViewer(uuid string) bool
- func (element *ConfigST) List() (string, []string)
- func (element *ConfigST) RunIFNotRun(uuid string)
- func (element *ConfigST) RunUnlock(uuid string)
- type JCodec
- type Response
- type ResponseError
- type ServerST
- type StreamST
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware() gin.HandlerFunc
func HTTPAPIServerStreamCodec ¶
HTTPAPIServerStreamCodec stream codec
func HTTPAPIServerStreamWebRTC ¶
HTTPAPIServerStreamWebRTC stream video over WebRTC
func RTSPWorker ¶
func RTSPWorkerLoop ¶
func RemoveStream ¶ added in v0.1.3
func RemoveStream(name string)
func ServeStream ¶
Types ¶
type ConfigST ¶
type ConfigST struct { Server ServerST `json:"server"` Streams map[string]StreamST `json:"streams"` LastError error // contains filtered or unexported fields }
ConfigST struct
var Config *ConfigST
Config global
func (*ConfigST) GetICECredential ¶
func (*ConfigST) GetICEServers ¶
func (*ConfigST) GetICEUsername ¶
func (*ConfigST) GetWebRTCPortMax ¶
func (*ConfigST) GetWebRTCPortMin ¶
func (*ConfigST) RunIFNotRun ¶
type ResponseError ¶
type ResponseError struct {
Error string `json:"error"`
}
type ServerST ¶
type ServerST struct { HTTPPort string `json:"http_port"` ICEServers []string `json:"ice_servers"` ICEUsername string `json:"ice_username"` ICECredential string `json:"ice_credential"` WebRTCPortMin uint16 `json:"webrtc_port_min"` WebRTCPortMax uint16 `json:"webrtc_port_max"` }
ServerST struct
type StreamST ¶
type StreamST struct { URL string `json:"url"` Status bool `json:"status"` OnDemand bool `json:"on_demand"` DisableAudio bool `json:"disable_audio"` Debug bool `json:"debug"` RunLock bool `json:"-"` Codecs []av.CodecData Cl map[string]viewer Cancel context.CancelFunc }
StreamST struct
Click to show internal directories.
Click to hide internal directories.