Class: RTCP::RSI
Overview
RSI: Receiver Summary Information Packet Documentation: RFC 5760, 7.1.1.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|V=2|P|reserved | PT=RSI=209 | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SSRC |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Summarized SSRC |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| NTP Timestamp (most significant word) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| NTP Timestamp (least significant word) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
: Sub-report blocks :
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
0 1 2 3
Sub-Report-Block Type
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SRBT | Length | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ SRBT-specific data +
| |
: :
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Generic Sub-Report Block Fields
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
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| SRBT | Length | NDB | MF |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Minimum Distribution Value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Maximum Distribution Value |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| Distribution Buckets |
| ... |
| ... |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Constant Summary collapse
- PT_ID =
209
Constants inherited from RTCP
Instance Attribute Summary collapse
-
#ntp_timestamp ⇒ Object
readonly
Returns the value of attribute ntp_timestamp.
-
#report_blocks ⇒ Object
readonly
Returns the value of attribute report_blocks.
-
#ssrc ⇒ Object
readonly
Returns the value of attribute ssrc.
-
#summarized_ssrc ⇒ Object
readonly
Returns the value of attribute summarized_ssrc.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Attributes inherited from RTCP
Instance Method Summary collapse
Methods inherited from RTCP
Instance Attribute Details
#ntp_timestamp ⇒ Object (readonly)
Returns the value of attribute ntp_timestamp.
51 52 53 |
# File 'lib/rtcp/rsi.rb', line 51 def @ntp_timestamp end |
#report_blocks ⇒ Object (readonly)
Returns the value of attribute report_blocks.
51 52 53 |
# File 'lib/rtcp/rsi.rb', line 51 def report_blocks @report_blocks end |
#ssrc ⇒ Object (readonly)
Returns the value of attribute ssrc.
51 52 53 |
# File 'lib/rtcp/rsi.rb', line 51 def ssrc @ssrc end |
#summarized_ssrc ⇒ Object (readonly)
Returns the value of attribute summarized_ssrc.
51 52 53 |
# File 'lib/rtcp/rsi.rb', line 51 def summarized_ssrc @summarized_ssrc end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
51 52 53 |
# File 'lib/rtcp/rsi.rb', line 51 def version @version end |
Instance Method Details
#decode(packet_data) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/rtcp/rsi.rb', line 53 def decode(packet_data) vp, packet_type, length, @ssrc, @summarized_ssrc, ntp_h, ntp_l = packet_data.unpack('CCnN4') ensure_packet_type(packet_type) @length = 4 * (length + 1) @version = vp >> 6 @ntp_timestamp = Time.at(ntp_h - 2208988800 + (ntp_l.to_f / 0x100000000)) @report_blocks = decode_reports(payload_data(packet_data, @length, 20)) self end |