# Class e.c.c.p.PlayerEngine(Component):

Part of elisa.core.components.player_engine View In Hierarchy

Known subclasses: elisa.core.tests.test_player_engine.FooEngine, elisa.core.tests.test_player_engine_registry.BarEngine, elisa.core.tests.test_player_engine_registry.FooEngine, elisa.core.tests.test_player_engine_registry.GooEngine, elisa.plugins.base.playbin_engine.PlaybinEngine

A PlayerEngine provides various media playback related functionalities. It declares the uri schemes it supports and will be automatically instantiated by the `elisa.core.player_engine_registry.PlayerEngineRegistry` if needed.

Messages listed at `elisa.core.player` have to be sent by the engine at appropriate times.

Instance Variables | video_sink | the videosink of this player engine (type: `gst.BaseSink` )
| audio_sink | the audiosink of this player engine (type: `gst.BaseSink` )
| visualisation | the visualisation element for the player engine (type: `gst.Element` )
| volume | a value between 0 and 10 (type: float )
| position | the position we are currently playing in nanoseconds (type: float )
| duration | (read-only) the total length of the loaded uri in nanoseconds (type: float )
| speed | The speed of the current playback: Normal playback is 1.0 a positive value means forward a negative one backward a value bigger (+/-) 1.0 means faster a value smaller (+/-) 1.0 means slower the value 0.0 (equivalent to pause) is not allowed (type: float )
| state | (read-only) The current state. (type: `elisa.core.player.STATES` )
| uri | (write-only) change the engine to be able to play the set uri. (type: `elisa.core.media_uri.Mediauri` )
| message_sender | who is the sender of messages (per default it is self) (type: instance )
Class Variables | uri_schemes | the uri-schemes this engine supports associated with their ranking value between 0 (highest rank) and 255 (lowest rank) (type: dict )

Line # | Kind | Name | Docs
--- | --- | --- | ---
94 | Method | __init__ | Undocumented
105 | Method | play | Play the media. If trigger_message is set to True, this triggers first
138 | Method | pause | Pause the playback. If trigger_message is set to True, this triggers
155 | Method | stop | Stop the playback.
174 | Method | volume__set | Undocumented
177 | Method | volume__get | Undocumented
182 | Method | uri__set | Undocumented
187 | Method | position__get | Undocumented
197 | Method | position__set | Undocumented
202 | Method | state__get | Undocumented
205 | Method | duration__get | Undocumented
214 | Method | speed__get | Undocumented
217 | Method | speed_set | Undocumented
223 | Method | video_sink__get | Undocumented
226 | Method | video_sink__set | Undocumented
231 | Method | audio_sink__get | Undocumented
234 | Method | audio_sink__set | Undocumented
239 | Method | visualisation__get | Undocumented
242 | Method | visualisation__set | Undocumented

Inherited from Component:

Line # | Kind | Name | Docs
--- | --- | --- | ---
85 | Class | PathDescriptor | Undocumented
97 | Class Method | create | Create and initialize the component.
130 | Method | initialize | Initialize the component.
142 | Method | clean | Clean the component.

def __init__(self):
overrides elisa.core.log.Loggable.__init__
overridden in elisa.core.tests.test_player_engine.FooEngine, elisa.plugins.base.playbin_engine.PlaybinEngine
Undocumented
def play(self, trigger_message=True):
Play the media. If trigger_message is set to True, this triggers first the message `elisa.core.player.PlayerLoading` message and if the playback is really starting, it triggers `elisa.core.player.PlayerPlaying`. Otherwise it does not trigger any messages.

Parameters | trigger_message | should the player trigger messages here (type: bool )

def pause(self, trigger_message=True):
Pause the playback. If trigger_message is set to True, this triggers the `elisa.core.player.PlayerPausing` message.

Parameters | trigger_message | should the player trigger a message here (type: bool )

def stop(self, trigger_message=True):
Stop the playback. If trigger_message is set, this method triggers the `elisa.core.player.PlayerStopping` message.

Parameters | trigger_message | should the player trigger a message here (type: bool )

def volume__set(self, volume):
overridden in elisa.core.tests.test_player_engine.FooEngine, elisa.plugins.base.playbin_engine.PlaybinEngine
Undocumented
def volume__get(self):
overridden in elisa.core.tests.test_player_engine.FooEngine, elisa.plugins.base.playbin_engine.PlaybinEngine
Undocumented
def uri__set(self, uri):
overridden in elisa.plugins.base.playbin_engine.PlaybinEngine
Undocumented
def position__get(self):
Undocumented
def position__set(self, position):
Undocumented
def state__get(self):
overridden in elisa.core.tests.test_player_engine.FooEngine
Undocumented
def duration__get(self):
Undocumented
def speed__get(self):
Undocumented
def speed_set(self, speed):
Undocumented
def video_sink__get(self):
overridden in elisa.core.tests.test_player_engine.FooEngine, elisa.plugins.base.playbin_engine.PlaybinEngine
Undocumented
def video_sink__set(self, sink):
overridden in elisa.core.tests.test_player_engine.FooEngine, elisa.plugins.base.playbin_engine.PlaybinEngine
Undocumented
def audio_sink__get(self):
overridden in elisa.core.tests.test_player_engine.FooEngine, elisa.plugins.base.playbin_engine.PlaybinEngine
Undocumented
def audio_sink__set(self, sink):
overridden in elisa.core.tests.test_player_engine.FooEngine, elisa.plugins.base.playbin_engine.PlaybinEngine
Undocumented
def visualisation__get(self):
overridden in elisa.plugins.base.playbin_engine.PlaybinEngine
Undocumented
def visualisation__set(self, gst_element):
overridden in elisa.plugins.base.playbin_engine.PlaybinEngine
Undocumented