rtc_rtcp/
lib.rs

1#![warn(rust_2018_idioms)]
2#![allow(dead_code)]
3
4//! Package rtcp implements encoding and decoding of RTCP packets according to RFCs 3550 and 5506.
5//!
6//! RTCP is a sister protocol of the Real-time Transport Protocol (RTP). Its basic functionality
7//! and packet structure is defined in RFC 3550. RTCP provides out-of-band statistics and control
8//! information for an RTP session. It partners with RTP in the delivery and packaging of multimedia data,
9//! but does not transport any media data itself.
10//!
11//! The primary function of RTCP is to provide feedback on the quality of service (QoS)
12//! in media distribution by periodically sending statistics information such as transmitted octet
13//! and packet counts, packet loss, packet delay variation, and round-trip delay time to participants
14//! in a streaming multimedia session. An application may use this information to control quality of
15//! service parameters, perhaps by limiting flow, or using a different codec.
16//!
17//! Decoding RTCP packets:
18//!```nobuild
19//!     let pkt = rtcp::unmarshal(&rtcp_data).unwrap();
20//!
21//!     if let Some(e) = pkt
22//!          .as_any()
23//!          .downcast_ref::<PictureLossIndication>()
24//!      {
25//!
26//!      }
27//!     else if let Some(e) = packet
28//!          .as_any()
29//!          .downcast_ref::<Goodbye>(){}
30//!     ....
31//!```
32//!
33//! Encoding RTCP packets:
34//!```nobuild
35//!     let pkt = PictureLossIndication{
36//!         sender_ssrc: sender_ssrc,
37//!         media_ssrc: media_ssrc
38//!     };
39//!
40//!     let pli_data = pkt.marshal().unwrap();
41//!     // ...
42//!```
43
44pub mod compound_packet;
45pub mod extended_report;
46pub mod goodbye;
47pub mod header;
48pub mod packet;
49pub mod payload_feedbacks;
50pub mod raw_packet;
51pub mod receiver_report;
52pub mod reception_report;
53pub mod sender_report;
54pub mod source_description;
55pub mod transport_feedbacks;
56mod util;