pub struct FilePlayerOptions { /* private fields */ }Expand description
How a player advertises its NDI source. Creating this value advertises nothing.
The options are checked when a player is created from them, by
FilePlayer::new or
AsyncFilePlayer::create: the name must
not be empty or contain a NUL. Each group must be nonempty and contain
neither a comma nor a NUL.
Implementations§
Source§impl FilePlayerOptions
impl FilePlayerOptions
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
Replace the advertised player name, preserving every other setting.
Sourcepub fn clear_groups(self) -> Self
pub fn clear_groups(self) -> Self
Inherit discovery groups from the NDI configuration.
Sourcepub fn configured_name(&self) -> &str
pub fn configured_name(&self) -> &str
Requested advertised player name.
Sourcepub fn configured_groups(&self) -> Option<&[String]>
pub fn configured_groups(&self) -> Option<&[String]>
Requested discovery groups, or None to inherit the NDI configuration.
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
A player that advertises its source as name, in the groups of the
NDI configuration.
Sourcepub fn groups(self, groups: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn groups(self, groups: impl IntoIterator<Item = impl Into<String>>) -> Self
Set a non-empty list of NDI groups the player’s source is advertised in,
replacing the NDI configuration. Use Self::clear_groups to inherit
the configuration.
Each group is checked when the player is created: it must be nonempty
and contain neither a comma nor a NUL.