Documentation ¶
Overview ¶
Author: Benehiko Modified Date: 2020/12/10 Contact: alanoterblanche@gmail.com | https://github.com/Benehiko
RtspClient is greatly inspired by github.com/deepch/RTSPtoWebRTC RtspClient only wraps and simplifies their code to fit inside this library.
Author: Benehiko Modified Date: 2020/12/10 Contact: alanoterblanche@gmail.com | https://github.com/Benehiko
WebRtcClient is greatly inspired by github.com/deepch/RTSPtoWebRTC WebRtcClient only wraps and simplifies their code to fit inside this library.
Index ¶
- type OptionRtspClient
- func WithDebug(debug bool) OptionRtspClient
- func WithEndpoint(endpoint string) OptionRtspClient
- func WithHost(host string) OptionRtspClient
- func WithPassword(password string) OptionRtspClient
- func WithPort(port int) OptionRtspClient
- func WithRetry(retryCount int) OptionRtspClient
- func WithTimeout(timeout int) OptionRtspClient
- func WithUsername(username string) OptionRtspClient
- type RtspClient
- type Stream
- type WebRtcClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionRtspClient ¶
type OptionRtspClient interface {
// contains filtered or unexported methods
}
func WithDebug ¶
func WithDebug(debug bool) OptionRtspClient
func WithEndpoint ¶
func WithEndpoint(endpoint string) OptionRtspClient
func WithHost ¶
func WithHost(host string) OptionRtspClient
Change the rtsp connection host (ip address or domain)
func WithPassword ¶
func WithPassword(password string) OptionRtspClient
func WithPort ¶
func WithPort(port int) OptionRtspClient
func WithRetry ¶
func WithRetry(retryCount int) OptionRtspClient
func WithTimeout ¶
func WithTimeout(timeout int) OptionRtspClient
Change the network timeout in seconds
func WithUsername ¶
func WithUsername(username string) OptionRtspClient
type RtspClient ¶
func NewRtspClient ¶
func NewRtspClient(host string, opts ...OptionRtspClient) *RtspClient
Create a new RTSP client Defaults: Timeout: 10 * time.Second Debug: false RetryCount: 5 Port: 554
func (*RtspClient) OpenStream ¶
func (rc *RtspClient) OpenStream()
type Stream ¶
stream contains all the necessary information of the stream. stream packet contains audio and video
type WebRtcClient ¶
type WebRtcClient struct { Ready chan bool SDP chan string RTSP *RtspClient }
func NewWebRtcClient ¶
func NewWebRtcClient(rtspClient *RtspClient) *WebRtcClient
func (*WebRtcClient) OpenWebRtcStream ¶
func (wrtc *WebRtcClient) OpenWebRtcStream(sdpData string)
Open a WebRTC Stream from the RTSP Stream Credit for most of this code goes to deepch https://github.com/deepch/RTSPtoWebRTC