1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#![warn(rust_2018_idioms)]
#![allow(dead_code)]

//! Package rtcp implements encoding and decoding of RTCP packets according to RFCs 3550 and 5506.
//!
//! RTCP is a sister protocol of the Real-time Transport Protocol (RTP). Its basic functionality
//! and packet structure is defined in RFC 3550. RTCP provides out-of-band statistics and control
//! information for an RTP session. It partners with RTP in the delivery and packaging of multimedia data,
//! but does not transport any media data itself.
//!
//! The primary function of RTCP is to provide feedback on the quality of service (QoS)
//! in media distribution by periodically sending statistics information such as transmitted octet
//! and packet counts, packet loss, packet delay variation, and round-trip delay time to participants
//! in a streaming multimedia session. An application may use this information to control quality of
//! service parameters, perhaps by limiting flow, or using a different codec.
//!
//! Decoding RTCP packets:
//!```nobuild
//!     let pkt = rtcp::unmarshal(&rtcp_data).unwrap();
//!
//!     if let Some(e) = pkt
//!          .as_any()
//!          .downcast_ref::<PictureLossIndication>()
//!      {
//!
//!      }
//!     else if let Some(e) = packet
//!          .as_any()
//!          .downcast_ref::<Goodbye>(){}
//!     ....
//!```
//!
//! Encoding RTCP packets:
//!```nobuild
//!     let pkt = PictureLossIndication{
//!         sender_ssrc: sender_ssrc,
//!         media_ssrc: media_ssrc
//!     };
//!
//!     let pli_data = pkt.marshal().unwrap();
//!     // ...
//!```

pub mod compound_packet;
mod error;
pub mod extended_report;
pub mod goodbye;
pub mod header;
pub mod packet;
pub mod payload_feedbacks;
pub mod raw_packet;
pub mod receiver_report;
pub mod reception_report;
pub mod sender_report;
pub mod source_description;
pub mod transport_feedbacks;
mod util;

pub use error::Error;