TSDuck Version 3.29-2562 (TSDuck - The MPEG Transport Stream Toolkit)
tsduck.InputSwitcher Class Reference

A wrapper class for C++ InputSwitcher. More...

Inheritance diagram for tsduck.InputSwitcher:
Collaboration diagram for tsduck.InputSwitcher:

Public Member Functions

def __init__ (self, report)
 Constructor. More...
 
def currentInput (self)
 Get the index of the current input plugin. More...
 
def delete (self)
 Explicitly free the underlying C++ object. More...
 
def nextInput (self)
 Switch to the next input plugin. More...
 
def previousInput (self)
 Switch to the previous input plugin. More...
 
def registerEventHandler (self, handler, event_code)
 Register an event handler by event code. More...
 
def registerInputEventHandler (self, handler)
 Register an event handler for all events from the input plugin. More...
 
def registerOutputEventHandler (self, handler)
 Register an event handler for all events from the output plugin. More...
 
def setInput (self, plugin_index)
 Switch to another input plugin. More...
 
def start (self)
 Start the input switcher. More...
 
def stop (self)
 Terminate the processing. More...
 
def waitForTermination (self)
 Suspend the calling thread until input switcher session is completed. More...
 

Public Attributes

 app_name
 Application name, for help messages.
 
 buffered_packets
 Input buffer size in packets (0=default).
 
 cycle_count
 Number of input cycles to execute (0 = infinite).
 
 delayed_switch
 Delayed switch between input plugins.
 
 event_command
 External shell command to run on a switching event.
 
 event_local_address
 Outgoing local interface for UDP event description.
 
 event_ttl
 Time-to-live socket option for UDP event description.
 
 event_udp_address
 Remote IPv4 address or host name to receive switching event JSON description.
 
 event_udp_port
 Remote UDP port to receive switching event JSON description.
 
 fast_switch
 Fast switch between input plugins.
 
 first_input
 Index of first input plugin.
 
 inputs
 Input plugins name and arguments (list of lists of strings).
 
 max_input_packets
 Maximum input packets to read at a time (0=default).
 
 max_output_packets
 Maximum input packets to send at a time (0=default).
 
 output
 Output plugin name and arguments (list of strings)
 
 primary_input
 Index of primary input plugin, negative if there is none.
 
 receive_timeout
 Receive timeout before switch (0=none).
 
 remote_server_port
 UDP server port for remote control (0=none).
 
 reuse_port
 Reuse-port socket option.
 
 sock_buffer
 Socket buffer size (0=default).
 
 terminate
 Terminate when one input plugin completes.
 

Detailed Description

A wrapper class for C++ InputSwitcher.

Constructor & Destructor Documentation

◆ __init__()

def tsduck.InputSwitcher.__init__ (   self,
  report 
)

Constructor.

Parameters
reportThe tsduck.Report object to use.

Member Function Documentation

◆ delete()

def tsduck.InputSwitcher.delete (   self)

Explicitly free the underlying C++ object.

After this call, the object becomes unusable. Most usages are unpredictable but most likely will do nothing.

Returns
None.

Reimplemented from tsduck.NativeObject.

◆ start()

def tsduck.InputSwitcher.start (   self)

Start the input switcher.

All properties shall have been set before calling this method.

Returns
None.

◆ setInput()

def tsduck.InputSwitcher.setInput (   self,
  plugin_index 
)

Switch to another input plugin.

Parameters
plugin_indexIndex of the new input plugin.
Returns
None.

◆ nextInput()

def tsduck.InputSwitcher.nextInput (   self)

Switch to the next input plugin.

Returns
None.

◆ previousInput()

def tsduck.InputSwitcher.previousInput (   self)

Switch to the previous input plugin.

Returns
None.

◆ currentInput()

def tsduck.InputSwitcher.currentInput (   self)

Get the index of the current input plugin.

Returns
The index of the current input plugin.

◆ stop()

def tsduck.InputSwitcher.stop (   self)

Terminate the processing.

Returns
None.

◆ waitForTermination()

def tsduck.InputSwitcher.waitForTermination (   self)

Suspend the calling thread until input switcher session is completed.

Returns
None.

◆ registerEventHandler()

def tsduck.PluginEventHandlerRegistry.registerEventHandler (   self,
  handler,
  event_code 
)
inherited

Register an event handler by event code.

Parameters
handlerAn instance of AbstractPluginEventHandler.
event_codeThe code of the events to handle.
Returns
None.

◆ registerInputEventHandler()

def tsduck.PluginEventHandlerRegistry.registerInputEventHandler (   self,
  handler 
)
inherited

Register an event handler for all events from the input plugin.

Parameters
handlerAn instance of AbstractPluginEventHandler.
Returns
None.

◆ registerOutputEventHandler()

def tsduck.PluginEventHandlerRegistry.registerOutputEventHandler (   self,
  handler 
)
inherited

Register an event handler for all events from the output plugin.

Parameters
handlerAn instance of AbstractPluginEventHandler.
Returns
None.

The documentation for this class was generated from the following file: