#[non_exhaustive]pub struct RtmpClientConfig {
pub mode: ClientMode,
pub play_buffer: Duration,
pub chunk_size: u32,
pub window_ack_size: u32,
pub app: String,
pub stream_key: String,
pub tc_url: Option<String>,
pub limits: ClientLimits,
pub damage_policy: DamagePolicy,
}Expand description
Configuration for a ClientSession.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mode: ClientModePublish (default) or play.
play_buffer: DurationPlayback buffer length announced to the server before play (§6.7 SetBufferLength),
sent as whole milliseconds on the wire. Play mode only.
chunk_size: u32Outbound chunk size (§5.4.1).
window_ack_size: u32Window Acknowledgement Size (§5.4.4).
app: StringRTMP app name for the connect command.
stream_key: StringPublishing name (stream key) for the publish command, or the stream name play asks
for in play mode.
tc_url: Option<String>tcUrl for the connect command (e.g. rtmp://host/app).
limits: ClientLimitsThe bounds this session holds its peer to.
damage_policy: DamagePolicyWhat each ClientEvent::Damage report means: Report (the default
for everything) publishes it and keeps reading; Fail ends the
session with RtmpError::Damage carrying the same report.
Implementations§
Source§impl RtmpClientConfig
impl RtmpClientConfig
Sourcepub fn new(
limits: ClientLimits,
chunk_size: u32,
window_ack_size: u32,
play_buffer: Duration,
) -> Self
pub fn new( limits: ClientLimits, chunk_size: u32, window_ack_size: u32, play_buffer: Duration, ) -> Self
A publishing configuration announcing chunk_size and window_ack_size, announcing
play_buffer before play in play mode, and holding its peer to limits. app,
stream_key and tc_url start empty.
Source§impl RtmpClientConfig
impl RtmpClientConfig
Sourcepub fn for_profile(profile: Profile) -> Self
pub fn for_profile(profile: Profile) -> Self
The Profile preset: a publishing client under
ClientLimits::for_profile; app, stream_key and tc_url start
empty, as with Self::new.