Class: RTCP::RR

Inherits:
SR show all
Defined in:
lib/rtcp/rr.rb

Overview

RR: Receiver Report RTCP Packet Documentation: RFC 3550, 6.4.2

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

header |V=2|P| RC | PT=RR=201 | length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SSRC of packet sender | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ report | SSRC_1 (SSRC of first source) | block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1 | fraction lost | cumulative number of packets lost | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | extended highest sequence number received | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | interarrival jitter | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | last SR (LSR) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | delay since last SR (DLSR) | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ report | SSRC_2 (SSRC of second source) | block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2 : ... : +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | profile-specific extensions | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Constant Summary collapse

PT_ID =
201

Constants inherited from RTCP

VERSION

Instance Attribute Summary collapse

Attributes inherited from SR

#ntp_timestamp, #octet_count, #packet_count, #rtp_timestamp

Attributes inherited from RTCP

#length, #type_id

Instance Method Summary collapse

Methods inherited from RTCP

decode, decode_all, #to_s

Instance Attribute Details

#paddingObject (readonly)

Returns the value of attribute padding.



34
35
36
# File 'lib/rtcp/rr.rb', line 34

def padding
  @padding
end

#report_blocksObject (readonly)

Returns the value of attribute report_blocks.



34
35
36
# File 'lib/rtcp/rr.rb', line 34

def report_blocks
  @report_blocks
end

#ssrcObject (readonly)

Returns the value of attribute ssrc.



34
35
36
# File 'lib/rtcp/rr.rb', line 34

def ssrc
  @ssrc
end

#versionObject (readonly)

Returns the value of attribute version.



34
35
36
# File 'lib/rtcp/rr.rb', line 34

def version
  @version
end

Instance Method Details

#decode(packet_data) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/rtcp/rr.rb', line 36

def decode(packet_data)
  vprc, packet_type, length, @ssrc = packet_data.unpack('CCnN')
  ensure_packet_type(packet_type)
  @length  = 4 * (length + 1)
  @version, @padding, rc = decode_vprc(vprc, @length - 8)
  @report_blocks = decode_reports(payload_data(packet_data, @length, 8), rc)
  self
end