summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp33
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp16
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h4
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp7
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp7
8 files changed, 46 insertions, 26 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index a6fd334..00d516c 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -190,12 +190,12 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
resizeEvent( NULL );
- connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
- connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
+ connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
+ connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) );
- // connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) );
connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
+ connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) );
connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) );
@@ -204,6 +204,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) );
-
-
// Intialise state
setLength( mediaPlayerState->length() );
@@ -309,7 +307,18 @@ void AudioWidget::setLength( long max ) {
void AudioWidget::setView( char view ) {
- // this isnt working for some reason
+if ( view == 'a' ) {
+ // startTimer( 150 );
+ showMaximized();
+ } else {
+ killTimers();
+ hide();
+ }
+ // qApp->processEvents();
+}
+
+
+void AudioWidget::setSeekable( bool isSeekable ) {
- if ( mediaPlayerState->streaming() ) {
+ if ( isSeekable ) {
qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>");
if( !slider.isHidden()) {
@@ -322,16 +331,8 @@ void AudioWidget::setView( char view ) {
// does not stop stream when it reaches the end
slider.show();
+ qDebug( " CONNECT SET POSTION " );
connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
}
-
- if ( view == 'a' ) {
- // startTimer( 150 );
- showMaximized();
- } else {
- killTimers();
- hide();
- }
- // qApp->processEvents();
}
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index c544882..09dc19b 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -95,4 +95,5 @@ public slots:
void setPosition( long );
void setLength( long );
+ void setSeekable( bool );
void setView( char );
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index f0a01a1..8b0f501 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -302,5 +302,5 @@ void MediaPlayer::blank( bool b ) {
#ifdef QT_QWS_EBX
fl= open( "/dev/fl", O_RDWR );
-#endif
+#endif
if (fd != -1) {
if ( b ) {
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index 4ec5989..0b33dfd 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -53,4 +53,5 @@ MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
readConfig( cfg );
isStreaming = false;
+ isSeekable = true;
}
@@ -96,4 +97,8 @@ bool MediaPlayerState::streaming() {
}
+bool MediaPlayerState::seekable() {
+ return isSeekable;
+}
+
bool MediaPlayerState::fullscreen() {
return isFullscreen;
@@ -113,5 +118,5 @@ bool MediaPlayerState::shuffled() {
-bool MediaPlayerState:: playlist() {
+bool MediaPlayerState::playlist() {
return usePlaylist;
}
@@ -150,4 +155,13 @@ void MediaPlayerState::setIsStreaming( bool b ) {
}
+void MediaPlayerState::setIsSeekable( bool b ) {
+
+ //if ( isSeekable == b ) {
+ // return;
+ // }
+ isSeekable = b;
+ emit isSeekableToggled(b);
+}
+
void MediaPlayerState::setFullscreen( bool b ) {
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h
index 4fef8e0..8c4e09e 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.h
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h
@@ -55,4 +55,5 @@ public:
bool isStoped;
bool streaming();
+ bool seekable();
bool fullscreen();
bool scaled();
@@ -69,4 +70,5 @@ public:
public slots:
void setIsStreaming( bool b );
+ void setIsSeekable( bool b );
void setFullscreen( bool b );
void setScaled( bool b );
@@ -114,4 +116,5 @@ signals:
void lengthChanged( long );
void viewChanged( char );
+ void isSeekableToggled( bool );
void blankToggled( bool );
void videoGammaChanged( int );
@@ -121,4 +124,5 @@ signals:
private:
bool isStreaming;
+ bool isSeekable;
bool isFullscreen;
bool isScaled;
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c
index b1f4811..707efeb 100644
--- a/noncore/multimedia/opieplayer2/nullvideo.c
+++ b/noncore/multimedia/opieplayer2/nullvideo.c
@@ -498,5 +498,5 @@ static vo_info_t vo_info_null = {
vo_info_t *get_video_out_plugin_info(){
- vo_info_null.description = _("xine video output plugin using null device");
+ vo_info_null.description = ("xine video output plugin using null device");
return &vo_info_null;
}
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 7b8ad7a..7d71d09 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -385,10 +385,9 @@ void VideoWidget::makeVisible() {
slider->hide();
videoFrame-> setGeometry ( 0, 0, width ( ), height ( ));
-// qApp->processEvents();
} else {
showNormal();
showMaximized();
setBackgroundPixmap( *pixBg );
- if ( mediaPlayerState->streaming() ) {
+ if ( mediaPlayerState->seekable() ) {
slider->hide();
disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
@@ -400,6 +399,6 @@ void VideoWidget::makeVisible() {
}
QWidget *d = QApplication::desktop();
- int w=d->width();
- int h=d->height();
+ int w = d->width();
+ int h = d->height();
if(w>h) {
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 03176b3..65ac127 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -76,7 +76,7 @@ void XineControl::play( const QString& fileName ) {
m_fileName = fileName;
- //qDebug("<<FILENAME: " + fileName + ">>>>");
+ qDebug("<<FILENAME: " + fileName + ">>>>");
- if ( !libXine->play( fileName ) ) {
+ if ( !libXine->play( fileName, 0, 0 ) ) {
QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() );
// toggle stop so the the play button is reset
@@ -100,5 +100,6 @@ void XineControl::play( const QString& fileName ) {
}
// determine if slider is shown
- mediaPlayerState->setIsStreaming( !libXine->isSeekable() );
+ mediaPlayerState->setIsSeekable( !libXine->isSeekable() );
+
// which gui (video / audio)
mediaPlayerState->setView( whichGui );