rtcp <img src=“https://codeclimate.com/github/rusch/rtcp.png” /> <img src=“https://travis-ci.org/rusch/rtcp.png?branch=master” alt=“Build Status” />¶ ↑
Description¶ ↑
The RTP Control Protocol (RTCP) gathers statistical data about RTP sessions, for example transmitted octet and packet counts, lost packet counts, round-trip delay time and interarrival jitter.
This library parses RTCP data into ruby objects.
Features¶ ↑
-
Parse RTCP Packets into Ruby Objects
-
Supports the following RTCP Packet types:
-
200: Sender Report
-
201: Receiver Report
-
202: Source Description
-
203: Goodbye
-
204: Application-Defined (Does not decode application-dependent data)
-
206: Payload-Specific FB message (Does not decode FCI block)
-
207: Extended Report
-
209: Receiver Summary Information
-
Examples¶ ↑
Parse an RTCP Packet¶ ↑
require 'rtcp' rr = RTCP.decode(rtcp_rr_data) # => [RTCP::RR Object] rr.ssrc # => 3945864703 rr.length # => 8 rr.version # => 2 rr.report_blocks # => []
Parse a sequence of RTCP Packets¶ ↑
require 'rtcp' msgs = RTCP.decode(rtcp_data) # => [Array of RTCP::* Objects] msgs[0].class # => RTCP::RR msgs[0].ssrc # => 3945864703 msgs[1].class # => RTCP::SDES msgs[1].chunks # => [Array of Hashes] msgs[1].chunks[0][:ssrc] # => 3945864703 msgs[1].chunks[0][:type] # => :cname msgs[1].chunks[0][:data] # => "00-09-df-1b-ec-0a" msgs[2].class # => RTCP::RSI msgs[2].ssrc # => 3945864703 msge[2].ntp_timestamp # => [Time Object] msgs[3].class # => RTCP::APP msgs[3].name # => "PLII" msgs[3].app_data # => [Binary Data -- The application data] msgs[4].class # => RTCP msgs[4].to_s # => [Binary Data -- The whole RTCP packet]
Requirements¶ ↑
-
Rubies (tested, at least):
-
1.9.3
-
JRuby 1.7.3 (1.9 mode)
-
Install¶ ↑
$ gem install
Copyright¶ ↑
Copyright © 2013 Christian Rusch