author | harlekin <harlekin> | 2002-07-09 14:12:19 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-09 14:12:19 (UTC) |
commit | 2d3147a590a150773b84ce6e0aa65f7515a1f178 (patch) (side-by-side diff) | |
tree | 944a6ad190bfe2d36d395918c70cffa998a1c5cb | |
parent | f9e07dc2c8e489c48debb31a6ae5afd46b77faee (diff) | |
download | opie-2d3147a590a150773b84ce6e0aa65f7515a1f178.zip opie-2d3147a590a150773b84ce6e0aa65f7515a1f178.tar.gz opie-2d3147a590a150773b84ce6e0aa65f7515a1f178.tar.bz2 |
isSeekable to determine if slider or not
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 497636a..7d3b1f7 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -1,76 +1,76 @@ #include <qtimer.h> #include "xinecontrol.h" #include "mediaplayerstate.h" extern MediaPlayerState *mediaPlayerState; XineControl::XineControl( QObject *parent, const char *name ) : QObject( parent, name ) { libXine = new XINE::Lib(); connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) ); connect( this, SIGNAL( positionChanged( int position ) ), mediaPlayerState, SLOT( updatePosition( long p ) ) ); connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); } XineControl::~XineControl() { delete libXine; } void XineControl::play( const QString& fileName ) { libXine->play( fileName ); mediaPlayerState->setPlaying( true ); // default to audio view until we know how to handle video // MediaDetect mdetect; char whichGui = mdetect.videoOrAudio( fileName ); if (whichGui == 'f') { qDebug("Nicht erkannter Dateityp"); return; } // determine if slider is shown - mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); - + // mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); + mediaPlayerState->setIsStreaming( libXine->isSeekable() ); // which gui (video / audio) mediaPlayerState->setView( whichGui ); } void XineControl::stop( bool isSet ) { if ( !isSet) { libXine->stop(); mediaPlayerState->setList(); //mediaPlayerState->setPlaying( false ); } else { // play again } } void XineControl::pause( bool isSet) { libXine->pause(); } int XineControl::currentTime() { // todo: jede sekunde überprüfen m_currentTime = libXine->currentTime(); return m_currentTime; } void XineControl::length() { m_length = libXine->length(); mediaPlayerState->setLength( m_length ); } int XineControl::position() { m_position = (m_currentTime/m_length*100); mediaPlayerState->setPosition( m_position ); return m_position; emit positionChanged( m_position ); QTimer::singleShot( 1000, this, SLOT( position ) ); } void XineControl::setFullscreen( bool isSet ) { libXine-> showVideoFullScreen( isSet); } |