Package flumotion :: Package component :: Package common :: Package streamer :: Module streamer :: Class Streamer
[hide private]

Class Streamer

source code

             object --+                
                      |                
common.common.InitMixin --+            
                          |            
extern.log.log.Loggable --+            
                          |            
    component.BaseComponent --+        
                              |        
 feedcomponent010.FeedComponent --+    
                                  |    
 feedcomponent.ParseLaunchComponent --+
                                      |
                         object --+   |
                                  |   |
                              Stats --+
                                      |
                                     Streamer
Known Subclasses:

Nested Classes [hide private]
child class of BaseComponentMedium componentMediumClass
the medium class to use for this component
  siteClass
A web site: manage log, sessions, and resources.
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
 
check_properties(self, props, addMessage)
BaseComponent convenience vmethod for running checks.
source code
 
configure_auth_and_resource(self) source code
 
parseProperties(self, properties) 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
 
getMaxClients(self) source code
 
hasCaps(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
 
update_ui_state(self)
Update the uiState object.
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_pipeline_playing(self)
Invoked when the pipeline has changed the state to playing.
source code
 
remove_all_clients(self)
Remove all the the clients
source code
 
_get_root() source code
 
do_setup(self)
Sets up component.
source code
 
__provides__(...)
Special descriptor for class __provides__

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

Inherited from feedcomponent010.FeedComponent: addEffect, attachPadMonitorToElement, attachPadMonitorToFeeder, bus_message_received_cb, cleanup, connect_feeders, dump_gstreamer_debug_dot_file, eatFromFD, feedToFD, get_element, get_element_property, get_master_clock, get_pipeline, install_eater_continuity_watch, install_eater_event_probes, make_message_for_gstreamer_error, modify_element_property, provide_master_clock, reconnectEater, set_element_property, set_master_clock, setup_completed, stop_pipeline, try_start_pipeline, unblock_eater

Inherited from component.BaseComponent: __init__, addMessage, adminCallRemote, checkPropertyType, do_check, fixRenamedProperties, getMood, getName, getWorkerName, modifyProperty, observerAppend, observerRemove, removeMessage, setMedium, setMood, setShutdownHook, setWorkerName, setup, stop, waitForHappy, warnDeprecatedProperties

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

Inherited from Stats (private): _updateAverage, _updateStats

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

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=sinksync=false recover-polic...
  multi_files = False
  __implemented__ = <implementedBy flumotion.component.common.st...

Inherited from feedcomponent.ParseLaunchComponent: DELIMITER, DEPAY_TMPL, EATER_TMPL, FDSRC_TMPL, FEEDER_TMPL, checkTimestamp

Inherited from feedcomponent010.FeedComponent: FEEDER_STATS_UPDATE_FREQUENCY, dropStreamHeaders, eaters, feeders, swallowNewSegment

Instance Variables [hide private]

Inherited from component.BaseComponent: medium, name, uiState

Properties [hide private]

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)

check_properties(self, props, addMessage)

source code 

BaseComponent convenience vmethod for running checks.

A component implementation can override this method to run any checks that it needs to. Typically, a check_properties implementation will call the provided addMessage() callback to note warnings or errors. For errors, addMessage() will set component's mood to sad, which will abort the init process before getting to do_setup().

Parameters:
  • properties - The component's properties
  • addMessage - Thunk to add a message to the component state. Will raise an exception if the message is of level ERROR.
Overrides: component.BaseComponent.check_properties
(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)

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.

update_ui_state(self)

source code 

Update the uiState object. Such updates (through this function) are throttled to a maximum rate, to avoid saturating admin clients with traffic when many clients are connecting/disconnecting.

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_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.

Overrides: feedcomponent010.FeedComponent.do_pipeline_playing
(inherited documentation)

remove_all_clients(self)

source code 

Remove all the the clients

Returns a deferred fired once all clients have been removed

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
(inherited documentation)

__provides__(...)

 
Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that
we can get declarations for objects without instance-specific
interfaces a bit quicker.

Overrides: extern.log.log.Loggable.__provides__

Class Variable Details [hide private]

pipe_template

Value:
'multifdsink name=sinksync=false recover-policy=3'

__implemented__

Value:
<implementedBy flumotion.component.common.streamer.streamer.Streamer>