author | harlekin <harlekin> | 2002-07-09 12:33:52 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-09 12:33:52 (UTC) |
commit | 2fa8959b269c51bb40d1f03bbd7c55fdaa9da0dd (patch) (side-by-side diff) | |
tree | 8ce99f4cde91c9346a4cd6f7029ec1d1308cfb30 /noncore/multimedia/opieplayer2/xinecontrol.cpp | |
parent | c0d304c69f6c42328472cd1328d9cad7c2ed4dfb (diff) | |
download | opie-2fa8959b269c51bb40d1f03bbd7c55fdaa9da0dd.zip opie-2fa8959b269c51bb40d1f03bbd7c55fdaa9da0dd.tar.gz opie-2fa8959b269c51bb40d1f03bbd7c55fdaa9da0dd.tar.bz2 |
more gui work
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 5b674f8..7407e4e 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -1,10 +1,11 @@ #include "xinecontrol.h" #include "mediaplayerstate.h" + extern MediaPlayerState *mediaPlayerState; XineControl::XineControl( QObject *parent, const char *name ) : QObject( parent, name ) { libXine = new XINE::Lib(); @@ -19,30 +20,37 @@ XineControl::~XineControl() { } void XineControl::play( const QString& fileName ) { libXine->play( fileName ); mediaPlayerState->setPlaying( true ); // default to audio view until we know how to handle video - mediaPlayerState->setView('a'); - // determines of slider is shown - // mediaPlayerState->setIsStreaming( false ); - // hier dann schaun welcher view + // MediaDetect mdetect; + char whichGui = mdetect.videoOrAudio( fileName ); + if (whichGui == 'f') { + qDebug("Nicht erkannter Dateityp"); + return; + } + + // which gui (video / audio) + mediaPlayerState->setView( whichGui ); + + // determine if slider is shown + mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); } void XineControl::stop( bool isSet ) { if ( !isSet) { libXine->stop(); - mediaPlayerState->setNext(); + 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(); |