Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptureOption ¶
type CaptureOption func(*captureOptions)
func WithLogger ¶
func WithLogger(logger *slog.Logger) CaptureOption
type Config ¶
type Config struct {
Id string `json:"id" validate:"required"`
Disabled bool `json:"disabled"`
Address netip.Addr `json:"address" validate:"required"`
Credentials *UsernamePasswordCredentialConfig `json:"credentials"`
Streams []StreamConfig `json:"streams" validate:"dive"`
}
func (Config) Stream ¶
func (cfg Config) Stream(id string) *StreamConfig
type Dimensions ¶
type FFMPEGRecording ¶
type FFMPEGRecording struct {
// contains filtered or unexported fields
}
func (*FFMPEGRecording) Close ¶
func (recording *FFMPEGRecording) Close() error
func (*FFMPEGRecording) OutputPath ¶
func (recording *FFMPEGRecording) OutputPath() string
type IPCamera ¶
type IPCamera struct {
// contains filtered or unexported fields
}
func (*IPCamera) StreamIdsWithTag ¶ added in v0.9.0
type MJPEGServer ¶
type MJPEGServer struct {
// contains filtered or unexported fields
}
func NewMJPEGServer ¶
func NewMJPEGServer(cfg Config) (*MJPEGServer, error)
func (*MJPEGServer) Close ¶
func (mjpegServer *MJPEGServer) Close() error
func (*MJPEGServer) ServeMux ¶
func (mjpegServer *MJPEGServer) ServeMux() *http.ServeMux
type MJPEGStream ¶
type MJPEGStream struct {
// contains filtered or unexported fields
}
func NewMJPEGStream ¶
func NewMJPEGStream(cfg Config, streamCfg StreamConfig, httpClient *http.Client) (*MJPEGStream, error)
func (*MJPEGStream) Close ¶
func (mjpegStream *MJPEGStream) Close() error
func (*MJPEGStream) ServeHTTP ¶
func (mjpegStream *MJPEGStream) ServeHTTP(w http.ResponseWriter, r *http.Request)
type StreamConfig ¶
type StreamConfig struct {
Id string `json:"id" validate:"required"`
Disabled bool `json:"disabled"`
Tags []string `json:"tags"`
Credentials *UsernamePasswordCredentialConfig `json:"credentials"`
Type StreamType `json:"type" validate:"required"`
Port uint16 `json:"port"`
Path string `json:"path"`
Timeout time.Duration `json:"timeout"`
Dimensions *Dimensions `json:"dimensions"`
}
func (StreamConfig) ResolveCredentials ¶
func (streamConfig StreamConfig) ResolveCredentials(cfg Config) *UsernamePasswordCredentialConfig
func (StreamConfig) ResolveURLHost ¶
func (streamConfig StreamConfig) ResolveURLHost(cfg Config) string
type StreamType ¶
type StreamType string
const ( StreamTypeRTSPOverUDP StreamType = "rtsp/udp" StreamTypeRTSPOverTCP StreamType = "rtsp/tcp" StreamTypeRTSPOverUDPMulticast StreamType = "rtsp/udp-multicast" StreamTypeRTSPOverHTTP StreamType = "rtsp/http" StreamTypeMJPEGOverHTTP StreamType = "mjpeg/http" )
func (StreamType) MarshalText ¶
func (streamType StreamType) MarshalText() ([]byte, error)
func (StreamType) String ¶
func (streamType StreamType) String() string
func (*StreamType) UnmarshalText ¶
func (streamType *StreamType) UnmarshalText(b []byte) error
Click to show internal directories.
Click to hide internal directories.