Package flumotion :: Package component :: Package combiners :: Package switch :: Module switch :: Class Switch
[hide private]

Class Switch

source code

                  object --+                    
                           |                    
     common.common.InitMixin --+                
                               |                
     extern.log.log.Loggable --+                
                               |                
         component.BaseComponent --+            
                                   |            
      feedcomponent010.FeedComponent --+        
                                       |        
      feedcomponent.ParseLaunchComponent --+    
                                           |    
feedcomponent.MultiInputParseLaunchComponent --+
                                               |
                                              Switch
Known Subclasses:

Nested Classes [hide private]
child class of BaseComponentMedium componentMediumClass
the medium class to use for this component
Instance Methods [hide private]
 
init(self)
A subclass should do as little as possible in its init method.
source code
 
do_check(self)
Subclasses can implement me to run any checks before the component performs setup.
source code
 
switch_to(self, eaterSubstring) source code
 
is_active(self, eaterSubstring) source code
 
eventStarted(self, event) source code
 
eventStopped(self, event) source code
 
do_pipeline_playing(self)
Invoked when the pipeline has changed the state to playing.
source code
 
eaterSetActive(self, feedId) source code
 
switch_to_for_event(self, eaterSubstring, startOrStop) source code

Inherited from feedcomponent.MultiInputParseLaunchComponent: get_muxer_string, get_pipeline_string, get_queue_string, unblock_eater

Inherited from feedcomponent.ParseLaunchComponent: add_default_eater_feeder, configure_pipeline, create_pipeline, get_eater_template, get_feeder_template, parse_pipeline, parse_tmpl, set_pipeline

Inherited from feedcomponent010.FeedComponent: addEffect, attachPadMonitorToFeeder, bus_message_received_cb, cleanup, connect_feeders, do_setup, do_stop, eatFromFD, feedToFD, get_element, get_element_property, get_master_clock, get_pipeline, install_eater_continuity_watch, install_eater_event_probes, make_message_for_gstreamer_error, provide_master_clock, reconnectEater, set_element_property, set_master_clock, stop_pipeline, try_start_pipeline

Inherited from component.BaseComponent: __init__, addMessage, adminCallRemote, check_properties, fixRenamedProperties, getMood, getName, getWorkerName, setMedium, setMood, setShutdownHook, setWorkerName, setup, stop, waitForHappy

Inherited from component.BaseComponent (private): _pollCPU

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Inherited from extern.log.log.Loggable: __providedBy__, debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Class Variables [hide private]
  logCategory = 'comb-switch'
Implementors can provide a category to log their messages under.

Inherited from feedcomponent.MultiInputParseLaunchComponent: QUEUE_SIZE_BUFFERS

Inherited from feedcomponent.ParseLaunchComponent: DELIMITER, DEPAY_TMPL, EATER_TMPL, FDSRC_TMPL, FEEDER_TMPL, checkOffset, checkTimestamp

Inherited from feedcomponent010.FeedComponent: FEEDER_STATS_UPDATE_FREQUENCY

Inherited from extern.log.log.Loggable: __implemented__, __provides__

Instance Variables [hide private]

Inherited from component.BaseComponent: medium, name

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

init(self)

source code 

A subclass should do as little as possible in its init method. In particular, it should not try to access resources.

Failures during init are marshalled back to the manager through the worker's remote_create method, since there is no component state proxied to the manager yet at the time of init.

Overrides: component.BaseComponent.init
(inherited documentation)

do_check(self)

source code 

Subclasses can implement me to run any checks before the component performs setup.

Messages can be added to the component state's 'messages' list key. Any error messages added will trigger the component going to sad an flumotion.common.errors.ComponentSetupError being raised; do_setup() will not be called.

In the event of a fatal problem that can't be expressed through an error message, this method should raise an exception or return a failure.

It is not necessary to chain up in this function. The return value may be a deferred.

Overrides: component.BaseComponent.do_check
(inherited documentation)

do_pipeline_playing(self)

source code 

Invoked when the pipeline has changed the state to playing. The default implementation sets the component's mood to HAPPY.

Overrides: feedcomponent010.FeedComponent.do_pipeline_playing
(inherited documentation)

switch_to_for_event(self, eaterSubstring, startOrStop)

source code 
Parameters:
  • eaterSubstring - either "master" or "backup"
  • startOrStop - True if start of event, False if stop