Skip to main content

rustrtc/
lib.rs

1//! rustrtc — WebRTC / RTP / SRTP / T.38 real-time communication library.
2
3// These lints are opinionated style choices that don't fit this codebase's
4// established patterns (large RTC structs naturally have many fields/args and
5// use composite shared-state types). Allowed crate-wide to keep `cargo clippy`
6// focused on genuinely useful diagnostics.
7#![allow(clippy::too_many_arguments)]
8#![allow(clippy::type_complexity)]
9#![allow(clippy::result_large_err)]
10#![allow(clippy::large_enum_variant)]
11// `let mut x = T::default(); x.field = v;` is often clearer than a partial
12// struct literal, especially in tests. Pervasive here, so allowed crate-wide.
13#![allow(clippy::field_reassign_with_default)]
14
15pub mod config;
16pub mod errors;
17pub mod media;
18pub mod peer_connection;
19pub mod rtp;
20pub mod rtx;
21pub mod sdp;
22pub mod srtp;
23pub mod stats;
24pub mod stats_collector;
25#[cfg(feature = "t38")]
26pub mod t38;
27pub mod transports;
28
29pub use config::{
30    ApplicationCapability, AudioCapability, BundlePolicy, CertificateConfig, IceCredentialType,
31    IceServer, IceTcpPolicy, IceTransportPolicy, MediaCapabilities, RecorderInterceptors,
32    RtcConfiguration, RtcConfigurationBuilder, RtcpMuxPolicy, SdpCompatibilityMode, T38Capability,
33    T38FaxRateManagement, T38UdpEC, TransportMode, VideoCapability,
34};
35pub use errors::{RtcError, RtcResult, SdpError, SdpResult};
36pub use peer_connection::{
37    DisconnectReason, IceConnectionState, IceGatheringState, PeerConnection, PeerConnectionEvent,
38    PeerConnectionState, RtpCodecParameters, RtpReceiverInterceptor, RtpSender,
39    RtpSenderInterceptor, RtpTransceiver, SignalingState, TransceiverDirection,
40};
41pub use sdp::{
42    AddressType, Attribute, Direction, MediaKind, MediaSection, NetworkType, Origin, SDES_MID_URI,
43    SdpType, SessionDescription, SessionSection, Timing, modify_sdp_direction,
44    parse_bundle_mid_info,
45};
46pub use srtp::{SrtpContext, SrtpDirection, SrtpKeyingMaterial, SrtpProfile, SrtpSession};
47pub use stats::{
48    DynProvider, StatsEntry, StatsId, StatsKind, StatsProvider, StatsReport, gather_once,
49};
50pub use transports::ice::{
51    DEFAULT_LEASE_DURATION, DEFAULT_UPNP_DISCOVERY_TIMEOUT, IceCandidate, IceCandidatePair,
52    IceCandidateType, IceGathererState, IceRole, IceTransport, IceTransportState,
53    MAX_LEASE_DURATION, MIN_LEASE_DURATION, TcpType, UpnpPortMapper,
54};
55pub use transports::rtp::RtpRewriteBridgeParams;
56pub use transports::sctp::{DataChannelEvent, DataChannelState, SctpLinkStats};
57pub use transports::udptl::{UdtlConfig, UdtlReceiveBuffer, UdtlTransport};