diff --git a/auth.go b/auth.go index 1439a0f8..478ad308 100644 --- a/auth.go +++ b/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 ) diff --git a/conn-client.go b/conn-client.go index 84815e61..8a83b2e6 100644 --- a/conn-client.go +++ b/conn-client.go @@ -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) diff --git a/interleaved-frame.go b/interleaved-frame.go index e6094a22..60b1eb0c 100644 --- a/interleaved-frame.go +++ b/interleaved-frame.go @@ -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 diff --git a/request.go b/request.go index 87906c60..ac476d70 100644 --- a/request.go +++ b/request.go @@ -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" diff --git a/response.go b/response.go index 60bead40..44c1e841 100644 --- a/response.go +++ b/response.go @@ -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 diff --git a/utils.go b/utils.go index 05319069..6c18612a 100644 --- a/utils.go +++ b/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 )