Class: RTCP::PSFB
Overview
PSFB: Payload-specific FB message Documentation: RFC 4585, 6.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| FMT | PT | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SSRC of packet sender |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| SSRC of media source |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
: Feedback Control Information (FCI) :
: :
Constant Summary collapse
- FORMATS =
{ 1 => :pli, # Picture Loss Indication (PLI) 2 => :sli, # Slice Loss Indication (SLI) 3 => :rpsi, # Reference Picture Selection Indication (RPSI) 15 => :afb, # Application layer FB (AFB) message }
- PT_ID =
206
Constants inherited from RTCP
Instance Attribute Summary collapse
-
#fci ⇒ Object
readonly
Returns the value of attribute fci.
-
#first_mb ⇒ Object
readonly
Returns the value of attribute first_mb.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#picture_id ⇒ Object
readonly
Returns the value of attribute picture_id.
-
#sender_ssrc ⇒ Object
readonly
Returns the value of attribute sender_ssrc.
-
#source_ssrc ⇒ Object
readonly
Returns the value of attribute source_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
#fci ⇒ Object (readonly)
Returns the value of attribute fci.
27 28 29 |
# File 'lib/rtcp/psfb.rb', line 27 def fci @fci end |
#first_mb ⇒ Object (readonly)
Returns the value of attribute first_mb.
27 28 29 |
# File 'lib/rtcp/psfb.rb', line 27 def first_mb @first_mb end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
27 28 29 |
# File 'lib/rtcp/psfb.rb', line 27 def format @format end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
27 28 29 |
# File 'lib/rtcp/psfb.rb', line 27 def number @number end |
#picture_id ⇒ Object (readonly)
Returns the value of attribute picture_id.
27 28 29 |
# File 'lib/rtcp/psfb.rb', line 27 def picture_id @picture_id end |
#sender_ssrc ⇒ Object (readonly)
Returns the value of attribute sender_ssrc.
27 28 29 |
# File 'lib/rtcp/psfb.rb', line 27 def sender_ssrc @sender_ssrc end |
#source_ssrc ⇒ Object (readonly)
Returns the value of attribute source_ssrc.
27 28 29 |
# File 'lib/rtcp/psfb.rb', line 27 def source_ssrc @source_ssrc end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
27 28 29 |
# File 'lib/rtcp/psfb.rb', line 27 def version @version end |
Instance Method Details
#decode(packet_data) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/rtcp/psfb.rb', line 30 def decode(packet_data) vpfmt, packet_type, length, @sender_ssrc, @source_ssrc = packet_data.unpack('CCnN2') ensure_packet_type(packet_type) @length = 4 * (length + 1) @version = vpfmt >> 6 format = vpfmt & 31 @format = FORMATS[format] || format @fci_data = payload_data(packet_data, @length, 12) case @format when :sli pl = @fci_data.unpack('L') @first_mb = pl >> 19 @number = (pl >> 6) & 8191 @picture_id = pl & 63 # when :pli # No parameters # when :rpsi # when :afb end self end |