TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
tsduck.InputSwitcher Class Reference

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

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

Public Member Functions

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

Public Attributes

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

Protected Member Functions

 _getNative (self)
 Get the native object.
 _setNative (self, obj)
 Set the native object.

Detailed Description

A wrapper class for C++ InputSwitcher.

Constructor & Destructor Documentation

◆ __init__()

tsduck.InputSwitcher.__init__ ( self,
report )

Constructor.

Parameters
reportThe tsduck.Report object to use.

Member Function Documentation

◆ delete()

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()

tsduck.InputSwitcher.start ( self)

Start the input switcher.

All properties shall have been set before calling this method.

Returns
None.

◆ setInput()

tsduck.InputSwitcher.setInput ( self,
plugin_index )

Switch to another input plugin.

Parameters
plugin_indexIndex of the new input plugin.
Returns
None.

◆ nextInput()

tsduck.InputSwitcher.nextInput ( self)

Switch to the next input plugin.

Returns
None.

◆ previousInput()

tsduck.InputSwitcher.previousInput ( self)

Switch to the previous input plugin.

Returns
None.

◆ currentInput()

tsduck.InputSwitcher.currentInput ( self)

Get the index of the current input plugin.

Returns
The index of the current input plugin.

◆ stop()

tsduck.InputSwitcher.stop ( self)

Terminate the processing.

Returns
None.

◆ waitForTermination()

tsduck.InputSwitcher.waitForTermination ( self)

Suspend the calling thread until input switcher session is completed.

Returns
None.

◆ registerEventHandler()

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()

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()

tsduck.PluginEventHandlerRegistry.registerOutputEventHandler ( self,
handler )
inherited

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

Parameters
handlerAn instance of AbstractPluginEventHandler.
Returns
None.

◆ _setNative()

tsduck.NativeObject._setNative ( self,
obj )
protectedinherited

Set the native object.

This is typically done by subclass constructors.

Parameters
objAddress of the C++ native object to store.

◆ _getNative()

tsduck.NativeObject._getNative ( self)
protectedinherited

Get the native object.

This is typically used by subclasses.

Returns
Address of the C++ native object.

The documentation for this class was generated from the following file:
  • tsduck.py