author | harlekin <harlekin> | 2002-08-05 23:58:16 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-05 23:58:16 (UTC) |
commit | d96244956f42782f987acc2b5efb32dc1f1dd70a (patch) (unidiff) | |
tree | 0e1652d36a7ee2b38568fb5686057864b03bf85a | |
parent | 6577ed5401ef1374b57a58dd459e91c10899e097 (diff) | |
download | opie-d96244956f42782f987acc2b5efb32dc1f1dd70a.zip opie-d96244956f42782f987acc2b5efb32dc1f1dd70a.tar.gz opie-d96244956f42782f987acc2b5efb32dc1f1dd70a.tar.bz2 |
pause should be right now
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index cf7dcb2..eba837e 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -68,65 +68,69 @@ void XineControl::play( const QString& fileName ) { | |||
68 | } | 68 | } |
69 | 69 | ||
70 | if (whichGui == 'a') { | 70 | if (whichGui == 'a') { |
71 | libXine->setShowVideo( false ); | 71 | libXine->setShowVideo( false ); |
72 | } else { | 72 | } else { |
73 | libXine->setShowVideo( true ); | 73 | libXine->setShowVideo( true ); |
74 | } | 74 | } |
75 | 75 | ||
76 | // determine if slider is shown | 76 | // determine if slider is shown |
77 | // mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); | 77 | // mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); |
78 | mediaPlayerState->setIsStreaming( libXine->isSeekable() ); | 78 | mediaPlayerState->setIsStreaming( libXine->isSeekable() ); |
79 | // which gui (video / audio) | 79 | // which gui (video / audio) |
80 | mediaPlayerState->setView( whichGui ); | 80 | mediaPlayerState->setView( whichGui ); |
81 | length(); | 81 | length(); |
82 | position(); | 82 | position(); |
83 | } | 83 | } |
84 | 84 | ||
85 | void XineControl::stop( bool isSet ) { | 85 | void XineControl::stop( bool isSet ) { |
86 | if ( !isSet) { | 86 | if ( !isSet) { |
87 | libXine->stop(); | 87 | libXine->stop(); |
88 | mediaPlayerState->setList(); | 88 | mediaPlayerState->setList(); |
89 | //mediaPlayerState->setPlaying( false ); | 89 | //mediaPlayerState->setPlaying( false ); |
90 | } else { | 90 | } else { |
91 | // play again | 91 | // play again |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * Pause playback | 96 | * Pause playback |
97 | * @isSet | 97 | * @isSet |
98 | */ | 98 | */ |
99 | void XineControl::pause( bool isSet) { | 99 | void XineControl::pause( bool isSet) { |
100 | libXine->pause(); | 100 | if (isSet) { |
101 | libXine->pause(); | ||
102 | } else { | ||
103 | libXine->play( m_fileName, 0, m_currentTime); | ||
104 | } | ||
101 | } | 105 | } |
102 | 106 | ||
103 | 107 | ||
104 | /** | 108 | /** |
105 | * get current time in playback | 109 | * get current time in playback |
106 | */ | 110 | */ |
107 | long XineControl::currentTime() { | 111 | long XineControl::currentTime() { |
108 | // todo: jede sekunde überprüfen | 112 | // todo: jede sekunde überprüfen |
109 | m_currentTime = libXine->currentTime(); | 113 | m_currentTime = libXine->currentTime(); |
110 | return m_currentTime; | 114 | return m_currentTime; |
111 | QTimer::singleShot( 1000, this, SLOT( currentTime() ) ); | 115 | QTimer::singleShot( 1000, this, SLOT( currentTime() ) ); |
112 | } | 116 | } |
113 | 117 | ||
114 | /** | 118 | /** |
115 | * Set the length of the media file | 119 | * Set the length of the media file |
116 | */ | 120 | */ |
117 | void XineControl::length() { | 121 | void XineControl::length() { |
118 | m_length = libXine->length(); | 122 | m_length = libXine->length(); |
119 | mediaPlayerState->setLength( m_length ); | 123 | mediaPlayerState->setLength( m_length ); |
120 | } | 124 | } |
121 | 125 | ||
122 | 126 | ||
123 | /** | 127 | /** |
124 | * Reports the position the xine backend is at right now | 128 | * Reports the position the xine backend is at right now |
125 | * @return long the postion in seconds | 129 | * @return long the postion in seconds |
126 | */ | 130 | */ |
127 | long XineControl::position() { | 131 | long XineControl::position() { |
128 | m_position = ( currentTime() ); | 132 | m_position = ( currentTime() ); |
129 | mediaPlayerState->updatePosition( m_position ); | 133 | mediaPlayerState->updatePosition( m_position ); |
130 | long emitPos = (long)m_position; | 134 | long emitPos = (long)m_position; |
131 | emit positionChanged( emitPos ); | 135 | emit positionChanged( emitPos ); |
132 | if(mediaPlayerState->isPlaying) | 136 | if(mediaPlayerState->isPlaying) |