-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 2 |
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 ) { disabledSuspendScreenSaver = TRUE; // Stop the screen from blanking and power saving state QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << ( whichGui == 'v' ? QPEApplication::Disable : QPEApplication::DisableSuspend ); } #endif length(); position(); } void XineControl::nextMedia() { mediaPlayerState->setNext(); } void XineControl::setGamma( int value ) { libXine->setGamma( value ); } void XineControl::stop( bool isSet ) { if ( !isSet ) { libXine->stop(); #if defined(Q_WS_QWS) && !defined(QT_NO_COP) if ( disabledSuspendScreenSaver ) { disabledSuspendScreenSaver = FALSE; // Re-enable the suspend mode QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; } #endif } } /** * Pause playback * @isSet */ void XineControl::pause( bool isSet) { if ( isSet ) { libXine->pause(); } else { libXine->play( m_fileName, 0, m_currentTime ); } } /** * get current time in playback */ long XineControl::currentTime() { // todo: jede sekunde überprüfen m_currentTime = libXine->currentTime(); return m_currentTime; QTimer::singleShot( 1000, this, SLOT( currentTime() ) ); } /** * Set the length of the media file */ void XineControl::length() { m_length = libXine->length(); mediaPlayerState->setLength( m_length ); } /** * Reports the position the xine backend is at right now * @return long the postion in seconds */ long XineControl::position() { m_position = ( currentTime() ); mediaPlayerState->updatePosition( m_position ); long emitPos = (long)m_position; emit positionChanged( emitPos ); if( mediaPlayerState->isPlaying ) { // needs to be stopped the media is stopped QTimer::singleShot( 1000, this, SLOT( position() ) ); } // qDebug("POSITION : %d", m_position); return m_position; } /** * Set videoplayback to fullscreen * @param isSet */ void XineControl::setFullscreen( bool isSet ) { libXine->showVideoFullScreen( isSet ); } QString XineControl::getMetaInfo() { QString returnString; if ( !libXine->metaInfo( 0 ).isEmpty() ) { - returnString += tr( " Titel: " + libXine->metaInfo( 0 ) ); + returnString += tr( " Title: " + libXine->metaInfo( 0 ) ); } if ( !libXine->metaInfo( 1 ).isEmpty() ) { returnString += tr( " Comment: " + libXine->metaInfo( 1 ) ); } if ( !libXine->metaInfo( 2 ).isEmpty() ) { returnString += tr( " Artist: " + libXine->metaInfo( 2 ) ); } if ( !libXine->metaInfo( 3 ).isEmpty() ) { returnString += tr( " Genre: " + libXine->metaInfo( 3 ) ); } if ( !libXine->metaInfo( 4 ).isEmpty() ) { returnString += tr( " Album: " + libXine->metaInfo( 4 ) ); } if ( !libXine->metaInfo( 5 ).isEmpty() ) { returnString += tr( " Year: " + libXine->metaInfo( 5 ) ); } return returnString; } QString XineControl::getErrorCode() { int errorCode = libXine->error(); if ( errorCode == 1 ) { return tr( "No input plugin found for this media type" ); } else { return tr( "Some other error" ); } } /** * Seek to a position in the track * @param second the second to jump to */ void XineControl::seekTo( long second ) { libXine->seekTo( (int)second ); } void XineControl::videoResized ( const QSize &s ) { libXine->resize( s ); } |