summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-11-10 15:09:09 (UTC)
committer harlekin <harlekin>2002-11-10 15:09:09 (UTC)
commit91932ca42cee5568477b1e49532a0b9e4d9bcf96 (patch) (side-by-side diff)
treef134612cf7aa15787077b0a76c34aab30d72cae3
parentb6b57412a12c06d07f22060b7a165d71e5eddb84 (diff)
downloadopie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.zip
opie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.tar.gz
opie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.tar.bz2
besser seekable handling
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp29
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp0
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp14
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h4
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp3
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp7
8 files changed, 40 insertions, 20 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
@@ -196,6 +196,6 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
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
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;
@@ -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) ) );
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 );