mirror of
https://github.com/aler9/gortsplib
synced 2025-10-07 08:01:14 +08:00
fix docs
This commit is contained in:
4
auth.go
4
auth.go
@@ -20,10 +20,10 @@ func md5Hex(in string) string {
|
||||
type AuthMethod int
|
||||
|
||||
const (
|
||||
// basic authentication method
|
||||
// Basic authentication method
|
||||
Basic AuthMethod = iota
|
||||
|
||||
// digest authentication method
|
||||
// Digest authentication method
|
||||
Digest
|
||||
)
|
||||
|
||||
|
@@ -316,7 +316,7 @@ func (c *ConnClient) setup(u *url.URL, media *sdp.MediaDescription, transport []
|
||||
}
|
||||
|
||||
// SetupUdp writes a SETUP request, that means that we want to read
|
||||
// a track with given media, id and the UDP transport. It then reads a Response.
|
||||
// a given track with the UDP transport. It then reads a Response.
|
||||
func (c *ConnClient) SetupUdp(u *url.URL, track *Track, rtpPort int,
|
||||
rtcpPort int) (int, int, *Response, error) {
|
||||
|
||||
@@ -343,7 +343,7 @@ func (c *ConnClient) SetupUdp(u *url.URL, track *Track, rtpPort int,
|
||||
}
|
||||
|
||||
// SetupTcp writes a SETUP request, that means that we want to read
|
||||
// a track with given media, given id and the TCP transport. It then reads a Response.
|
||||
// a given track with the TCP transport. It then reads a Response.
|
||||
func (c *ConnClient) SetupTcp(u *url.URL, track *Track) (*Response, error) {
|
||||
interleaved := fmt.Sprintf("interleaved=%d-%d", (track.Id * 2), (track.Id*2)+1)
|
||||
|
||||
|
@@ -11,8 +11,8 @@ const (
|
||||
interleavedFrameMagicByte = 0x24
|
||||
)
|
||||
|
||||
// InterleavedFrame is an object that allows to send and receive binary data
|
||||
// within RTSP connections. It is used to send RTP and RTCP packets via TCP.
|
||||
// InterleavedFrame is a structure that allows to transfer binary frames
|
||||
// through RTSP TCP connections. It is used to send RTP and RTCP packets via TCP.
|
||||
type InterleavedFrame struct {
|
||||
// track id
|
||||
TrackId int
|
||||
|
@@ -13,9 +13,10 @@ const (
|
||||
requestMaxProtocolLength = 128
|
||||
)
|
||||
|
||||
// Method is a RTSP request method.
|
||||
// Method is the method of a RTSP request.
|
||||
type Method string
|
||||
|
||||
// standard methods
|
||||
const (
|
||||
ANNOUNCE Method = "ANNOUNCE"
|
||||
DESCRIBE Method = "DESCRIBE"
|
||||
|
@@ -9,8 +9,8 @@ import (
|
||||
// StatusCode is the status code of a RTSP response.
|
||||
type StatusCode int
|
||||
|
||||
// standard status codes
|
||||
const (
|
||||
// standard status codes
|
||||
StatusContinue StatusCode = 100
|
||||
StatusOK StatusCode = 200
|
||||
StatusMovedPermanently StatusCode = 301
|
||||
|
10
utils.go
10
utils.go
@@ -15,13 +15,13 @@ const (
|
||||
type StreamProtocol int
|
||||
|
||||
const (
|
||||
// invalid protocol
|
||||
// StreamProtocolInvalid is an invalid protocol
|
||||
StreamProtocolInvalid StreamProtocol = iota
|
||||
|
||||
// UDP protocol
|
||||
// StreamProtocolUdp means that the stream uses the UDP\ protocol
|
||||
StreamProtocolUdp
|
||||
|
||||
// TCP protocol
|
||||
// StreamProtocolTcp means that the stream uses the TCP protocol
|
||||
StreamProtocolTcp
|
||||
)
|
||||
|
||||
@@ -37,10 +37,10 @@ func (sp StreamProtocol) String() string {
|
||||
type StreamType int
|
||||
|
||||
const (
|
||||
// stream that contains RTP packets
|
||||
// StreamTypeRtp means that the stream contains RTP packets
|
||||
StreamTypeRtp StreamType = iota + 1
|
||||
|
||||
// stream that contains RTCP packets
|
||||
// StreamTypeRtp means that the stream contains RTCP packets
|
||||
StreamTypeRtcp
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user