Class: RTP::Packet
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- RTP::Packet
- Defined in:
- lib/rtp/packet.rb
Overview
Decodes a single RTP packet into a Hash, so the packet can inspected and used accordingly. Form more info on types, see bindata.
Instance Method Summary collapse
- #csrc_count ⇒ BinData::Bit4
- #csrc_ids ⇒ BinData::Array
- #extension ⇒ BinData::Bit1
- #extension_id ⇒ BinData::Uint16be
- #extension_length ⇒ BinData::Uint16be
- #has_extension? ⇒ Boolean
- #marker ⇒ BinData::Bit1
- #padding ⇒ BinData::Bit1
- #payload_type ⇒ BinData::Bit7
- #rtp_payload ⇒ BinData::String
- #sequence_number ⇒ BinData::Uint16be
- #ssrc_id ⇒ BinData::Uint32be
- #timestamp ⇒ BinData::Uint32be
- #version ⇒ BinData::Bit2
Instance Method Details
#csrc_count ⇒ BinData::Bit4
25 |
# File 'lib/rtp/packet.rb', line 25 bit4 :csrc_count |
#csrc_ids ⇒ BinData::Array
43 |
# File 'lib/rtp/packet.rb', line 43 array :csrc_ids, :type => :uint32, :initial_length => lambda { csrc_count } |
#extension ⇒ BinData::Bit1
22 |
# File 'lib/rtp/packet.rb', line 22 bit1 :extension |
#extension_id ⇒ BinData::Uint16be
50 |
# File 'lib/rtp/packet.rb', line 50 uint16 :extension_id, onlyif: :has_extension? |
#extension_length ⇒ BinData::Uint16be
53 |
# File 'lib/rtp/packet.rb', line 53 uint16 :extension_length, onlyif: :has_extension? |
#has_extension? ⇒ Boolean
75 76 77 |
# File 'lib/rtp/packet.rb', line 75 def has_extension? extension == 1 end |
#marker ⇒ BinData::Bit1
28 |
# File 'lib/rtp/packet.rb', line 28 bit1 :marker |
#padding ⇒ BinData::Bit1
19 |
# File 'lib/rtp/packet.rb', line 19 bit1 :padding |
#payload_type ⇒ BinData::Bit7
31 |
# File 'lib/rtp/packet.rb', line 31 bit7 :payload_type |
#rtp_payload ⇒ BinData::String
73 |
# File 'lib/rtp/packet.rb', line 73 string :rtp_payload, read_length: lambda { bytes_remaining } |
#sequence_number ⇒ BinData::Uint16be
34 |
# File 'lib/rtp/packet.rb', line 34 uint16 :sequence_number |
#ssrc_id ⇒ BinData::Uint32be
40 |
# File 'lib/rtp/packet.rb', line 40 uint32 :ssrc_id |
#timestamp ⇒ BinData::Uint32be
37 |
# File 'lib/rtp/packet.rb', line 37 uint32 :timestamp |
#version ⇒ BinData::Bit2
16 |
# File 'lib/rtp/packet.rb', line 16 bit2 :version |