cyndilib.metadata_frame

MetadataFrame

class cyndilib.metadata_frame.MetadataFrame

Bases: object

An NDI® metadata frame

Metadata frames carry miscellaneous information between sources and receivers formatted as a single XML tag.

The data can be application-specific although there are some reserved namespaces and tag names for standardized use:

<ndi_tally_echo on_program="true" on_preview="false"/>

<ndi_product long_name="NDILib Receive Example"
             short_name="NDILib Receive"
             manufacturer="CoolCo, inc."
             version="1.000.000"
             model_name="PBX-42Q"
             session_name="My Midday Show"
             serial="ABCDEFG"/>

This class provides an interface to the parsed xml data with the attributes available in the attrs attribute or through dict-like methods:

>>> metadata_frame['on_program']
'true'
>>> metadata_frame.get('on_preview')
'false'
tag

The xml tag name

Type:

str

attrs

The xml attributes

Type:

dict

get(self, tag: str)
get_tag(self)
get_timecode(self)
set_tag(self, tag: str)

MetadataRecvFrame

class cyndilib.metadata_frame.MetadataRecvFrame

Bases: MetadataFrame

A MetadataFrame used in receiver.Receiver

MetadataSendFrame

class cyndilib.metadata_frame.MetadataSendFrame

Bases: MetadataFrame

A MetadataFrame used in sender.Sender

The attributes in this class can be set using dict-like methods:

>>> metadata_frame['program_tally'] = "false"
>>> metadata_frame.update({'preview_tally':'true'})
clear(self)
set_tag(self, tag: str)
update(self, other: dict)