summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/xinecontrol.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 7407e4e..497636a 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -1,7 +1,7 @@
-
+#include <qtimer.h>
#include "xinecontrol.h"
#include "mediaplayerstate.h"
extern MediaPlayerState *mediaPlayerState;
@@ -9,13 +9,13 @@ 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;
}
@@ -27,17 +27,18 @@ void XineControl::play( const QString& fileName ) {
char whichGui = mdetect.videoOrAudio( fileName );
if (whichGui == 'f') {
qDebug("Nicht erkannter Dateityp");
return;
}
+ // determine if slider is shown
+ mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) );
+
// 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->setList();
@@ -64,7 +65,12 @@ void XineControl::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);
}