Package flumotion :: Package component :: Package consumers :: Package httpstreamer :: Module http :: Class MultifdSinkStreamer
[hide private]

Class MultifdSinkStreamer

source code

             object --+                
                      |                
common.common.InitMixin --+            
                          |            
    common.log.Loggable --+            
                          |            
             object --+   |            
                      |   |            
        gobject.GObject --+            
                          |            
    component.BaseComponent --+        
                              |        
 feedcomponent010.FeedComponent --+    
                                  |    
 feedcomponent.ParseLaunchComponent --+
                                      |
                              Stats --+
                                      |
                                     MultifdSinkStreamer

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
 
getDescription(self) source code
 
get_pipeline_string(self, properties)
Method that must be implemented by subclasses to produce the gstparse string for the component's pipeline.
source code
 
do_check(self)
Subclasses can implement me to run any checks before the component performs setup.
source code
 
time_bursting_supported(self, sink) source code
 
setup_burst_mode(self, sink) source code
 
configure_pipeline(self, pipeline, properties)
Method that can be implemented by subclasses if they wish to interact with the pipeline after it has been created and set on the component.
source code
 
__repr__(self)
repr(x)
source code
 
getMaxClients(self) source code
 
get_mime(self) source code
 
get_content_type(self) source code
 
getUrl(self) source code
 
getStreamData(self) source code
 
getLoadData(self)
Return a tuple (deltaadded, deltaremoved, bytes_transferred, current_clients, current_load) of our current bandwidth and user values.
source code
 
add_client(self, fd) source code
 
remove_client(self, fd) source code
 
update_ui_state(self) source code
 
_client_added_handler(self, sink, fd) source code
 
_client_removed_handler(self, sink, fd, reason, stats) source code
 
_notify_caps_cb(self, element, pad, param) source code
 
_client_removed_cb(self, sink, fd, reason) source code
 
_client_fd_removed_cb(self, sink, fd) source code
 
do_stop(self)
BaseComponent vmethod for stopping.
source code
 
updatePorterDetails(self, path, username, password)
Provide a new set of porter login information, for when we're in slave mode and the porter changes.
source code
 
do_start(self, *args, **kwargs)
Tell the component to start.
source code

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

Inherited from feedcomponent010.FeedComponent: addEffect, bus_watch_func, cleanup, do_setup, eatFromFD, eaterOffsetDiscont, eaterSetActive, eaterSetInactive, eaterTimestampDiscont, effectPropertyChanged, feedToFD, get_eater_names, get_element, get_element_property, get_feed_names, get_feeder_names, get_pipeline, link, parseEaterConfig, parseFeederConfig, pipeline_stop, provide_master_clock, removeClientCallback, set_element_property, set_master_clock, setup_pipeline, unblock_eater

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

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

Inherited from gobject.GObject: __cmp__, __delattr__, __gdoc__, __gobject_init__, __hash__, __new__, __setattr__, chain, connect, connect_after, connect_object, connect_object_after, disconnect, disconnect_by_func, emit_stop_by_name, freeze_notify, get_data, get_properties, get_property, handler_block, handler_block_by_func, handler_disconnect, handler_is_connected, handler_unblock, handler_unblock_by_func, notify, props, set_data, set_properties, set_property, stop_emission, thaw_notify, weak_ref

Inherited from object: __getattribute__, __reduce__, __reduce_ex__, __str__

Inherited from Stats: clientAdded, clientRemoved, getAverageClients, getBytesReceived, getBytesSent, getClients, getLoadDeltas, getPeakClients, getPeakEpoch, getUptime, updateState

Inherited from Stats (private): _updateAverage, _updateStats

Class Variables [hide private]
  checkOffset = True
whether to check continuity of offsets for eaters
  logCategory = 'cons-http'
Implementors can provide a category to log their messages under.
  pipe_template = 'multifdsink name=sink sync=false recover-poli...
  __gtype__ = <GType flumotion+component+consumers+httpstreamer+...
  __implemented__ = <implementedBy flumotion.component.consumers...
  __provides__ = <zope.interface.declarations.ClassProvides obje...

Inherited from feedcomponent.ParseLaunchComponent: DELIMITER

Inherited from feedcomponent010.FeedComponent: BUFFER_CHECK_FREQUENCY, BUFFER_PROBE_ADD_FREQUENCY, BUFFER_TIME_THRESHOLD, DEPAY_TMPL, FDSRC_TMPL, FEEDER_TMPL, checkTimestamp

Instance Variables [hide private]

Inherited from component.BaseComponent: medium, name

Properties [hide private]

Inherited from gobject.GObject: __grefcount__

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)

get_pipeline_string(self, properties)

source code 

Method that must be implemented by subclasses to produce the gstparse string for the component's pipeline. Subclasses should not chain up; this method raises a NotImplemented error.

Returns: a new pipeline string representation.

Overrides: feedcomponent.ParseLaunchComponent.get_pipeline_string
(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 set the mood to sad and raise the error on its own.

self.config will be set before this is called.

Returns:
twisted.internet.defer.Deferred
Overrides: component.BaseComponent.do_check
(inherited documentation)

configure_pipeline(self, pipeline, properties)

source code 

Method that can be implemented by subclasses if they wish to interact with the pipeline after it has been created and set on the component.

This could include attaching signals and bus handlers.

Overrides: feedcomponent.ParseLaunchComponent.configure_pipeline
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

getUrl(self)

source code 
Overrides: Stats.getUrl

getLoadData(self)

source code 

Return a tuple (deltaadded, deltaremoved, bytes_transferred, current_clients, current_load) of our current bandwidth and user values. The deltas are estimates of how much bitrate is added, removed due to client connections, disconnections, per second.

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)

updatePorterDetails(self, path, username, password)

source code 

Provide a new set of porter login information, for when we're in slave mode and the porter changes. If we're currently connected, this won't disconnect - it'll just change the information so that next time we try and connect we'll use the new ones

do_start(self, *args, **kwargs)

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.

Parameters:
  • clocking - tuple of (ip, port, base_time) of a master clock, or None not to slave the clock
Returns:
twisted.internet.defer.Deferred
Overrides: component.BaseComponent.do_start
(inherited documentation)

Class Variable Details [hide private]

pipe_template

Value:
'multifdsink name=sink sync=false recover-policy=3'

__gtype__

Value:
<GType flumotion+component+consumers+httpstreamer+http+MultifdSinkStre\
amer (151

__implemented__

Value:
<implementedBy flumotion.component.consumers.httpstreamer.http.Multifd\
SinkStreamer>

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0x905a12c>