Package flumotion :: Package component :: Module feedcomponent010 :: Class FeedComponent
[hide private]

Class FeedComponent

source code

             object --+        
                      |        
common.common.InitMixin --+    
                          |    
extern.log.log.Loggable --+    
                          |    
    component.BaseComponent --+
                              |
                             FeedComponent
Known Subclasses:

I am a base class for all Flumotion feed components.

Nested Classes [hide private]

Inherited from component.BaseComponent: componentMediumClass

Instance Methods [hide private]
 
_feeder_probe_calllater(self) source code
 
_setup_pipeline(self) source code
 
addEffect(self, effect) source code
 
attachPadMonitorToFeeder(self, feederName) source code
 
bus_message_received_cb(self, bus, message) source code
 
cleanup(self) source code
 
connect_feeders(self, pipeline) source code
gst.Pipeline
create_pipeline(self)
Subclasses have to implement this method.
source code
 
do_pipeline_playing(self)
Invoked when the pipeline has changed the state to playing.
source code
 
do_setup(self)
Sets up component.
source code
 
do_stop(self)
BaseComponent vmethod for stopping.
source code
 
eatFromFD(self, eaterAlias, feedId, fd)
Tell the component to eat the given feedId from the given fd.
source code
 
feedToFD(self, feedName, fd, cleanup, eaterId=None) source code
 
get_element(self, element_name)
Get an element out of the pipeline.
source code
 
get_element_property(self, element_name, property)
Gets a property of an element in the GStreamer pipeline.
source code
 
get_master_clock(self)
Return the connection details for the network clock provided by this component, if any.
source code
 
get_pipeline(self) source code
 
init(self)
A subclass should do as little as possible in its init method.
source code
 
install_eater_continuity_watch(self, eaterWatchElements)
Watch a set of elements for discontinuity messages.
source code
 
install_eater_event_probes(self, eater) source code
 
make_message_for_gstreamer_error(self, gerror, debug)
Make a flumotion error message to show to the user.
source code
 
provide_master_clock(self, port)
Tell the component to provide a master clock on the given port.
source code
 
reconnectEater(self, eaterAlias) source code
 
set_element_property(self, element_name, property, value)
Sets a property on an element in the GStreamer pipeline.
source code
 
set_master_clock(self, ip, port, base_time) source code
 
set_pipeline(self, pipeline)
Subclasses can override me.
source code
 
setup_completed(self) source code
 
stop_pipeline(self) source code
 
try_start_pipeline(self)
Tell the component to start.
source code
 
unblock_eater(self, eaterAlias)
After this function returns, the stream lock for this eater must have been released.
source code

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

Inherited from component.BaseComponent (private): _pollCPU, _pollMemory

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, writeMarker

Class Variables [hide private]
  FEEDER_STATS_UPDATE_FREQUENCY = 12.5
  logCategory = 'feedcomponent'
Implementors can provide a category to log their messages under.

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

Instance Variables [hide private]

Inherited from component.BaseComponent: medium, name, uiState

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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.

do_setup(self)

source code 

Sets up component.

Invokes the create_pipeline and set_pipeline vmethods, which subclasses can provide.

Overrides: component.BaseComponent.do_setup

do_stop(self)

source code 

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

eatFromFD(self, eaterAlias, feedId, fd)

source code 

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:
  • eaterAlias (str) - the alias of the eater
  • feedId (str) - feed id (componentName:feedName) to eat from through the given fd
  • fd (int) - the file descriptor to eat from

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

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

get_element(self, element_name)

source code 

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.

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)

install_eater_continuity_watch(self, eaterWatchElements)

source code 

Watch a set of elements for discontinuity messages.

Parameters:
  • eaterWatchElements (Dict of elementName => Eater.) - the set of elements to watch for discontinuities.

make_message_for_gstreamer_error(self, gerror, debug)

source code 

Make a flumotion error message to show to the user.

This method may be overridden by components that have special knowledge about potential errors. If the component does not know about the error, it can chain up to this implementation, which will make a generic message.

Parameters:
  • gerror (gst.GError) - The GError from the error message posted on the GStreamer message bus.
  • debug (str) - A string with debugging information.
Returns:
A flumotion.common.messages.Message to show to the user.

provide_master_clock(self, port)

source code 

Tell the component to provide a master clock on the given port.

Returns:
a deferred firing a (ip, port, base_time) triple.

set_pipeline(self, pipeline)

source code 

Subclasses can override me. They should chain up first.

setup_completed(self)

source code 
Overrides: component.BaseComponent.setup_completed

try_start_pipeline(self)

source code 

Tell the component to start. Whatever is using the component is responsible for making sure all eaters have received their file descriptor to eat from.

unblock_eater(self, eaterAlias)

source code 

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.