Author: dmeyer
Date: Thu Nov 30 18:17:39 2006
New Revision: 2135
Modified:
trunk/popcorn/src/backends/gstreamer/player.py
trunk/popcorn/src/backends/xine/player.py
trunk/popcorn/src/generic.py
trunk/popcorn/src/ptypes.py
Log:
add STATE_STOPPING
Modified: trunk/popcorn/src/backends/gstreamer/player.py
==============================================================================
--- trunk/popcorn/src/backends/gstreamer/player.py (original)
+++ trunk/popcorn/src/backends/gstreamer/player.py Thu Nov 30 18:17:39 2006
@@ -88,6 +88,7 @@
"""
Stop playback.
"""
+ self._state = STATE_STOPPING
self._gst.stop()
Modified: trunk/popcorn/src/backends/xine/player.py
==============================================================================
--- trunk/popcorn/src/backends/xine/player.py (original)
+++ trunk/popcorn/src/backends/xine/player.py Thu Nov 30 18:17:39 2006
@@ -276,6 +276,7 @@
Stop playback.
"""
log.debug('xine stop')
+ self._state = STATE_STOPPING
self._xine.stop()
Modified: trunk/popcorn/src/generic.py
==============================================================================
--- trunk/popcorn/src/generic.py (original)
+++ trunk/popcorn/src/generic.py Thu Nov 30 18:17:39 2006
@@ -156,13 +156,6 @@
# TODO: What happens if the user tries to open a new file
# while we are trying to find a good player for the old
# mrl?
- # FIXME: if user calls open() and stop(), we ends up here but
- # this isn't a failed player or broken state.
- # FIXME: if user calls stop() on a playing video, then open(),
- # then play(), we could end up here, because stop() does not affect
- # state in xine backend until child acknowledges, but open()
- # sets state to STATE_OPENING immediately. So we go from
- # STATE_OPENING to STATE_IDLE.
self._failed_player.append(self.get_player_id())
# FIXME: why is this here? If we delete our pending functions
# a 'play' after open may get missed. So let's see what happens
@@ -189,7 +182,7 @@
self.signals["start"].emit()
self.signals["play"].emit()
- if old_state in (STATE_PLAYING, STATE_PAUSED) and \
+ if old_state in (STATE_PLAYING, STATE_PAUSED, STATE_STOPPING) and \
state in (STATE_IDLE, STATE_NOT_RUNNING, STATE_SHUTDOWN):
# From playing to finished. Signal end.
self.signals["end"].emit()
Modified: trunk/popcorn/src/ptypes.py
==============================================================================
--- trunk/popcorn/src/ptypes.py (original)
+++ trunk/popcorn/src/ptypes.py Thu Nov 30 18:17:39 2006
@@ -44,6 +44,7 @@
STATE_OPEN = 'STATE_OPEN'
STATE_PLAYING = 'STATE_PLAYING'
STATE_PAUSED = 'STATE_PAUSED'
+STATE_STOPPING = 'STATE_STOPPING'
STATE_SHUTDOWN = 'STATE_SHUTDOWN'
SEEK_RELATIVE = 'SEEK_RELATIVE'
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog