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

Type FeedComponent

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

Known Subclasses:
ParseLaunchComponent

I am a base class for all Flumotion feed components.
Method Summary
  addEffect(self, effect)
  bus_watch_func(self, bus, message)
  cleanup(self)
gst.Pipeline create_pipeline(self)
Subclasses have to implement this method.
  do_setup(self)
Sets up component.
  do_stop(self)
BaseComponent vmethod for stopping.
  eaterConnected(self, feedId)
The eater for the given feedId was connected.
  eaterDisconnected(self, feedId)
The eater for the given feedId was disconnected.
  eatFromFD(self, feedId, fd)
Tell the component to eat the given feedId from the given fd.
  effectPropertyChanged(self, effectName, propertyName, value)
Notify the manager that an effect property has changed to a new value.
  feedToFD(self, feedName, fd, cleanup, eaterId)
  get_eater_names(self)
Return the list of feeder names this component eats from.
  get_element(self, element_name)
Get an element out of the pipeline.
  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.
twisted.internet.defer.Deferred link(self)
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)
  provide_master_clock(self, port)
Tell the component to provide a master clock on the given port.
  removeFDCallback(self, sink, fd)
Called (as a signal callback) when the FD is no longer in use by multifdsink.
  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)
Subclasses can override me.
  setup_pipeline(self)
  unblock_eater(self, feedId)
After this function returns, the stream lock for this eater must have been released.
    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)
  fixRenamedProperties(self, properties, list)
Fix properties that have been renamed from a previous version, and add a warning for them.
int getMood(self)
Gets the mood on the component.
  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, *args, **kwargs)
Sets up the component with the given config.
  setWorkerName(self, workerName)
  start(self, *args, **kwargs)
Tell the component to start.
  stop(self)
Tell the component to stop.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
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(...)
  disconnect_by_func(...)
  emit_stop_by_name(...)
  freeze_notify(...)
  get_data(...)
  get_property(...)
  handler_block(...)
  handler_block_by_func(...)
  handler_disconnect(...)
  handler_is_connected(...)
  handler_unblock(...)
  handler_unblock_by_func(...)
  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
BaseComponentMedium medium: the component's medium
string name: the name of the component

Class Variable Summary
GType __gtype__ = <GType flumotion+component+feedcomponent010+...
float BUFFER_CHECK_FREQUENCY = 12.5                                                                  
int BUFFER_PROBE_ADD_FREQUENCY = 5                                                                     
float BUFFER_TIME_THRESHOLD = 12.5                                                                  
classobj componentMediumClass = flumotion.component.feedcomponent.FeedComponentMedium
str DEPAY_TMPL = 'gdpdepay name=%(name)s-depay'
str EATER_TMPL = 'fdsrc name=%(name)s ! gdpdepay name=%(name...
str FDSRC_TMPL = 'fdsrc name=%(name)s'
str FEEDER_TMPL = 'gdppay ! multifdsink sync=false name=%(na...
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from Loggable
Implements __implemented__ = <implementedBy flumotion.common.log.Lo...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
    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 0x41bd360c>

Method Details

create_pipeline(self)

Subclasses have to implement this method.
Returns:
gst.Pipeline

do_setup(self)

Sets up component.
Overrides:
flumotion.component.component.BaseComponent.do_setup

do_stop(self)

BaseComponent vmethod for stopping. The component should do any cleanup it needs, but must not set the component's mood to sleeping.
Returns:
twisted.internet.defer.Deferred
Overrides:
flumotion.component.component.BaseComponent.do_stop (inherited documentation)

eaterConnected(self, feedId)

The eater for the given feedId was connected. By default, the component will go happy if all eaters are connected.

eaterDisconnected(self, feedId)

The eater for the given feedId was disconnected. By default, the component will go hungry.

eatFromFD(self, feedId, fd)

Tell the component to eat the given feedId from the given fd. The component takes over the ownership of the fd, closing it when no longer eating.
Parameters:
feedId - feed id (componentName:feedName) to eat from through the given fd
           (type=str)
fd - the file descriptor to eat from
           (type=int)

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.

feedToFD(self, feedName, fd, cleanup, eaterId=None)

Parameters:
feedName - name of the feed to feed to the given fd.
           (type=str)
fd - the file descriptor to feed to
           (type=int)
cleanup - the function to call when the FD is no longer feeding
           (type=callable)

get_eater_names(self)

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

get_element(self, element_name)

Get an element out of the pipeline.

If it is possible that the component has not yet been set up, the caller needs to check if self.pipeline is actually set.

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

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)

Make the component eat from the feeds it depends on and start producing feeds itself.
Returns:
twisted.internet.defer.Deferred

provide_master_clock(self, port)

Tell the component to provide a master clock on the given port.
Returns:
(ip, port, base_time) triple.

removeFDCallback(self, sink, fd)

Called (as a signal callback) when the FD is no longer in use by multifdsink. This will call the registered callable on the fd.

set_element_property(self, element_name, property, value)

Sets a property on an element in the GStreamer pipeline.

set_pipeline(self, pipeline)

Subclasses can override me. They should chain up first.

unblock_eater(self, feedId)

After this function returns, the stream lock for this eater must have been released. If your component needs to do something here, override this method.

Class Variable Details

__gtype__

Type:
GType
Value:
<GType flumotion+component+feedcomponent010+FeedComponent (137464000)> 

BUFFER_CHECK_FREQUENCY

Type:
float
Value:
12.5                                                                  

BUFFER_PROBE_ADD_FREQUENCY

Type:
int
Value:
5                                                                     

BUFFER_TIME_THRESHOLD

Type:
float
Value:
12.5                                                                  

DEPAY_TMPL

Type:
str
Value:
'gdpdepay name=%(name)s-depay'                                         

EATER_TMPL

Type:
str
Value:
'fdsrc name=%(name)s ! gdpdepay name=%(name)s-depay'                   

FDSRC_TMPL

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

FEEDER_TMPL

Type:
str
Value:
'gdppay ! multifdsink sync=false name=%(name)s buffers-max=500 buffers\
-soft-max=450 recover-policy=1'                                        

logCategory

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

Generated by Epydoc 2.1 on Fri Feb 2 11:44:37 2007 http://epydoc.sf.net