diff --git a/protocol/rtcp/client.go b/protocol/rtcp/client.go index ce2ad88d..c32696f1 100644 --- a/protocol/rtcp/client.go +++ b/protocol/rtcp/client.go @@ -174,13 +174,13 @@ func (c *Client) send() { SenderSSRC: senderSSRC, Blocks: []ReportBlock{ ReportBlock{ - SSRC: c.sourceSSRC, - FractionLost: 0, - PacketsLost: math.MaxUint32, - HighestSequence: c.sequence(), - Jitter: c.jitter(), - LSR: c.lastSenderTs(), - DLSR: c.delay(), + SourceIdentifier: c.sourceSSRC, + FractionLost: 0, + PacketsLost: math.MaxUint32, + HighestSequence: c.sequence(), + Jitter: c.jitter(), + SenderReportTs: c.lastSenderTs(), + SenderReportDelay: c.delay(), }, }, Extensions: nil, diff --git a/protocol/rtcp/client_test.go b/protocol/rtcp/client_test.go index dd7a6ff4..db515c16 100644 --- a/protocol/rtcp/client_test.go +++ b/protocol/rtcp/client_test.go @@ -69,13 +69,13 @@ func TestFormPayload(t *testing.T) { SenderSSRC: 3605043418, Blocks: []ReportBlock{ ReportBlock{ - SSRC: 1873625286, - FractionLost: 0, - PacketsLost: math.MaxUint32, - HighestSequence: 99080, - Jitter: 32, - LSR: 3118540074, - DLSR: 11257, + SourceIdentifier: 1873625286, + FractionLost: 0, + PacketsLost: math.MaxUint32, + HighestSequence: 99080, + Jitter: 32, + SenderReportTs: 3118540074, + SenderReportDelay: 11257, }, }, Extensions: nil, diff --git a/protocol/rtcp/rtcp.go b/protocol/rtcp/rtcp.go index 109e129e..0e74d08f 100644 --- a/protocol/rtcp/rtcp.go +++ b/protocol/rtcp/rtcp.go @@ -39,12 +39,11 @@ const ( typeSourceDescription = 202 ) -// SDES Item types. +// Source Description Item types. const ( typeCName = 1 ) -// MISC. const ( reportBlockSize = 6 senderReportSize = 28 @@ -71,13 +70,13 @@ func (r *ReceiverReport) Bytes(buf []byte) []byte { idx := 8 for _, b := range r.Blocks { - binary.BigEndian.PutUint32(buf[idx:], b.SSRC) + binary.BigEndian.PutUint32(buf[idx:], b.SourceIdentifier) binary.BigEndian.PutUint32(buf[idx+4:], b.PacketsLost) buf[idx+4] = b.FractionLost binary.BigEndian.PutUint32(buf[idx+8:], b.HighestSequence) binary.BigEndian.PutUint32(buf[idx+12:], b.Jitter) - binary.BigEndian.PutUint32(buf[idx+16:], b.LSR) - binary.BigEndian.PutUint32(buf[idx+20:], b.DLSR) + binary.BigEndian.PutUint32(buf[idx+16:], b.SenderReportTs) + binary.BigEndian.PutUint32(buf[idx+20:], b.SenderReportDelay) idx += 24 } @@ -91,13 +90,13 @@ func (r *ReceiverReport) Bytes(buf []byte) []byte { // ReportBlock describes an RTCP report block used in Sender/Receiver Reports. type ReportBlock struct { - SSRC uint32 // Source identifier. - FractionLost uint8 // Fraction of packets lost. - PacketsLost uint32 // Cumulative number of packets lost. - HighestSequence uint32 // Extended highest sequence number received. - Jitter uint32 // Interarrival jitter. - LSR uint32 // Last sender report timestamp. - DLSR uint32 // Delay since last sender report. + SourceIdentifier uint32 // Source identifier. + FractionLost uint8 // Fraction of packets lost. + PacketsLost uint32 // Cumulative number of packets lost. + HighestSequence uint32 // Extended highest sequence number received. + Jitter uint32 // Interarrival jitter. + SenderReportTs uint32 // Last sender report timestamp. + SenderReportDelay uint32 // Delay since last sender report. } // SourceDescription describes a source description RTCP packet. diff --git a/protocol/rtcp/rtcp_test.go b/protocol/rtcp/rtcp_test.go index e53d384f..4eb458ce 100644 --- a/protocol/rtcp/rtcp_test.go +++ b/protocol/rtcp/rtcp_test.go @@ -57,13 +57,13 @@ func TestReceiverReportBytes(t *testing.T) { SenderSSRC: 3605043418, Blocks: []ReportBlock{ ReportBlock{ - SSRC: 1873625286, - FractionLost: 0, - PacketsLost: math.MaxUint32, - HighestSequence: 99080, - Jitter: 32, - LSR: 3118540074, - DLSR: 11257, + SourceIdentifier: 1873625286, + FractionLost: 0, + PacketsLost: math.MaxUint32, + HighestSequence: 99080, + Jitter: 32, + SenderReportTs: 3118540074, + SenderReportDelay: 11257, }, }, Extensions: nil,