summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index c22822c..81693e1 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -106,142 +106,142 @@ void XineControl::play( const QString& fileName ) {
106 disabledSuspendScreenSaver = TRUE; 106 disabledSuspendScreenSaver = TRUE;
107 // Stop the screen from blanking and power saving state 107 // Stop the screen from blanking and power saving state
108 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) 108 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" )
109 << ( whichGui == 'v' ? QPEApplication::Disable : QPEApplication::DisableSuspend ); 109 << ( whichGui == 'v' ? QPEApplication::Disable : QPEApplication::DisableSuspend );
110 } 110 }
111#endif 111#endif
112 112
113 length(); 113 length();
114 position(); 114 position();
115} 115}
116 116
117void XineControl::nextMedia() { 117void XineControl::nextMedia() {
118 mediaPlayerState->setNext(); 118 mediaPlayerState->setNext();
119} 119}
120 120
121void XineControl::setGamma( int value ) { 121void XineControl::setGamma( int value ) {
122 libXine->setGamma( value ); 122 libXine->setGamma( value );
123} 123}
124 124
125void XineControl::stop( bool isSet ) { 125void XineControl::stop( bool isSet ) {
126 if ( !isSet ) { 126 if ( !isSet ) {
127 libXine->stop(); 127 libXine->stop();
128 128
129#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 129#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
130 if ( disabledSuspendScreenSaver ) { 130 if ( disabledSuspendScreenSaver ) {
131 disabledSuspendScreenSaver = FALSE; 131 disabledSuspendScreenSaver = FALSE;
132 // Re-enable the suspend mode 132 // Re-enable the suspend mode
133 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; 133 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
134 } 134 }
135#endif 135#endif
136 } 136 }
137} 137}
138 138
139/** 139/**
140 * Pause playback 140 * Pause playback
141 * @isSet 141 * @isSet
142 */ 142 */
143void XineControl::pause( bool isSet) { 143void XineControl::pause( bool isSet) {
144 if ( isSet ) { 144 if ( isSet ) {
145 libXine->pause(); 145 libXine->pause();
146 } else { 146 } else {
147 libXine->play( m_fileName, 0, m_currentTime ); 147 libXine->play( m_fileName, 0, m_currentTime );
148 } 148 }
149} 149}
150 150
151 151
152/** 152/**
153 * get current time in playback 153 * get current time in playback
154 */ 154 */
155long XineControl::currentTime() { 155long XineControl::currentTime() {
156 // todo: jede sekunde überprüfen 156 // todo: jede sekunde überprüfen
157 m_currentTime = libXine->currentTime(); 157 m_currentTime = libXine->currentTime();
158 return m_currentTime; 158 return m_currentTime;
159 QTimer::singleShot( 1000, this, SLOT( currentTime() ) ); 159 QTimer::singleShot( 1000, this, SLOT( currentTime() ) );
160} 160}
161 161
162/** 162/**
163 * Set the length of the media file 163 * Set the length of the media file
164 */ 164 */
165void XineControl::length() { 165void XineControl::length() {
166 m_length = libXine->length(); 166 m_length = libXine->length();
167 mediaPlayerState->setLength( m_length ); 167 mediaPlayerState->setLength( m_length );
168} 168}
169 169
170 170
171/** 171/**
172 * Reports the position the xine backend is at right now 172 * Reports the position the xine backend is at right now
173 * @return long the postion in seconds 173 * @return long the postion in seconds
174 */ 174 */
175long XineControl::position() { 175long XineControl::position() {
176 m_position = ( currentTime() ); 176 m_position = ( currentTime() );
177 mediaPlayerState->updatePosition( m_position ); 177 mediaPlayerState->updatePosition( m_position );
178 long emitPos = (long)m_position; 178 long emitPos = (long)m_position;
179 emit positionChanged( emitPos ); 179 emit positionChanged( emitPos );
180 if( mediaPlayerState->isPlaying ) { 180 if( mediaPlayerState->isPlaying ) {
181 // needs to be stopped the media is stopped 181 // needs to be stopped the media is stopped
182 QTimer::singleShot( 1000, this, SLOT( position() ) ); 182 QTimer::singleShot( 1000, this, SLOT( position() ) );
183 } 183 }
184 // qDebug("POSITION : %d", m_position); 184 // qDebug("POSITION : %d", m_position);
185 return m_position; 185 return m_position;
186} 186}
187 187
188/** 188/**
189 * Set videoplayback to fullscreen 189 * Set videoplayback to fullscreen
190 * @param isSet 190 * @param isSet
191 */ 191 */
192void XineControl::setFullscreen( bool isSet ) { 192void XineControl::setFullscreen( bool isSet ) {
193 libXine->showVideoFullScreen( isSet ); 193 libXine->showVideoFullScreen( isSet );
194} 194}
195 195
196 196
197QString XineControl::getMetaInfo() { 197QString XineControl::getMetaInfo() {
198 198
199 QString returnString; 199 QString returnString;
200 200
201 if ( !libXine->metaInfo( 0 ).isEmpty() ) { 201 if ( !libXine->metaInfo( 0 ).isEmpty() ) {
202 returnString += tr( " Titel: " + libXine->metaInfo( 0 ) ); 202 returnString += tr( " Title: " + libXine->metaInfo( 0 ) );
203 } 203 }
204 204
205 if ( !libXine->metaInfo( 1 ).isEmpty() ) { 205 if ( !libXine->metaInfo( 1 ).isEmpty() ) {
206 returnString += tr( " Comment: " + libXine->metaInfo( 1 ) ); 206 returnString += tr( " Comment: " + libXine->metaInfo( 1 ) );
207 } 207 }
208 208
209 if ( !libXine->metaInfo( 2 ).isEmpty() ) { 209 if ( !libXine->metaInfo( 2 ).isEmpty() ) {
210 returnString += tr( " Artist: " + libXine->metaInfo( 2 ) ); 210 returnString += tr( " Artist: " + libXine->metaInfo( 2 ) );
211 } 211 }
212 212
213 if ( !libXine->metaInfo( 3 ).isEmpty() ) { 213 if ( !libXine->metaInfo( 3 ).isEmpty() ) {
214 returnString += tr( " Genre: " + libXine->metaInfo( 3 ) ); 214 returnString += tr( " Genre: " + libXine->metaInfo( 3 ) );
215 } 215 }
216 216
217 if ( !libXine->metaInfo( 4 ).isEmpty() ) { 217 if ( !libXine->metaInfo( 4 ).isEmpty() ) {
218 returnString += tr( " Album: " + libXine->metaInfo( 4 ) ); 218 returnString += tr( " Album: " + libXine->metaInfo( 4 ) );
219 } 219 }
220 220
221 if ( !libXine->metaInfo( 5 ).isEmpty() ) { 221 if ( !libXine->metaInfo( 5 ).isEmpty() ) {
222 returnString += tr( " Year: " + libXine->metaInfo( 5 ) ); 222 returnString += tr( " Year: " + libXine->metaInfo( 5 ) );
223 } 223 }
224 return returnString; 224 return returnString;
225} 225}
226 226
227QString XineControl::getErrorCode() { 227QString XineControl::getErrorCode() {
228 int errorCode = libXine->error(); 228 int errorCode = libXine->error();
229 229
230 if ( errorCode == 1 ) { 230 if ( errorCode == 1 ) {
231 return tr( "No input plugin found for this media type" ); 231 return tr( "No input plugin found for this media type" );
232 } else { 232 } else {
233 return tr( "Some other error" ); 233 return tr( "Some other error" );
234 } 234 }
235} 235}
236 236
237/** 237/**
238 * Seek to a position in the track 238 * Seek to a position in the track
239 * @param second the second to jump to 239 * @param second the second to jump to
240 */ 240 */
241void XineControl::seekTo( long second ) { 241void XineControl::seekTo( long second ) {
242 libXine->seekTo( (int)second ); 242 libXine->seekTo( (int)second );
243} 243}
244 244
245void XineControl::videoResized ( const QSize &s ) { 245void XineControl::videoResized ( const QSize &s ) {
246 libXine->resize( s ); 246 libXine->resize( s );
247} 247}