Package flumotion :: Package component :: Module feedcomponent08 :: Class FeedComponent
[show private | hide private]
[frames | no frames]

Type FeedComponent

object --+        
         |        
   GObject --+    
             |    
object --+   |    
         |   |    
 InitMixin --+    
             |    
  Loggable --+    
             |    
 BaseComponent --+
                 |
                FeedComponent


I am a base class for all Flumotion feed components.
Method Summary
  addEffect(self, effect)
  cleanup(self)
  create_pipeline(self)
  do_setup(self)
Subclasses can implement me to set up the component before it is started.
  do_stop(self)
BaseComponent vmethod for stopping.
  eater_state_change_cb(self, element, old, state)
Called when the eater element changes state.
  effectPropertyChanged(self, effectName, propertyName, value)
Notify the manager that an effect property has changed to a new value.
  feeder_state_change_cb(self, element, old, state, feed_name)
  get_eater_names(self)
Return the list of feeder names this component eats from.
  get_element(self, element_name)
  get_element_property(self, element_name, property)
Gets a property of an element in the GStreamer pipeline.
  get_feed_names(self)
Return the list of feeder names this component has.
  get_feeder_names(self)
Return the list of feeder names this component has.
  get_pipeline(self)
  init(self)
A subclass should do as little as possible in its init method.
  link(self, eatersData, feedersData)
Make the component eat from the feeds it depends on and start producing feeds itself.
  parseEaterConfig(self, eater_config)
  parseFeederConfig(self, feeder_config)
  pause(self)
  pipeline_pause(self)
  pipeline_play(self)
Start playing the pipeline.
  pipeline_stop(self)
  play(self)
  provide_master_clock(self, port)
  restart(self)
  set_element_property(self, element_name, property, value)
Sets a property on an element in the GStreamer pipeline.
  set_master_clock(self, ip, port, base_time)
  set_pipeline(self, pipeline)
  set_state_and_iterate(self, state)
Set the given gst state and start iterating the pipeline if not done yet.
  setup_pipeline(self)
  updateMood(self)
Update the mood because a mood condition has changed.
    Inherited from BaseComponent
  __init__(self)
Subclasses should not override __init__ at all.
  addMessage(self, message)
Add a message to the component.
  adminCallRemote(self, methodName, *args, **kwargs)
Call a remote method on all admin client views on this component.
  do_check(self)
Subclasses can implement me to run any checks before the component performs setup.
  do_start(self, *args, **kwargs)
BaseComponent vmethod for starting up.
  emit(self, name, *args)
  getName(self)
  getWorkerName(self)
  setMedium(self, medium)
  setMood(self, mood)
Set the given mood on the component if it's different from the current one.
  setup(self, config)
Sets up the component with the given config.
  setWorkerName(self, workerName)
  start(self, *args, **kwargs)
Tell the component to start.
  startHeartbeat(self)
Start sending heartbeats.
  stop(self)
Tell the component to stop.
  stopHeartbeat(self)
Stop sending heartbeats.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, message)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure)
Log a warning about a Failure.
    Inherited from GObject
  __cmp__(x, y)
x.__cmp__(y) <==> cmp(x,y)
  __gobject_init__(...)
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __repr__(x)
x.__repr__() <==> repr(x)
  chain(...)
  connect(...)
  connect_after(...)
  connect_object(...)
  connect_object_after(...)
  disconnect(...)
  emit_stop_by_name(...)
  freeze_notify(...)
  get_data(...)
  get_property(...)
  handler_block(...)
  handler_disconnect(...)
  handler_is_connected(...)
  handler_unblock(...)
  notify(...)
  set_data(...)
  set_property(...)
  stop_emission(...)
  thaw_notify(...)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Instance Variable Summary
    Inherited from BaseComponent
string name: the name of the component

Class Variable Summary
GType __gtype__ = <GType flumotion+component+feedcomponent08+F...
str EATER_TMPL = 'tcpclientsrc name=%(name)s'
str FEEDER_TMPL = 'tcpserversink name=%(name)s buffers-max=5...
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from GObject
str __gdoc__ = 'Object GObject\n\nSignals from GObject:\n  n...
getset_descriptor __grefcount__ = <attribute '__grefcount__' of 'gobject.G...
GProps props = <gobject.GProps object at 0xf600a8ec>

Method Details

do_setup(self)

Subclasses can implement me to set up the component before it is started. It should set up the component, possibly opening files and resources. Non-programming errors should not be raised, but returned as a failing deferred.

self.config will be set when this is called.
Returns:
twisted.internet.defer.Deferred
Overrides:
flumotion.component.component.BaseComponent.do_setup (inherited documentation)

do_stop(self)

BaseComponent vmethod for stopping. If you override this method, you are responsible for arranging that the component becomes sleeping.
Returns:
twisted.internet.defer.Deferred
Overrides:
flumotion.component.component.BaseComponent.do_stop (inherited documentation)

eater_state_change_cb(self, element, old, state)

Called when the eater element changes state.

effectPropertyChanged(self, effectName, propertyName, value)

Notify the manager that an effect property has changed to a new value.

Admin clients will receive it as a propertyChanged message for effectName:propertyName.

get_eater_names(self)

Return the list of feeder names this component eats from.

get_element_property(self, element_name, property)

Gets a property of an element in the GStreamer pipeline.

get_feed_names(self)

Return the list of feeder names this component has.

get_feeder_names(self)

Return the list of feeder names this component has.

init(self)

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:
flumotion.component.component.BaseComponent.init (inherited documentation)

link(self, eatersData, feedersData)

Make the component eat from the feeds it depends on and start producing feeds itself.
Parameters:
eatersData - list of (feederName, host, port) tuples to eat from
feedersData - list of (feederName, host, port) tuples to use as feeders

pipeline_play(self)

Start playing the pipeline.
Returns:
whether or not the pipeline was started successfully.

set_element_property(self, element_name, property, value)

Sets a property on an element in the GStreamer pipeline.

set_state_and_iterate(self, state)

Set the given gst state and start iterating the pipeline if not done yet.

updateMood(self)

Update the mood because a mood condition has changed. Will not change the mood if it's sad - sad needs to be explicitly fixed.

See the mood transition diagram.

Class Variable Details

__gtype__

Type:
GType
Value:
<GType flumotion+component+feedcomponent08+FeedComponent (137015248)>  

EATER_TMPL

Type:
str
Value:
'tcpclientsrc name=%(name)s'                                           

FEEDER_TMPL

Type:
str
Value:
'tcpserversink name=%(name)s buffers-max=500 buffers-soft-max=450 reco\
ver-policy=1'                                                          

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'feedcomponent'                                                        

Generated by Epydoc 2.1 on Thu Jan 25 09:31:11 2007 http://epydoc.sf.net