pub struct FinderOptions { /* private fields */ }Expand description
Configuration for NDI source discovery.
The defaults find the sources of the groups the NDI configuration names,
including those of this machine, and query the configured networks.ips.
§Examples
use grafton_ndi::FinderOptions;
// Find sources in specific groups, other machines only
let options = FinderOptions::new()
.show_local_sources(false)
.groups(["Public", "Studio"]);
// Also query hosts that discovery does not reach
let options = FinderOptions::new().extra_ips(["192.168.1.100", "10.0.0.100"]);Implementations§
Source§impl FinderOptions
impl FinderOptions
Sourcepub fn clear_groups(self) -> Self
pub fn clear_groups(self) -> Self
Inherit discovery groups from the NDI configuration.
Sourcepub fn clear_extra_ips(self) -> Self
pub fn clear_extra_ips(self) -> Self
Inherit direct IP addresses from the NDI configuration.
Sourcepub fn clear_config(self) -> Self
pub fn clear_config(self) -> Self
Remove the per-instance Advanced configuration override.
Sourcepub fn configured_show_local_sources(&self) -> bool
pub fn configured_show_local_sources(&self) -> bool
Whether local sources were requested.
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 configured_extra_ips(&self) -> Option<&[String]>
pub fn configured_extra_ips(&self) -> Option<&[String]>
Requested direct IP addresses, in their stored order, if any.
Sourcepub fn configured_config(&self) -> Option<&AdvancedConfig>
pub fn configured_config(&self) -> Option<&AdvancedConfig>
The stored Advanced configuration handle, if any.
Sourcepub fn new() -> Self
pub fn new() -> Self
The default options: local sources included, the groups of the NDI
configuration, and the direct addresses in its networks.ips.
Sourcepub fn show_local_sources(self, show: bool) -> Self
pub fn show_local_sources(self, show: bool) -> Self
Set whether sources on this machine are found.
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 groups to search in place of the NDI configuration.
Use Self::clear_groups to inherit the configuration.
Creation refuses empty elements and elements containing a comma or NUL.
Sourcepub fn extra_ips(self, ips: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn extra_ips(self, ips: impl IntoIterator<Item = impl Into<String>>) -> Self
Set a non-empty list of individual IP addresses to query directly.
This replaces networks.ips from the NDI configuration. Use
Self::clear_extra_ips to inherit the configuration. Creation
refuses empty elements and elements containing a comma or NUL.
Sourcepub fn config(self, config: AdvancedConfig) -> Self
pub fn config(self, config: AdvancedConfig) -> Self
Create the finder with this per-instance Advanced SDK configuration, which it keeps for as long as it lives.
Finder::new then needs an Advanced runtime, and a build with the
Advanced SDK.