node Package¶
node
Package¶
interface
Module¶
-
class
ebu_tt_live.node.interface.
IConsumerNode
[source]¶ Bases:
ebu_tt_live.node.interface.INode
-
classmethod
auto_register_impl
(y)¶
-
consumer_carriage
¶ Carriage mechanism accessor :return:
-
classmethod
-
class
ebu_tt_live.node.interface.
INode
[source]¶ Bases:
object
This is the foundation of all nodes that take part in the processing of subtitle documents. The Node should deal with subtitles in a high level interface, which is an instance of
<ebu_tt_live.documents.SubtitleDocument>
. That is the interface which should be used to communicate with the carriage mechanism. See<ebu_tt_live.carriage.ICarriageMechanism>
-
classmethod
auto_register_impl
(y)¶
-
classmethod
-
class
ebu_tt_live.node.interface.
IProducerNode
[source]¶ Bases:
ebu_tt_live.node.interface.INode
-
classmethod
auto_register_impl
(y)¶
-
producer_carriage
¶ Carriage mechanism accessor :return:
-
classmethod
base
Module¶
-
class
ebu_tt_live.node.base.
AbstractCombinedNode
(node_id, producer_carriage=None, consumer_carriage=None, **kwargs)[source]¶ Bases:
ebu_tt_live.node.base.AbstractConsumerNode
,ebu_tt_live.node.base.AbstractProducerNode
-
classmethod
auto_register_impl
(y)¶
-
classmethod
-
class
ebu_tt_live.node.base.
AbstractConsumerNode
(node_id, consumer_carriage=None, **kwargs)[source]¶ Bases:
ebu_tt_live.node.interface.IConsumerNode
,ebu_tt_live.node.base.__AbstractNode
-
classmethod
auto_register_impl
(y)¶
-
consumer_carriage
¶
-
classmethod
-
class
ebu_tt_live.node.base.
AbstractProducerNode
(node_id, producer_carriage=None, **kwargs)[source]¶ Bases:
ebu_tt_live.node.interface.IProducerNode
,ebu_tt_live.node.base.__AbstractNode
-
classmethod
auto_register_impl
(y)¶
-
producer_carriage
¶
-
classmethod
consumer
Module¶
-
class
ebu_tt_live.node.consumer.
ReSequencer
(node_id, reference_clock, segment_length, discard, sequence_identifier, consumer_carriage=None, producer_carriage=None, init_document=None, **kwargs)[source]¶ Bases:
ebu_tt_live.node.base.AbstractProducerNode
,ebu_tt_live.node.consumer.SimpleConsumer
-
classmethod
auto_register_impl
(y)¶
-
last_segment_end
¶
-
process_document
(document, **kwargs)[source]¶ The central hook that is meant to implement the main functionality of the node. A node must implement this method.
Parameters: - kwargs – Extra parameters
- document – Can be XML, Document object…etc. depending on the carriage implementation
-
segment_length
¶
-
classmethod
-
class
ebu_tt_live.node.consumer.
SimpleConsumer
(node_id, consumer_carriage=None, reference_clock=None, verbose=False, **kwargs)[source]¶ Bases:
ebu_tt_live.node.base.AbstractConsumerNode
-
classmethod
auto_register_impl
(y)¶
-
process_document
(document, **kwargs)[source]¶ The central hook that is meant to implement the main functionality of the node. A node must implement this method.
Parameters: - kwargs – Extra parameters
- document – Can be XML, Document object…etc. depending on the carriage implementation
-
reference_clock
¶
-
classmethod
producer
Module¶
-
class
ebu_tt_live.node.producer.
SimpleProducer
(node_id, producer_carriage, document_sequence, input_blocks)[source]¶ Bases:
ebu_tt_live.node.base.AbstractProducerNode
-
classmethod
auto_register_impl
(y)¶
-
document_sequence
¶
-
process_document
(document=None, **kwargs)[source]¶ The central hook that is meant to implement the main functionality of the node. A node must implement this method.
Parameters: - kwargs – Extra parameters
- document – Can be XML, Document object…etc. depending on the carriage implementation
-
reference_clock
¶
-
classmethod
encoder
Module¶
-
class
ebu_tt_live.node.encoder.
EBUTTDEncoder
(node_id, media_time_zero, default_ns=False, producer_carriage=None, consumer_carriage=None, **kwargs)[source]¶ Bases:
ebu_tt_live.node.base.AbstractCombinedNode
-
classmethod
auto_register_impl
(y)¶
-
classmethod
delay
Module¶
-
class
ebu_tt_live.node.delay.
BufferDelayNode
(node_id, fixed_delay, consumer_carriage=None, producer_carriage=None)[source]¶ Bases:
ebu_tt_live.node.base.AbstractCombinedNode
-
classmethod
auto_register_impl
(y)¶
-
classmethod
-
class
ebu_tt_live.node.delay.
RetimingDelayNode
(node_id, fixed_delay, document_sequence, consumer_carriage=None, producer_carriage=None)[source]¶ Bases:
ebu_tt_live.node.base.AbstractCombinedNode
-
classmethod
auto_register_impl
(y)¶
-
classmethod
-
class
ebu_tt_live.node.delay.
UntimedPathFinder
(root_element)[source]¶ Bases:
ebu_tt_live.bindings.pyxb_utils.RecursiveOperation
-
path_found
¶
-
distributing
Module¶
-
class
ebu_tt_live.node.distributing.
DistributingNode
(node_id, producer_carriage=None, consumer_carriage=None, **kwargs)[source]¶ Bases:
ebu_tt_live.node.base.AbstractCombinedNode
-
classmethod
auto_register_impl
(y)¶
-
classmethod
handover
Module¶
-
class
ebu_tt_live.node.handover.
HandoverNode
(node_id, authors_group_identifier, sequence_identifier, consumer_carriage=None, producer_carriage=None, **kwargs)[source]¶ Bases:
ebu_tt_live.node.switcher.SwitcherNode
The handover node implements the functionality described in EBU-3370. It is a specialised case of the switching node basing its decisions on the handover-related attributes on the document root element and on its previous decisions.
-
classmethod
auto_register_impl
(y)¶
-
process_document
(document, **kwargs)[source]¶ The specified functionality is met by keeping the following priorities in mind when processing an incoming document:
- If this is a new sequence_identifier+sequence_number pair and
authorsGroupIdentifier+authorsGroupControlToken are defined and authorsGroupIdentifier matches the
configuration
- If sequenceIdentifier matches the one selected the document should be emitted
- If sequenceIdentifier does not match the one selected or one is not selected
- If the token is higher than our current one or one is not set the document should be emitted
- If token is lower than the our current one or missing the document should be ignored
- If the document should be emitted
- Set/update current sequenceIdentifier in the node from the one in the document
- Set/update current authorsGroupControlToken in the node
- Reassign document to output sequenceIdentifier
- Assign new sequenceNumber to document
- Emit document
Parameters: - document –
- kwargs –
- If this is a new sequence_identifier+sequence_number pair and
authorsGroupIdentifier+authorsGroupControlToken are defined and authorsGroupIdentifier matches the
configuration
-
classmethod
deduplicator
Module¶
-
class
ebu_tt_live.node.deduplicator.
ComparableElement
(value)[source]¶ Takes all the attributes of an element and returns a hash value
-
class
ebu_tt_live.node.deduplicator.
DeDuplicatorNode
(node_id, sequence_identifier, consumer_carriage=None, producer_carriage=None)[source]¶ Bases:
ebu_tt_live.node.base.AbstractCombinedNode
The DeDuplicator Node addresses the issue raised, whereby after ReSequencing duplication of style and region elements and attributes occurs.
-
AppendNewElements
(element_list, element_to_append_to, old_id_dict, new_id_dict, hash_dict)[source]¶ Replaces starting style and region elements with the unique ones identified in CollateUniqueVals
-
CollateUniqueVals
(element_list, old_id_dict, new_id_dict, hash_dict)[source]¶ Creates a dict() of all unique style/region names
-
classmethod
auto_register_impl
(y)¶
-
-
ebu_tt_live.node.deduplicator.
ReplaceNone
(attr_value)[source]¶ If an attribute has no value, it is given non-legal character as a value, to prevent ‘collisions’
-
class
ebu_tt_live.node.deduplicator.
ReplaceStylesAndRegions
(root_element, old_id_dict, new_id_dict)[source]¶ Bases:
ebu_tt_live.bindings.pyxb_utils.RecursiveOperation
-
new_id_dict
= None¶
-
old_id_dict
= None¶
-