summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/xinecontrol.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp20
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 @@
1 1
2#include "xinecontrol.h" 2#include "xinecontrol.h"
3#include "mediaplayerstate.h" 3#include "mediaplayerstate.h"
4 4
5
5extern MediaPlayerState *mediaPlayerState; 6extern MediaPlayerState *mediaPlayerState;
6 7
7XineControl::XineControl( QObject *parent, const char *name ) 8XineControl::XineControl( QObject *parent, const char *name )
8 : QObject( parent, name ) { 9 : QObject( parent, name ) {
9 libXine = new XINE::Lib(); 10 libXine = new XINE::Lib();
10 11
@@ -19,30 +20,37 @@ XineControl::~XineControl() {
19} 20}
20 21
21void XineControl::play( const QString& fileName ) { 22void 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
31void XineControl::stop( bool isSet ) { 40void 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
38 } 47 }
39} 48}
40 49
41void XineControl::pause( bool isSet) { 50void XineControl::pause( bool isSet) {
42
43 libXine->pause(); 51 libXine->pause();
44} 52}
45 53
46int XineControl::currentTime() { 54int XineControl::currentTime() {
47 // todo: jede sekunde überprüfen 55 // todo: jede sekunde überprüfen
48 m_currentTime = libXine->currentTime(); 56 m_currentTime = libXine->currentTime();