update docs

This commit is contained in:
aler9
2020-07-12 23:08:03 +02:00
parent 71824f42dc
commit d94a3e94ed

View File

@@ -187,8 +187,9 @@ func (c *ConnClient) Options(u *url.URL) (*Response, error) {
return res, nil return res, nil
} }
// Describe writes a DESCRIBE request and reads a response, that contains // Describe writes a DESCRIBE request, that means that we want to obtain the SDP
// a SDP document that describes the stream available in the given url. // document that describes the stream available in the given url. It then
// reads a Response.
func (c *ConnClient) Describe(u *url.URL) (*sdp.SessionDescription, *Response, error) { func (c *ConnClient) Describe(u *url.URL) (*sdp.SessionDescription, *Response, error) {
res, err := c.Do(&Request{ res, err := c.Do(&Request{
Method: DESCRIBE, Method: DESCRIBE,
@@ -288,9 +289,8 @@ func (c *ConnClient) setup(u *url.URL, media *sdp.MediaDescription, transport []
return res, nil return res, nil
} }
// SetupUdp writes a SETUP request, that indicates that we want to read // SetupUdp writes a SETUP request, that means that we want to read
// a track with given media and given id with the UDP transport, // a track with given media, id and the UDP transport. It then reads a Response.
// and reads a response.
func (c *ConnClient) SetupUdp(u *url.URL, media *sdp.MediaDescription, func (c *ConnClient) SetupUdp(u *url.URL, media *sdp.MediaDescription,
rtpPort int, rtcpPort int) (int, int, *Response, error) { rtpPort int, rtcpPort int) (int, int, *Response, error) {
@@ -317,9 +317,8 @@ func (c *ConnClient) SetupUdp(u *url.URL, media *sdp.MediaDescription,
return rtpServerPort, rtcpServerPort, res, nil return rtpServerPort, rtcpServerPort, res, nil
} }
// SetupTcp writes a SETUP request, that indicates that we want to read // SetupTcp writes a SETUP request, that means that we want to read
// a track with given media and given id with the TCP transport, // a track with given media, given id and the TCP transport. It then reads a Response.
// and reads a response.
func (c *ConnClient) SetupTcp(u *url.URL, media *sdp.MediaDescription, trackId int) (*Response, error) { func (c *ConnClient) SetupTcp(u *url.URL, media *sdp.MediaDescription, trackId int) (*Response, error) {
interleaved := fmt.Sprintf("interleaved=%d-%d", (trackId * 2), (trackId*2)+1) interleaved := fmt.Sprintf("interleaved=%d-%d", (trackId * 2), (trackId*2)+1)
@@ -346,8 +345,8 @@ func (c *ConnClient) SetupTcp(u *url.URL, media *sdp.MediaDescription, trackId i
return res, nil return res, nil
} }
// Play writes a PLAY request, that indicates that we want to start the // Play writes a PLAY request, that means that we want to start the
// stream, and reads a response. // stream. It then reads a Response.
func (c *ConnClient) Play(u *url.URL) (*Response, error) { func (c *ConnClient) Play(u *url.URL) (*Response, error) {
err := c.writeRequest(&Request{ err := c.writeRequest(&Request{
Method: PLAY, Method: PLAY,