Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore 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 | |||
@@ -2,6 +2,7 @@ | |||
2 | #include "xinecontrol.h" | 2 | #include "xinecontrol.h" |
3 | #include "mediaplayerstate.h" | 3 | #include "mediaplayerstate.h" |
4 | 4 | ||
5 | |||
5 | extern MediaPlayerState *mediaPlayerState; | 6 | extern MediaPlayerState *mediaPlayerState; |
6 | 7 | ||
7 | XineControl::XineControl( QObject *parent, const char *name ) | 8 | XineControl::XineControl( QObject *parent, const char *name ) |
@@ -22,16 +23,24 @@ void XineControl::play( const QString& fileName ) { | |||
22 | libXine->play( fileName ); | 23 | libXine->play( fileName ); |
23 | mediaPlayerState->setPlaying( true ); | 24 | mediaPlayerState->setPlaying( true ); |
24 | // default to audio view until we know how to handle video | 25 | // default to audio view until we know how to handle video |
25 | mediaPlayerState->setView('a'); | 26 | // MediaDetect mdetect; |
26 | // determines of slider is shown | 27 | char whichGui = mdetect.videoOrAudio( fileName ); |
27 | // mediaPlayerState->setIsStreaming( false ); | 28 | if (whichGui == 'f') { |
28 | // hier dann schaun welcher view | 29 | qDebug("Nicht erkannter Dateityp"); |
30 | return; | ||
31 | } | ||
32 | |||
33 | // which gui (video / audio) | ||
34 | mediaPlayerState->setView( whichGui ); | ||
35 | |||
36 | // determine if slider is shown | ||
37 | mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); | ||
29 | } | 38 | } |
30 | 39 | ||
31 | void XineControl::stop( bool isSet ) { | 40 | void XineControl::stop( bool isSet ) { |
32 | if ( !isSet) { | 41 | if ( !isSet) { |
33 | libXine->stop(); | 42 | libXine->stop(); |
34 | mediaPlayerState->setNext(); | 43 | mediaPlayerState->setList(); |
35 | //mediaPlayerState->setPlaying( false ); | 44 | //mediaPlayerState->setPlaying( false ); |
36 | } else { | 45 | } else { |
37 | // play again | 46 | // play again |
@@ -39,7 +48,6 @@ void XineControl::stop( bool isSet ) { | |||
39 | } | 48 | } |
40 | 49 | ||
41 | void XineControl::pause( bool isSet) { | 50 | void XineControl::pause( bool isSet) { |
42 | |||
43 | libXine->pause(); | 51 | libXine->pause(); |
44 | } | 52 | } |
45 | 53 | ||