Documentation ¶
Index ¶
- Constants
- func BasicAuth(authLine string, method string, URL string) (string, error)
- func DigestAuth(authLine string, method string, URL string) (string, error)
- func ListenRtsp(addr string) error
- func ParseSDP(sdpRaw string) map[string]*SDPInfo
- type RTPInfo
- type RTSP
- func (session *RTSP) AcceptPush()
- func (session *RTSP) CheckAuth(authLine string, method string) error
- func (rtsp *RTSP) PullStream(streamPath string, rtspUrl string) (err error)
- func (client *RTSP) Request(method string, headers map[string]string) (*Response, error)
- func (client *RTSP) RequestNoResp(method string, headers map[string]string) (err error)
- func (client *RTSP) RequestWithPath(method string, path string, headers map[string]string, needResp bool) (resp *Response, err error)
- func (session *RTSP) SendRTP(pack *RTPPack) (err error)
- func (session *RTSP) SessionString() string
- func (session *RTSP) Stop()
- type RTSPClientInfo
- type RTSPInfo
- type Request
- type Response
- type RichConn
- type SDPInfo
- type SessionType
- type TransType
- type UDPClient
- type UDPServer
Constants ¶
View Source
const ( // Client to server for presentation and stream objects; recommended DESCRIBE = "DESCRIBE" // Bidirectional for client and stream objects; optional ANNOUNCE = "ANNOUNCE" // Bidirectional for client and stream objects; optional GET_PARAMETER = "GET_PARAMETER" // Bidirectional for client and stream objects; required for Client to server, optional for server to client OPTIONS = "OPTIONS" // Client to server for presentation and stream objects; recommended PAUSE = "PAUSE" // Client to server for presentation and stream objects; required PLAY = "PLAY" // Client to server for presentation and stream objects; optional RECORD = "RECORD" // Server to client for presentation and stream objects; optional REDIRECT = "REDIRECT" // Client to server for stream objects; required SETUP = "SETUP" // Bidirectional for presentation and stream objects; optional SET_PARAMETER = "SET_PARAMETER" // Client to server for presentation and stream objects; required TEARDOWN = "TEARDOWN" DATA = "DATA" )
View Source
const (
RTP_FIXED_HEADER_LENGTH = 12
)
View Source
const (
RTSP_VERSION = "RTSP/1.0"
)
View Source
const UDP_BUF_SIZE = 1048576
Variables ¶
This section is empty.
Functions ¶
func ListenRtsp ¶
Types ¶
type RTPInfo ¶
type RTSP ¶
type RTSP struct { RTP RTSPInfo RTSPClientInfo ID string Conn *RichConn Type SessionType TransType TransType SDPMap map[string]*SDPInfo ASdp *SDPInfo VSdp *SDPInfo Timeout int UDPServer *UDPServer UDPClient *UDPClient Auth func(string) string // contains filtered or unexported fields }
func (*RTSP) PullStream ¶
PullStream 从外部拉流
func (*RTSP) RequestNoResp ¶
func (*RTSP) RequestWithPath ¶
func (*RTSP) SessionString ¶
type RTSPClientInfo ¶
type Request ¶
type Request struct { Method string URL string Version string Header map[string]string Content string Body string }
func NewRequest ¶
func (*Request) GetContentLength ¶
type Response ¶
type Response struct { Version string StatusCode int Status string Header map[string]interface{} Body string }
func NewResponse ¶
type SessionType ¶
type SessionType int
const ( SESSION_TYPE_PUSHER SessionType = iota SESSEION_TYPE_PLAYER )
func (SessionType) String ¶
func (st SessionType) String() string
type UDPClient ¶
type UDPClient struct { APort int AConn *net.UDPConn AControlPort int AControlConn *net.UDPConn VPort int VConn *net.UDPConn VControlPort int VControlConn *net.UDPConn Stoped bool }
func (*UDPClient) SetupAudio ¶
func (*UDPClient) SetupVideo ¶
type UDPServer ¶
func (*UDPServer) AddInputBytes ¶
func (*UDPServer) SetupAudio ¶
func (*UDPServer) SetupVideo ¶
Click to show internal directories.
Click to hide internal directories.