cyndilib.finder#
Source#
- class cyndilib.finder.Source#
Bases:
objectRepresents an NDI® source
The source
nameis a combination of the sender’shost_nameand astream_namewithin the sender (as senders may send multiple streams).The two names are concatenated within the
full nameas"<host_name> (<stream_name>)".- set_preview_tally(self, bool value)#
Set the source’s preview tally to the given state
Note
This is only valid for sources attached to an active
receiver.Receiver
- set_program_tally(self, bool value)#
Set the source’s program tally to the given state
Note
This is only valid for sources attached to an active
receiver.Receiver
Finder#
- class cyndilib.finder.Finder#
Bases:
objectDiscovers NDI® sources available on the network
- change_callback#
A callback to be used when sources are added or removed
- finder_thread#
The thread used to make blocking calls to update sources
- close(self)#
Closes the
finder_thread
- get_source_names(self)#
Get the discovered sources as a
list[str]
- iter_sources(self)#
Iterate over the current sources as
SourceobjectsThis can also be done by iterating of the finder instance itself:
>>> with Finder() as finder: ... for source in finder: ... ...
- open(self)#
Starts the
finder_threadand begins searching for sources
- set_change_callback(self, cb)#
Set the
change_callback
- update_sources(self)#
Manually update the current sources tracked by the NDI® library
Warning
This method should typically not be called directly and especially not if the
finder_threadis in use.
- wait(self, timeout=None)#
Wait for a source to be added or removed
- wait_for_sources(self, float timeout)#
Wait for the NDI® library to report a change in its source list
If a change was detected a call to
update_sources()should follow.- Parameters:
timeout (float) – Time (in seconds) to block before a change is detected
- Returns:
Flag indicating if a change was detected before the timout was reached
- Return type:
Warning
This method should typically not be called directly and especially not if the
finder_threadis in use.