Documentation ¶
Overview ¶
The MIT License (MIT)
Copyright (c) 2023 Winlin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The MIT License (MIT)
Copyright (c) 2023 Winlin ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FFmpegClient ¶
type FFmpegClient interface { ServiceRunner ServiceReadyQuerier }
func NewFFmpeg ¶
func NewFFmpeg(opts ...func(v *ffmpegClient)) FFmpegClient
type FFprobeClient ¶
type FFprobeClient interface { ServiceRunner // ProbeDoneCtx indicates the probe is done. ProbeDoneCtx() context.Context // Result return the raw string and metadata. Result() (string, *ffprobeObject) }
func NewFFprobe ¶
func NewFFprobe(opts ...func(v *ffprobeClient)) FFprobeClient
type HooksEvent ¶
type HooksEvent interface {
HookAction() string
}
type HooksEventBase ¶
type HooksEventBase struct {
Action string `json:"action"`
}
func (*HooksEventBase) HookAction ¶
func (v *HooksEventBase) HookAction() string
type HooksEventOnDvr ¶
type HooksEventOnDvr struct { HooksEventBase Stream string `json:"stream"` StreamUrl string `json:"stream_url"` StreamID string `json:"stream_id"` CWD string `json:"cwd"` File string `json:"file"` TcUrl string `json:"tcUrl"` App string `json:"app"` Vhost string `json:"vhost"` IP string `json:"ip"` ClientIP string `json:"client_id"` ServerID string `json:"server_id"` }
type HooksService ¶
type HooksService interface { ServiceRunner ServiceReadyQuerier HooksAPI() int HooksEvents() <-chan HooksEvent }
func NewHooksService ¶
func NewHooksService(opts ...func(v *hooksService)) HooksService
type SRSPortAllocator ¶
type SRSPortAllocator struct {
// contains filtered or unexported fields
}
The SRSPortAllocator is SRS port manager.
func NewSRSPortAllocator ¶
func NewSRSPortAllocator() *SRSPortAllocator
func (*SRSPortAllocator) Allocate ¶
func (v *SRSPortAllocator) Allocate() int
func (*SRSPortAllocator) Free ¶
func (v *SRSPortAllocator) Free(port int)
type SRSServer ¶
type SRSServer interface { ServiceRunner ServiceReadyQuerier // WorkDir is the current working directory for SRS. WorkDir() string // RTMPPort is the RTMP stream port. RTMPPort() int // HTTPPort is the HTTP stream port. HTTPPort() int // APIPort is the HTTP API port. APIPort() int // SRTPort is the SRT UDP port. SRTPort() int }
SRSServer is the interface for SRS server.
func NewSRSServer ¶
func NewSRSServer(opts ...func(v *srsServer)) SRSServer
type ServiceReadyQuerier ¶
ServiceReadyQuerier is an interface to detect whether service is ready.
type ServiceRunner ¶
type ServiceRunner interface {
Run(ctx context.Context, cancel context.CancelFunc) error
}
ServiceRunner is an interface to run backend service.