-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 6f3842f..ddb4d74 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -356,48 +356,49 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { | |||
356 | } | 356 | } |
357 | mouseMoveEvent( event ); | 357 | mouseMoveEvent( event ); |
358 | } | 358 | } |
359 | 359 | ||
360 | void VideoWidget::showEvent( QShowEvent* ) { | 360 | void VideoWidget::showEvent( QShowEvent* ) { |
361 | QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 ); | 361 | QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 ); |
362 | mouseMoveEvent( &event ); | 362 | mouseMoveEvent( &event ); |
363 | } | 363 | } |
364 | 364 | ||
365 | 365 | ||
366 | void VideoWidget::backToNormal() { | 366 | void VideoWidget::backToNormal() { |
367 | mediaPlayerState->setFullscreen( FALSE ); | 367 | mediaPlayerState->setFullscreen( FALSE ); |
368 | makeVisible(); | 368 | makeVisible(); |
369 | } | 369 | } |
370 | 370 | ||
371 | void VideoWidget::makeVisible() { | 371 | void VideoWidget::makeVisible() { |
372 | if ( mediaPlayerState->fullscreen() ) { | 372 | if ( mediaPlayerState->fullscreen() ) { |
373 | setBackgroundMode( QWidget::NoBackground ); | 373 | setBackgroundMode( QWidget::NoBackground ); |
374 | showFullScreen(); | 374 | showFullScreen(); |
375 | resize( qApp->desktop()->size() ); | 375 | resize( qApp->desktop()->size() ); |
376 | slider->hide(); | 376 | slider->hide(); |
377 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); | 377 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); |
378 | 378 | ||
379 | } else { | 379 | } else { |
380 | showNormal(); | ||
380 | showMaximized(); | 381 | showMaximized(); |
381 | setBackgroundPixmap( *pixBg ); | 382 | setBackgroundPixmap( *pixBg ); |
382 | if ( mediaPlayerState->streaming() ) { | 383 | if ( mediaPlayerState->streaming() ) { |
383 | slider->hide(); | 384 | slider->hide(); |
384 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 385 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
385 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 386 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
386 | } else { | 387 | } else { |
387 | slider->show(); | 388 | slider->show(); |
388 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 389 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
389 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 390 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
390 | } | 391 | } |
391 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); | 392 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); |
392 | qApp->processEvents(); | 393 | qApp->processEvents(); |
393 | } | 394 | } |
394 | } | 395 | } |
395 | 396 | ||
396 | 397 | ||
397 | void VideoWidget::paintEvent( QPaintEvent * pe) { | 398 | void VideoWidget::paintEvent( QPaintEvent * pe) { |
398 | QPainter p( this ); | 399 | QPainter p( this ); |
399 | 400 | ||
400 | if ( mediaPlayerState->fullscreen() ) { | 401 | if ( mediaPlayerState->fullscreen() ) { |
401 | // Clear the background | 402 | // Clear the background |
402 | p.setBrush( QBrush( Qt::black ) ); | 403 | p.setBrush( QBrush( Qt::black ) ); |
403 | } else { | 404 | } else { |
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 8fd2743..c03ea16 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -50,48 +50,49 @@ 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 | qDebug("<<FILENAME: " + fileName + ">>>>"); | ||
74 | libXine->play( fileName ); | 75 | libXine->play( fileName ); |
75 | mediaPlayerState->setPlaying( true ); | 76 | mediaPlayerState->setPlaying( true ); |
76 | // default to audio view until we know how to handle video | 77 | // default to audio view until we know how to handle video |
77 | // MediaDetect mdetect; | 78 | // MediaDetect mdetect; |
78 | char whichGui = mdetect.videoOrAudio( fileName ); | 79 | char whichGui = mdetect.videoOrAudio( fileName ); |
79 | if (whichGui == 'f') { | 80 | if (whichGui == 'f') { |
80 | qDebug("Nicht erkannter Dateityp"); | 81 | qDebug("Nicht erkannter Dateityp"); |
81 | return; | 82 | return; |
82 | } | 83 | } |
83 | 84 | ||
84 | if (whichGui == 'a') { | 85 | if (whichGui == 'a') { |
85 | libXine->setShowVideo( false ); | 86 | libXine->setShowVideo( false ); |
86 | hasAudioChannel=TRUE; | 87 | hasAudioChannel=TRUE; |
87 | } else { | 88 | } else { |
88 | libXine->setShowVideo( true ); | 89 | libXine->setShowVideo( true ); |
89 | hasVideoChannel=TRUE; | 90 | hasVideoChannel=TRUE; |
90 | } | 91 | } |
91 | 92 | ||
92 | // determine if slider is shown | 93 | // determine if slider is shown |
93 | // mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); | 94 | // mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); |
94 | mediaPlayerState->setIsStreaming( !libXine->isSeekable() ); | 95 | mediaPlayerState->setIsStreaming( !libXine->isSeekable() ); |
95 | // which gui (video / audio) | 96 | // which gui (video / audio) |
96 | mediaPlayerState->setView( whichGui ); | 97 | mediaPlayerState->setView( whichGui ); |
97 | 98 | ||