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

Type FeedComponent

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


I am a base class for all Flumotion feed components.
Method Summary
  __init__(self, name, eater_config, feeder_config)
  addEffect(self, effect)
  bus_watch_func(self, bus, message)
  cleanup(self)
  create_pipeline(self)
  effectPropertyChanged(self, effectName, propertyName, value)
Notify the manager that an effect property has changed to a new value.
  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)
  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)
  pipeline_stop(self)
  restart(self)
  set_element_property(self, element_name, property, value)
Sets a property on an element in the GStreamer pipeline.
  set_feed_ports(self, feed_ports)
  setup_pipeline(self)
  stop(self)
Tell the component to stop.
  _buffer_probe_cb(self, pad, buffer, name)
  _setup_eaters(self, eatersData)
Set up the feeded GStreamer elements in our pipeline based on information in the tuple.
  _setup_feeders(self, feedersData)
Set up the feeding GStreamer elements in our pipeline based on information in the tuple.
    Inherited from BaseComponent
  adminCallRemote(self, methodName, *args, **kwargs)
Call a remote method on all admin client views on this component.
  do_start(self, *args, **kwargs)
BaseComponent vmethod for starting up.
  emit(self, name, *args)
  getName(self)
  getWorkerName(self)
  setConfig(self, config)
  setMedium(self, medium)
  setMood(self, mood)
Set the given mood on the component if it's different from the current one.
  setWorkerName(self, workerName)
  start(self, *args, **kwargs)
Tell the component to start.
  startHeartbeat(self)
Start sending heartbeats.
  stopHeartbeat(self)
Stop sending heartbeats.
  _heartbeat(self)
Send heartbeat to manager and reschedule.
    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+feedcomponent09+F...
str EATER_TMPL = 'tcpclientsrc name=%(name)s'
str FEEDER_TMPL = 'tcpserversink sync=false name=%(name)s bu...
str logCategory: Implementors can provide a category to log their messages under.
int _reconnectInterval = 3                                                                     
    Inherited from BaseComponent
int _heartbeatInterval = 5                                                                     
    Inherited from GObject
str __gdoc__ = 'Object GObject\n\nSignals from GObject:\n  n...
getset_descriptor __grefcount__ = <attribute '__grefcount__' of 'gobject.G...

Method Details

__init__(self, name, eater_config, feeder_config)
(Constructor)

Parameters:
name - name of the component
           (type=string)
eater_config - entries between <source>...</source> from config
feeder_config - entries between <feed>...</feed> from config
Overrides:
flumotion.component.component.BaseComponent.__init__

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.
Returns:
a list of "componentName:feedName" strings

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.
Returns:
a list of "feedName" strings

get_feeder_names(self)

Return the list of feeder names this component has.
Returns:
a list of "componentName:feedName" strings

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) tuples to use as feeders
Returns:
a list of (feedName, host, port) tuples for our feeders

set_element_property(self, element_name, property, value)

Sets a property on an element in the GStreamer pipeline.

set_feed_ports(self, feed_ports)

Parameters:
feed_ports - feed_name -> port
           (type=dict)

stop(self)

Tell the component to stop. The connection to the manager will be closed. The job process will also finish.
Overrides:
flumotion.component.component.BaseComponent.stop (inherited documentation)

_setup_eaters(self, eatersData)

Set up the feeded GStreamer elements in our pipeline based on information in the tuple. For each feeded element in the tuple, it sets the host and port of the feeder on the feeded element.
Parameters:
eatersData - list of (feederName, host, port) tuples
           (type=list)

_setup_feeders(self, feedersData)

Set up the feeding GStreamer elements in our pipeline based on information in the tuple. For each feeding element in the tuple, it sets the host it will listen as.
Parameters:
feedersData - a list of (feederName, host) tuples.
           (type=tuple)
Returns:
a list of (feedName, host, port) tuples for our feeders.

Class Variable Details

__gtype__

Type:
GType
Value:
<GType flumotion+component+feedcomponent09+FeedComponent (8203296)>    

EATER_TMPL

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

FEEDER_TMPL

Type:
str
Value:
'tcpserversink sync=false name=%(name)s buffers-max=500 buffers-soft-m\
ax=450 recover-policy=1'                                               

logCategory

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

_reconnectInterval

Type:
int
Value:
3                                                                     

Generated by Epydoc 2.1 on Tue Dec 20 15:33:10 2005 http://epydoc.sf.net