pub struct FormatParams {Show 18 fields
pub min_p_time: Option<u8>,
pub stereo: Option<bool>,
pub sprop_stereo: Option<bool>,
pub use_inband_fec: Option<bool>,
pub use_dtx: Option<bool>,
pub level_asymmetry_allowed: Option<bool>,
pub packetization_mode: Option<u8>,
pub profile_level_id: Option<u32>,
pub profile_id: Option<u32>,
pub profile: Option<u8>,
pub level_idx: Option<u8>,
pub tier: Option<u8>,
pub h265_profile_tier_level: Option<H265ProfileTierLevel>,
pub h266_profile_tier_level: Option<H266ProfileTierLevel>,
pub sprop_max_don_diff: Option<u16>,
pub telephone_event_max: Option<u8>,
pub octet_align: Option<bool>,
pub mode_set: Option<u16>,
}Expand description
Codec specific format parameters.
Fields§
§min_p_time: Option<u8>Opus specific parameter.
The minimum duration of media represented by a packet.
stereo: Option<bool>Opus specific parameter.
Decoder-side preference for stereo audio. Default is mono per RFC 7587 Section 7.1: https://datatracker.ietf.org/doc/html/rfc7587#section-7.1
sprop_stereo: Option<bool>Opus specific parameter.
Sender-side stereo hint for Opus. When set, it signals the intent to transmit stereo from the sender, matching the symmetric m-line model.
use_inband_fec: Option<bool>Opus specific parameter.
Specifies that the decoder can do Opus in-band FEC
use_dtx: Option<bool>Opus specific parameter.
Specifies that the decoder prefers DTX (Discontinuous Transmission) such that the packet rate is greatly lowered during periods of silence.
level_asymmetry_allowed: Option<bool>Whether h264 sending media encoded at a different level in the offerer-to-answerer direction than the level in the answerer-to-offerer direction, is allowed.
packetization_mode: Option<u8>What h264 packetization mode is used.
- 0 - single nal.
- 1 - STAP-A, FU-A is allowed. Non-interleaved.
profile_level_id: Option<u32>H264 profile level.
- 42 00 1f - 4200=baseline (B) 1f=level 3.1
- 42 e0 1f - 42e0=constrained baseline (CB) 1f=level 3.1
- 4d 00 1f - 4d00=main (M) 1f=level 3.1
- 64 00 1f - 6400=high (H) 1f=level 3.1
profile_id: Option<u32>VP9 profile id.
profile: Option<u8>AV1 profile.
Indicates the highest AV1 profile that may have been used to generate the bitstream or that the receiver supports. The range of possible values is identical to the seq_profile syntax element specified in AV1. If the parameter is not present, it MUST be inferred to be 0 (“Main” profile).
0 8-bit or 10-bit 4:2:0 1 8-bit or 10-bit 4:4:4 2 8-bit or 10-bit 4:2:2 2 12-bit 4:2:0, 4:2:2, 4:4:4
level_idx: Option<u8>AV1 level-idx.
Indicates the highest AV1 level that may have been used to generate the bitstream or that the receiver supports. The range of possible values is identical to the seq_level_idx syntax element specified in AV1. If the parameter is not present, it MUST be inferred to be 5 (level 3.1).
tier: Option<u8>AV1 tier.
Indicates the highest tier that may have been used to generate the bitstream or that the receiver supports. The range of possible values is identical to the seq_tier syntax element specified in AV1. If the parameter is not present, the tier MUST be inferred to be 0.
h265_profile_tier_level: Option<H265ProfileTierLevel>H.265/HEVC profile, tier, and level.
Contains:
- profile: Main, Main10, Main Still Picture, etc.
- tier: Main or High.
- level: 3.1, 4.0, 5.0, etc.
See ITU-T H.265 Annex A for complete definitions.
h266_profile_tier_level: Option<H266ProfileTierLevel>H.266/VVC profile, tier, and level.
Contains:
- profile: Main 10, Main 10 4:4:4, etc.
- tier: Main or High.
- level: 3.1, 4.0, 5.0, etc.
See ITU-T H.266 Annex A and RFC 9328 §7.2 for complete definitions.
sprop_max_don_diff: Option<u16>H.265 sprop-max-don-diff parameter (RFC 7798 §7.1). When > 0, DONL fields are included in H.265 RTP packets to support out-of-order NAL unit decoding.
telephone_event_max: Option<u8>Highest event code in the inclusive 0-X telephone-event SDP range.
Only contiguous ranges starting at zero are supported. None uses the
library default 0-16. Negotiation takes the smaller maximum per payload
type across the session.
octet_align: Option<bool>AMR-WB octet-align. Some(true) selects the octet-aligned payload
layout, otherwise bandwidth-efficient is used.
mode_set: Option<u16>AMR-WB mode-set, a bitmask of the allowed speech modes 0..=8.
A mode set from either peer applies to both directions, so only write frames in these modes.
Implementations§
Source§impl FormatParams
impl FormatParams
Sourcepub fn parse_line(line: &str) -> Self
pub fn parse_line(line: &str) -> Self
Parse an fmtp line to create a FormatParams.
Example minptime=10;useinbandfec=1, or 0-16 for telephone events.