diff --git a/conn-client.go b/conn-client.go index 8a71bf4e..4de2dc4a 100644 --- a/conn-client.go +++ b/conn-client.go @@ -573,10 +573,10 @@ func (c *ConnClient) Play(u *url.URL) (*Response, error) { return res, nil } -// LoopUDP must be called after SetupUDP() and Play(); it keeps +// LoopUdp must be called after SetupUDP() and Play(); it keeps // the TCP connection open through keepalives, and returns when the TCP // connection closes. -func (c *ConnClient) LoopUDP(u *url.URL) error { +func (c *ConnClient) LoopUdp(u *url.URL) error { // send a first keepalive before starting reading _, err := c.Do(&Request{ Method: OPTIONS, diff --git a/examples/client-tcp.go b/examples/client-tcp.go index 50dd2fc6..22ed3611 100644 --- a/examples/client-tcp.go +++ b/examples/client-tcp.go @@ -54,7 +54,7 @@ func main() { break } - fmt.Printf("packet from track %d, type %v: %v\n", + fmt.Printf("frame from track %d, type %v: %v\n", frame.TrackId, frame.StreamType, frame.Content) } } diff --git a/examples/client-udp.go b/examples/client-udp.go index 9419cbed..8676bbde 100644 --- a/examples/client-udp.go +++ b/examples/client-udp.go @@ -60,7 +60,7 @@ func main() { for trackId, lp := range listeners { wg.Add(2) - // receive RTP packets + // receive RTP frames go func(trackId int, l *gortsplib.ConnClientUdpListener) { defer wg.Done() @@ -71,11 +71,11 @@ func main() { break } - fmt.Printf("packet from track %d, type RTP: %v\n", trackId, buf[:n]) + fmt.Printf("frame from track %d, type RTP: %v\n", trackId, buf[:n]) } }(trackId, lp.rtpl) - // receive RTCP packets + // receive RTCP frames go func(trackId int, l *gortsplib.ConnClientUdpListener) { defer wg.Done() @@ -86,12 +86,12 @@ func main() { break } - fmt.Printf("packet from track %d, type RTCP: %v\n", trackId, buf[:n]) + fmt.Printf("frame from track %d, type RTCP: %v\n", trackId, buf[:n]) } }(trackId, lp.rtcpl) } - err = conn.LoopUDP(u) + err = conn.LoopUdp(u) fmt.Println("connection is closed (%s)", err) for _, lp := range listeners {