1 diff -ru avmedia.orig/source/gstreamer/gstplayer.cxx avmedia/source/gstreamer/gstplayer.cxx
2 --- avmedia.orig/source/gstreamer/gstplayer.cxx 2009-04-28 09:15:14.000000000 +0100
3 +++ avmedia/source/gstreamer/gstplayer.cxx 2009-04-28 09:11:50.000000000 +0100
6 mbFakeVideo (sal_False ),
8 + mbPlayPending ( false ),
11 mbInitialized( false ),
14 //DBG( "EOS, reset state to NULL" );
15 gst_element_set_state( mpPlaybin, GST_STATE_READY );
16 + mbPlayPending = false;
20 case GST_MESSAGE_STATE_CHANGED:
21 if( message->src == GST_OBJECT( mpPlaybin ) ) {
23 pendingstate == GST_STATE_VOID_PENDING &&
25 gst_x_overlay_expose( mpXOverlay );
28 + mbPlayPending = ((newstate == GST_STATE_READY) || (newstate == GST_STATE_PAUSED));
34 if( mpPlaybin != NULL ) {
35 gst_element_set_state( mpPlaybin, GST_STATE_NULL );
36 + mbPlayPending = false;
37 g_object_unref( mpPlaybin );
41 preparePlaybin( rURL, true );
43 gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
44 + mbPlayPending = false;
49 if( mbInitialized && NULL != mpPlaybin )
51 gst_element_set_state( mpPlaybin, GST_STATE_PLAYING );
52 + mbPlayPending = true;
58 gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
60 + mbPlayPending = false;
61 DBG( "stop %p", mpPlaybin );
65 sal_Bool SAL_CALL Player::isPlaying()
66 throw (uno::RuntimeException)
69 + bool bRet = mbPlayPending;
71 // return whether the pipeline is in PLAYING STATE or not
72 - if( mbInitialized && mpPlaybin )
73 + if( !mbPlayPending && mbInitialized && mpPlaybin )
75 bRet = GST_STATE_PLAYING == GST_STATE( mpPlaybin );
77 diff -ru avmedia.orig/source/gstreamer/gstplayer.hxx avmedia/source/gstreamer/gstplayer.hxx
78 --- avmedia.orig/source/gstreamer/gstplayer.hxx 2009-04-28 09:15:14.000000000 +0100
79 +++ avmedia/source/gstreamer/gstplayer.hxx 2009-04-28 09:11:01.000000000 +0100
83 gdouble mnUnmutedVolume;
84 + sal_Bool mbPlayPending;
87 sal_Bool mbInitialized;