From b43f6f8072e3e8fe38566ec44352827bff58aa65 Mon Sep 17 00:00:00 2001 From: Saxon Date: Tue, 23 Apr 2019 14:16:40 +0930 Subject: [PATCH] protocol/rtcp: renamed highestSequence() to sequence. --- protocol/rtcp/client.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/protocol/rtcp/client.go b/protocol/rtcp/client.go index fda4f866..06261ef1 100644 --- a/protocol/rtcp/client.go +++ b/protocol/rtcp/client.go @@ -61,7 +61,7 @@ type Client struct { name string // Name of the client for source description purposes. sourceSSRC uint32 // Source identifier of this client. mu sync.Mutex // Will be used to change parameters during operation safely. - sequence uint32 // Last RTP sequence number. + seq uint32 // Last RTP sequence number. senderTs [8]byte // The timestamp of the last sender report. interval time.Duration // Interval between sender report and receiver report. receiveTime time.Time // Time last sender report was received. @@ -177,7 +177,7 @@ func (c *Client) send() { SSRC: c.sourceSSRC, FractionLost: 0, PacketsLost: math.MaxUint32, - HighestSequence: c.highestSequence(), + HighestSequence: c.sequence(), Jitter: c.jitter(), LSR: c.lastSenderTs(), DLSR: c.delay(), @@ -242,14 +242,14 @@ func (c *Client) parse(buf []byte) { // through an RTP stream. func (c *Client) SetSequence(s uint32) { c.mu.Lock() - c.sequence = s + c.seq = s c.mu.Unlock() } -// highestSequence will return the highest sequence number received through RTP. -func (c *Client) highestSequence() uint32 { +// sequence will return the highest sequence number received through RTP. +func (c *Client) sequence() uint32 { c.mu.Lock() - s := c.sequence + s := c.seq c.mu.Unlock() return s }