This commit is contained in:
aler9
2020-07-19 18:01:49 +02:00
parent 511d109e8d
commit e5d15bc157
6 changed files with 14 additions and 13 deletions

View File

@@ -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
)

View File

@@ -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)

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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
)