Package flumotion :: Package component :: Package effects :: Package volume :: Module volume :: Class Volume
[hide private]

Class Volume

source code

extern.log.log.Loggable --+    
                          |    
       feedcomponent.Effect --+
                              |
                             Volume

I am an effect that can be added to any component that has a level element and a way of controlling volume.

My component should implement setVolume() and getVolume()

Instance Methods [hide private]
 
__init__(self, name, element, pipeline, allowIncrease=True, allowVolumeSet=True) source code
 
setUIState(self, state)
Set the given UI state on the effect.
source code
 
_bus_message_received_cb(self, bus, message) source code
 
effect_setVolume(self, value)
Sets volume
source code
float (between 0.0 and 4.0)
effect_getVolume(self)
Gets current volume setting.
source code

Inherited from feedcomponent.Effect: getComponent, setComponent

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

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

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

Instance Variables [hide private]

Inherited from feedcomponent.Effect: component, name

Method Details [hide private]

__init__(self, name, element, pipeline, allowIncrease=True, allowVolumeSet=True)
(Constructor)

source code 
Parameters:
  • element - the level element
  • pipeline - the pipeline
  • allowIncrease - whether the component allows > 1.0 volume level
  • allowVolumeSet - whether the component allows setting volume
Overrides: feedcomponent.Effect.__init__

setUIState(self, state)

source code 

Set the given UI state on the effect. This method is ideal for adding keys to the UI state.

Parameters:
  • state - the UI state for the component to use.
Overrides: feedcomponent.Effect.setUIState
(inherited documentation)

_bus_message_received_cb(self, bus, message)

source code 
Parameters:
  • bus - the message bus sending the message
  • message - the message received

effect_setVolume(self, value)

source code 

Sets volume

Parameters:
  • value - what value to set volume to (float between 0.0 and 4.0)

    Returns: the actual value it was set to

effect_getVolume(self)

source code 

Gets current volume setting.

Returns: float (between 0.0 and 4.0)
what value the volume is set to