Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 766ece2..12d80ba 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -50,49 +50,51 @@ XineControl::XineControl( QObject *parent, const char *name ) | |||
50 | connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( updatePosition( long ) ) ); | 50 | connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( updatePosition( long ) ) ); |
51 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); | 51 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); |
52 | connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); | 52 | connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); |
53 | connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); | 53 | connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); |
54 | connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); | 54 | connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); |
55 | 55 | ||
56 | disabledSuspendScreenSaver = FALSE; | 56 | disabledSuspendScreenSaver = FALSE; |
57 | } | 57 | } |
58 | 58 | ||
59 | XineControl::~XineControl() { | 59 | XineControl::~XineControl() { |
60 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 60 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
61 | if ( disabledSuspendScreenSaver ) { | 61 | if ( disabledSuspendScreenSaver ) { |
62 | disabledSuspendScreenSaver = FALSE; | 62 | disabledSuspendScreenSaver = FALSE; |
63 | // Re-enable the suspend mode | 63 | // Re-enable the suspend mode |
64 | QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; | 64 | QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; |
65 | } | 65 | } |
66 | #endif | 66 | #endif |
67 | delete libXine; | 67 | delete libXine; |
68 | } | 68 | } |
69 | 69 | ||
70 | void XineControl::play( const QString& fileName ) { | 70 | void XineControl::play( const QString& fileName ) { |
71 | hasVideoChannel=FALSE; | 71 | hasVideoChannel=FALSE; |
72 | hasAudioChannel=FALSE; | 72 | hasAudioChannel=FALSE; |
73 | m_fileName = fileName; | 73 | m_fileName = fileName; |
74 | |||
74 | qDebug("<<FILENAME: " + fileName + ">>>>"); | 75 | qDebug("<<FILENAME: " + fileName + ">>>>"); |
76 | |||
75 | libXine->play( fileName ); | 77 | libXine->play( fileName ); |
76 | mediaPlayerState->setPlaying( true ); | 78 | mediaPlayerState->setPlaying( true ); |
77 | // default to audio view until we know how to handle video | 79 | // default to audio view until we know how to handle video |
78 | // MediaDetect mdetect; | 80 | // MediaDetect mdetect; |
79 | char whichGui = mdetect.videoOrAudio( fileName ); | 81 | char whichGui = mdetect.videoOrAudio( fileName ); |
80 | if (whichGui == 'f') { | 82 | if (whichGui == 'f') { |
81 | qDebug("Nicht erkannter Dateityp"); | 83 | qDebug("Nicht erkannter Dateityp"); |
82 | return; | 84 | return; |
83 | } | 85 | } |
84 | 86 | ||
85 | if (whichGui == 'a') { | 87 | if (whichGui == 'a') { |
86 | libXine->setShowVideo( false ); | 88 | libXine->setShowVideo( false ); |
87 | hasAudioChannel=TRUE; | 89 | hasAudioChannel=TRUE; |
88 | } else { | 90 | } else { |
89 | libXine->setShowVideo( true ); | 91 | libXine->setShowVideo( true ); |
90 | hasVideoChannel=TRUE; | 92 | hasVideoChannel=TRUE; |
91 | } | 93 | } |
92 | 94 | ||
93 | // determine if slider is shown | 95 | // determine if slider is shown |
94 | mediaPlayerState->setIsStreaming( !libXine->isSeekable() ); | 96 | mediaPlayerState->setIsStreaming( !libXine->isSeekable() ); |
95 | // which gui (video / audio) | 97 | // which gui (video / audio) |
96 | mediaPlayerState->setView( whichGui ); | 98 | mediaPlayerState->setView( whichGui ); |
97 | 99 | ||
98 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 100 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |