carriage Package¶
interface
Module¶
-
class
ebu_tt_live.carriage.interface.
ICarriageMechanism
[source]¶ Bases:
object
Basic interface for the carrige mechanisms
-
classmethod
auto_register_impl
(y)¶
-
classmethod
-
class
ebu_tt_live.carriage.interface.
IConsumerCarriage
[source]¶ Bases:
ebu_tt_live.carriage.interface.ICarriageMechanism
Carriage mechanism interface for consumer nodes.
-
classmethod
auto_register_impl
(y)¶
-
consumer_node
¶ Node accessor
Returns:
-
classmethod
-
class
ebu_tt_live.carriage.interface.
IProducerCarriage
[source]¶ Bases:
ebu_tt_live.carriage.interface.ICarriageMechanism
Carriage mechanism interface for producer nodes.
-
classmethod
auto_register_impl
(y)¶
-
emit_data
(data, **kwargs)[source]¶ Implement protocol specific postprocessing here.
Parameters: - kwargs – Extra parameters to send down
- data –
Returns:
-
producer_node
¶ Node accessor
Returns:
-
classmethod
base
Module¶
-
class
ebu_tt_live.carriage.base.
AbstractCombinedCarriage
[source]¶ Bases:
ebu_tt_live.carriage.base.AbstractConsumerCarriage
,ebu_tt_live.carriage.base.AbstractProducerCarriage
-
classmethod
auto_register_impl
(y)¶
-
classmethod
-
class
ebu_tt_live.carriage.base.
AbstractConsumerCarriage
[source]¶ Bases:
ebu_tt_live.carriage.interface.IConsumerCarriage
,ebu_tt_live.carriage.base.AbstractCarriage
-
classmethod
auto_register_impl
(y)¶
-
consumer_node
¶
-
classmethod
-
class
ebu_tt_live.carriage.base.
AbstractProducerCarriage
[source]¶ Bases:
ebu_tt_live.carriage.interface.IProducerCarriage
,ebu_tt_live.carriage.base.AbstractCarriage
-
classmethod
auto_register_impl
(y)¶
-
producer_node
¶
-
classmethod
direct
Module¶
-
class
ebu_tt_live.carriage.direct.
DirectCarriageImpl
[source]¶ Bases:
ebu_tt_live.carriage.base.AbstractCombinedCarriage
-
classmethod
auto_register_impl
(y)¶
-
emit_data
(data, **kwargs)[source]¶ Implement protocol specific postprocessing here.
Parameters: - kwargs – Extra parameters to send down
- data –
Returns:
-
classmethod
filesystem
Module¶
-
class
ebu_tt_live.carriage.filesystem.
FilesystemConsumerImpl
[source]¶ Bases:
ebu_tt_live.carriage.base.AbstractConsumerCarriage
This class is responsible for setting the document object from the xml and set its availability time. The document is then sent to the node.
-
classmethod
auto_register_impl
(y)¶
-
classmethod
-
class
ebu_tt_live.carriage.filesystem.
FilesystemProducerImpl
(dirpath, file_name_pattern='{sequence_identifier}_{counter}.xml', message_file_name_pattern='{sequence_identifier}_msg_{counter}.xml', circular_buf_size=0, suppress_manifest=False)[source]¶ Bases:
ebu_tt_live.carriage.base.AbstractProducerCarriage
This class implements a carriage mechanism to output produced documents to the file system. Its constructor takes a mandatory argument : the path to the desired output folder. If the folder does not exist it will be created. Each document handled by this carriage implementation is written in an xml file in the output folder. Along with the xml files, a manifest_sequenceIdentifier.txt file is also written in the output folder. Each time an xml file is written, a line using the following format is added to the manifest :
availability_time,path_to_xml_file
The manifest file gives the availability time for each document along with the path to the corresponding document. The timeline used for the availability times is the same as the one used in the documents, indeed the carriage implementation uses the same clock (or time reference) as the node that produces the documents. The writing order and thus the reading order is from top to bottom. Please note that depending on the timebase used by the producer node time may loop (going to the next day). It can loop with ttp:timeBase=”clock” or ttp:timeBase=”smpte”, but not with ttp:timeBase=”media”. If the output folder already exists and it contains a manifest_sequenceIdentifier.txt file for the same document sequence, the last line of the existing manifest file is parsed to get the last used sequence number and the current sequence is set to start from the next sequence number.
-
classmethod
auto_register_impl
(y)¶
-
check_availability_time
(sequence_identifier, time_base=None, clock_mode=None, availability_time=None)[source]¶ Make sure we have a suitable timedelta value sent down from upstream as availability_time. If the value is None or unusable use the default clock to derive an availability time for the current document. (This does not check if the value is within valid range)
Parameters: - sequence_identifier – remember default clock used per sequence
- time_base – document time base
- clock_mode – in clock timebase this parameter is needed
- availability_time – provided availability_time from upstream
Returns: a valid availability_time (timedelta)
-
classmethod
-
class
ebu_tt_live.carriage.filesystem.
FilesystemReader
(manifest_path, custom_consumer, do_tail)[source]¶ Bases:
object
This class is responsible for reading the manifest file and sending the corresponding availability times and xml file’s content to its _custom_consumer. Important note : the manifest file and the xml documents have to be in the same folder (it is the default behavior of the producer).
websocket
Module¶
-
class
ebu_tt_live.carriage.websocket.
WebsocketConsumerCarriage
[source]¶ Bases:
ebu_tt_live.carriage.base.AbstractConsumerCarriage
-
classmethod
auto_register_impl
(y)¶
-
classmethod
-
class
ebu_tt_live.carriage.websocket.
WebsocketProducerCarriage
[source]¶ Bases:
ebu_tt_live.carriage.base.AbstractProducerCarriage
-
classmethod
auto_register_impl
(y)¶
-
classmethod