author | harlekin <harlekin> | 2002-11-10 15:09:09 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-11-10 15:09:09 (UTC) |
commit | 91932ca42cee5568477b1e49532a0b9e4d9bcf96 (patch) (unidiff) | |
tree | f134612cf7aa15787077b0a76c34aab30d72cae3 | |
parent | b6b57412a12c06d07f22060b7a165d71e5eddb84 (diff) | |
download | opie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.zip opie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.tar.gz opie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.tar.bz2 |
besser seekable handling
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 33 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 16 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 7 |
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 | |||
@@ -186,28 +186,26 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
186 | time.setAlignment( Qt::AlignCenter ); | 186 | time.setAlignment( Qt::AlignCenter ); |
187 | time.setFrame(FALSE); | 187 | time.setFrame(FALSE); |
188 | changeTextColor( &time ); | 188 | changeTextColor( &time ); |
189 | 189 | ||
190 | resizeEvent( NULL ); | 190 | resizeEvent( NULL ); |
191 | 191 | ||
192 | connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 192 | connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
193 | connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 193 | connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
194 | 194 | ||
195 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 195 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
196 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); | 196 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); |
197 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); | 197 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); |
198 | // connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); | ||
199 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 198 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
199 | connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); | ||
200 | 200 | ||
201 | connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); | 201 | connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); |
202 | connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); | 202 | connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); |
203 | connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); | 203 | connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); |
204 | connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); | 204 | connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); |
205 | 205 | ||
206 | |||
207 | |||
208 | // Intialise state | 206 | // Intialise state |
209 | setLength( mediaPlayerState->length() ); | 207 | setLength( mediaPlayerState->length() ); |
210 | setPosition( mediaPlayerState->position() ); | 208 | setPosition( mediaPlayerState->position() ); |
211 | setLooping( mediaPlayerState->fullscreen() ); | 209 | setLooping( mediaPlayerState->fullscreen() ); |
212 | // setPaused( mediaPlayerState->paused() ); | 210 | // setPaused( mediaPlayerState->paused() ); |
213 | setPlaying( mediaPlayerState->playing() ); | 211 | setPlaying( mediaPlayerState->playing() ); |
@@ -305,37 +303,40 @@ void AudioWidget::setLength( long max ) { | |||
305 | updateSlider( mediaPlayerState->position(), max ); | 303 | updateSlider( mediaPlayerState->position(), max ); |
306 | } | 304 | } |
307 | 305 | ||
308 | 306 | ||
309 | void AudioWidget::setView( char view ) { | 307 | void AudioWidget::setView( char view ) { |
310 | 308 | ||
311 | // this isnt working for some reason | 309 | if ( view == 'a' ) { |
310 | // startTimer( 150 ); | ||
311 | showMaximized(); | ||
312 | } else { | ||
313 | killTimers(); | ||
314 | hide(); | ||
315 | } | ||
316 | // qApp->processEvents(); | ||
317 | } | ||
318 | |||
319 | |||
320 | void AudioWidget::setSeekable( bool isSeekable ) { | ||
312 | 321 | ||
313 | if ( mediaPlayerState->streaming() ) { | 322 | if ( isSeekable ) { |
314 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); | 323 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); |
315 | if( !slider.isHidden()) { | 324 | if( !slider.isHidden()) { |
316 | slider.hide(); | 325 | slider.hide(); |
317 | } | 326 | } |
318 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 327 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
319 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 328 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
320 | } else { | 329 | } else { |
321 | // this stops the slider from being moved, thus | 330 | // this stops the slider from being moved, thus |
322 | // does not stop stream when it reaches the end | 331 | // does not stop stream when it reaches the end |
323 | slider.show(); | 332 | slider.show(); |
333 | qDebug( " CONNECT SET POSTION " ); | ||
324 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 334 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
325 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 335 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
326 | } | 336 | } |
327 | |||
328 | if ( view == 'a' ) { | ||
329 | // startTimer( 150 ); | ||
330 | showMaximized(); | ||
331 | } else { | ||
332 | killTimers(); | ||
333 | hide(); | ||
334 | } | ||
335 | // qApp->processEvents(); | ||
336 | } | 337 | } |
337 | 338 | ||
338 | 339 | ||
339 | static QString timeAsString( long length ) { | 340 | static QString timeAsString( long length ) { |
340 | int minutes = length / 60; | 341 | int minutes = length / 60; |
341 | int seconds = length % 60; | 342 | int seconds = length % 60; |
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 | |||
@@ -91,12 +91,13 @@ public slots: | |||
91 | void sliderReleased( ); | 91 | void sliderReleased( ); |
92 | // void setPaused( bool b) { setToggleButton( AudioPause, b ); } | 92 | // void setPaused( bool b) { setToggleButton( AudioPause, b ); } |
93 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } | 93 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } |
94 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } | 94 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } |
95 | void setPosition( long ); | 95 | void setPosition( long ); |
96 | void setLength( long ); | 96 | void setLength( long ); |
97 | void setSeekable( bool ); | ||
97 | void setView( char ); | 98 | void setView( char ); |
98 | 99 | ||
99 | signals: | 100 | signals: |
100 | void moreClicked(); | 101 | void moreClicked(); |
101 | void lessClicked(); | 102 | void lessClicked(); |
102 | void moreReleased(); | 103 | void moreReleased(); |
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 | |||
@@ -298,13 +298,13 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { | |||
298 | 298 | ||
299 | 299 | ||
300 | void MediaPlayer::blank( bool b ) { | 300 | void MediaPlayer::blank( bool b ) { |
301 | fd=open("/dev/fb0",O_RDWR); | 301 | fd=open("/dev/fb0",O_RDWR); |
302 | #ifdef QT_QWS_EBX | 302 | #ifdef QT_QWS_EBX |
303 | fl= open( "/dev/fl", O_RDWR ); | 303 | fl= open( "/dev/fl", O_RDWR ); |
304 | #endif | 304 | #endif |
305 | if (fd != -1) { | 305 | if (fd != -1) { |
306 | if ( b ) { | 306 | if ( b ) { |
307 | qDebug("do blanking"); | 307 | qDebug("do blanking"); |
308 | #ifdef QT_QWS_EBX | 308 | #ifdef QT_QWS_EBX |
309 | ioctl( fd, FBIOBLANK, 1 ); | 309 | ioctl( fd, FBIOBLANK, 1 ); |
310 | if(fl !=-1) { | 310 | if(fl !=-1) { |
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 | |||
@@ -49,12 +49,13 @@ | |||
49 | 49 | ||
50 | MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) | 50 | MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) |
51 | : QObject( parent, name ) { | 51 | : QObject( parent, name ) { |
52 | Config cfg( "OpiePlayer" ); | 52 | Config cfg( "OpiePlayer" ); |
53 | readConfig( cfg ); | 53 | readConfig( cfg ); |
54 | isStreaming = false; | 54 | isStreaming = false; |
55 | isSeekable = true; | ||
55 | } | 56 | } |
56 | 57 | ||
57 | 58 | ||
58 | MediaPlayerState::~MediaPlayerState() { | 59 | MediaPlayerState::~MediaPlayerState() { |
59 | } | 60 | } |
60 | 61 | ||
@@ -92,12 +93,16 @@ void MediaPlayerState::writeConfig( Config& cfg ) const { | |||
92 | 93 | ||
93 | 94 | ||
94 | bool MediaPlayerState::streaming() { | 95 | bool MediaPlayerState::streaming() { |
95 | return isStreaming; | 96 | return isStreaming; |
96 | } | 97 | } |
97 | 98 | ||
99 | bool MediaPlayerState::seekable() { | ||
100 | return isSeekable; | ||
101 | } | ||
102 | |||
98 | bool MediaPlayerState::fullscreen() { | 103 | bool MediaPlayerState::fullscreen() { |
99 | return isFullscreen; | 104 | return isFullscreen; |
100 | } | 105 | } |
101 | 106 | ||
102 | bool MediaPlayerState::scaled() { | 107 | bool MediaPlayerState::scaled() { |
103 | return isScaled; | 108 | return isScaled; |
@@ -109,13 +114,13 @@ bool MediaPlayerState::looping() { | |||
109 | 114 | ||
110 | bool MediaPlayerState::shuffled() { | 115 | bool MediaPlayerState::shuffled() { |
111 | return isShuffled; | 116 | return isShuffled; |
112 | } | 117 | } |
113 | 118 | ||
114 | 119 | ||
115 | bool MediaPlayerState:: playlist() { | 120 | bool MediaPlayerState::playlist() { |
116 | return usePlaylist; | 121 | return usePlaylist; |
117 | } | 122 | } |
118 | 123 | ||
119 | bool MediaPlayerState::paused() { | 124 | bool MediaPlayerState::paused() { |
120 | return isPaused; | 125 | return isPaused; |
121 | } | 126 | } |
@@ -146,12 +151,21 @@ void MediaPlayerState::setIsStreaming( bool b ) { | |||
146 | if ( isStreaming == b ) { | 151 | if ( isStreaming == b ) { |
147 | return; | 152 | return; |
148 | } | 153 | } |
149 | isStreaming = b; | 154 | isStreaming = b; |
150 | } | 155 | } |
151 | 156 | ||
157 | void MediaPlayerState::setIsSeekable( bool b ) { | ||
158 | |||
159 | //if ( isSeekable == b ) { | ||
160 | // return; | ||
161 | // } | ||
162 | isSeekable = b; | ||
163 | emit isSeekableToggled(b); | ||
164 | } | ||
165 | |||
152 | 166 | ||
153 | void MediaPlayerState::setFullscreen( bool b ) { | 167 | void MediaPlayerState::setFullscreen( bool b ) { |
154 | if ( isFullscreen == b ) { | 168 | if ( isFullscreen == b ) { |
155 | return; | 169 | return; |
156 | } | 170 | } |
157 | isFullscreen = b; | 171 | isFullscreen = 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 | |||
@@ -51,12 +51,13 @@ public: | |||
51 | ~MediaPlayerState(); | 51 | ~MediaPlayerState(); |
52 | 52 | ||
53 | bool isPaused; | 53 | bool isPaused; |
54 | bool isPlaying; | 54 | bool isPlaying; |
55 | bool isStoped; | 55 | bool isStoped; |
56 | bool streaming(); | 56 | bool streaming(); |
57 | bool seekable(); | ||
57 | bool fullscreen(); | 58 | bool fullscreen(); |
58 | bool scaled(); | 59 | bool scaled(); |
59 | bool looping(); | 60 | bool looping(); |
60 | bool shuffled(); | 61 | bool shuffled(); |
61 | bool playlist(); | 62 | bool playlist(); |
62 | bool paused(); | 63 | bool paused(); |
@@ -65,12 +66,13 @@ public: | |||
65 | long position(); | 66 | long position(); |
66 | long length(); | 67 | long length(); |
67 | char view(); | 68 | char view(); |
68 | 69 | ||
69 | public slots: | 70 | public slots: |
70 | void setIsStreaming( bool b ); | 71 | void setIsStreaming( bool b ); |
72 | void setIsSeekable( bool b ); | ||
71 | void setFullscreen( bool b ); | 73 | void setFullscreen( bool b ); |
72 | void setScaled( bool b ); | 74 | void setScaled( bool b ); |
73 | void setLooping( bool b ); | 75 | void setLooping( bool b ); |
74 | void setShuffled( bool b ); | 76 | void setShuffled( bool b ); |
75 | void setPlaylist( bool b ); | 77 | void setPlaylist( bool b ); |
76 | void setPaused( bool b ); | 78 | void setPaused( bool b ); |
@@ -110,19 +112,21 @@ signals: | |||
110 | void playingToggled( bool ); | 112 | void playingToggled( bool ); |
111 | void stopToggled( bool ); | 113 | void stopToggled( bool ); |
112 | void positionChanged( long ); // When the slider is moved | 114 | void positionChanged( long ); // When the slider is moved |
113 | void positionUpdated( long ); // When the media file progresses | 115 | void positionUpdated( long ); // When the media file progresses |
114 | void lengthChanged( long ); | 116 | void lengthChanged( long ); |
115 | void viewChanged( char ); | 117 | void viewChanged( char ); |
118 | void isSeekableToggled( bool ); | ||
116 | void blankToggled( bool ); | 119 | void blankToggled( bool ); |
117 | void videoGammaChanged( int ); | 120 | void videoGammaChanged( int ); |
118 | void prev(); | 121 | void prev(); |
119 | void next(); | 122 | void next(); |
120 | 123 | ||
121 | private: | 124 | private: |
122 | bool isStreaming; | 125 | bool isStreaming; |
126 | bool isSeekable; | ||
123 | bool isFullscreen; | 127 | bool isFullscreen; |
124 | bool isScaled; | 128 | bool isScaled; |
125 | bool isBlanked; | 129 | bool isBlanked; |
126 | bool isLooping; | 130 | bool isLooping; |
127 | bool isShuffled; | 131 | bool isShuffled; |
128 | bool usePlaylist; | 132 | bool usePlaylist; |
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 | |||
@@ -494,13 +494,13 @@ xine_vo_driver_t* init_video_out_plugin( config_values_t* conf, | |||
494 | static vo_info_t vo_info_null = { | 494 | static vo_info_t vo_info_null = { |
495 | 5, | 495 | 5, |
496 | XINE_VISUAL_TYPE_FB | 496 | XINE_VISUAL_TYPE_FB |
497 | }; | 497 | }; |
498 | 498 | ||
499 | vo_info_t *get_video_out_plugin_info(){ | 499 | vo_info_t *get_video_out_plugin_info(){ |
500 | vo_info_null.description = _("xine video output plugin using null device"); | 500 | vo_info_null.description = ("xine video output plugin using null device"); |
501 | return &vo_info_null; | 501 | return &vo_info_null; |
502 | } | 502 | } |
503 | 503 | ||
504 | #endif | 504 | #endif |
505 | 505 | ||
506 | /* this is special for this device */ | 506 | /* this is special for this device */ |
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 | |||
@@ -381,29 +381,28 @@ void VideoWidget::makeVisible() { | |||
381 | if ( mediaPlayerState->fullscreen() ) { | 381 | if ( mediaPlayerState->fullscreen() ) { |
382 | setBackgroundMode( QWidget::NoBackground ); | 382 | setBackgroundMode( QWidget::NoBackground ); |
383 | showFullScreen(); | 383 | showFullScreen(); |
384 | resize( qApp->desktop()->size() ); | 384 | resize( qApp->desktop()->size() ); |
385 | slider->hide(); | 385 | slider->hide(); |
386 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); | 386 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); |
387 | // qApp->processEvents(); | ||
388 | } else { | 387 | } else { |
389 | showNormal(); | 388 | showNormal(); |
390 | showMaximized(); | 389 | showMaximized(); |
391 | setBackgroundPixmap( *pixBg ); | 390 | setBackgroundPixmap( *pixBg ); |
392 | if ( mediaPlayerState->streaming() ) { | 391 | if ( mediaPlayerState->seekable() ) { |
393 | slider->hide(); | 392 | slider->hide(); |
394 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 393 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
395 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 394 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
396 | } else { | 395 | } else { |
397 | slider->show(); | 396 | slider->show(); |
398 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 397 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
399 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 398 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
400 | } | 399 | } |
401 | QWidget *d = QApplication::desktop(); | 400 | QWidget *d = QApplication::desktop(); |
402 | int w=d->width(); | 401 | int w = d->width(); |
403 | int h=d->height(); | 402 | int h = d->height(); |
404 | 403 | ||
405 | if(w>h) { | 404 | if(w>h) { |
406 | int newW=(w/2)-(246/2); //this will only work with 320x240 | 405 | int newW=(w/2)-(246/2); //this will only work with 320x240 |
407 | videoFrame->setGeometry( QRect( newW, 4, 240, 170 ) ); | 406 | videoFrame->setGeometry( QRect( newW, 4, 240, 170 ) ); |
408 | } else | 407 | } else |
409 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); | 408 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); |
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 | |||
@@ -72,15 +72,15 @@ XineControl::~XineControl() { | |||
72 | 72 | ||
73 | void XineControl::play( const QString& fileName ) { | 73 | void XineControl::play( const QString& fileName ) { |
74 | hasVideoChannel = FALSE; | 74 | hasVideoChannel = FALSE; |
75 | hasAudioChannel = FALSE; | 75 | hasAudioChannel = FALSE; |
76 | m_fileName = fileName; | 76 | m_fileName = fileName; |
77 | 77 | ||
78 | //qDebug("<<FILENAME: " + fileName + ">>>>"); | 78 | qDebug("<<FILENAME: " + fileName + ">>>>"); |
79 | 79 | ||
80 | if ( !libXine->play( fileName ) ) { | 80 | if ( !libXine->play( fileName, 0, 0 ) ) { |
81 | QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); | 81 | QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); |
82 | // toggle stop so the the play button is reset | 82 | // toggle stop so the the play button is reset |
83 | mediaPlayerState->setPlaying( false ); | 83 | mediaPlayerState->setPlaying( false ); |
84 | return; | 84 | return; |
85 | } | 85 | } |
86 | mediaPlayerState->setPlaying( true ); | 86 | mediaPlayerState->setPlaying( true ); |
@@ -96,13 +96,14 @@ void XineControl::play( const QString& fileName ) { | |||
96 | whichGui = 'v'; | 96 | whichGui = 'v'; |
97 | qDebug("HAS VIDEO"); | 97 | qDebug("HAS VIDEO"); |
98 | libXine->setShowVideo( true ); | 98 | libXine->setShowVideo( true ); |
99 | hasVideoChannel = TRUE; | 99 | hasVideoChannel = TRUE; |
100 | } | 100 | } |
101 | // determine if slider is shown | 101 | // determine if slider is shown |
102 | mediaPlayerState->setIsStreaming( !libXine->isSeekable() ); | 102 | mediaPlayerState->setIsSeekable( !libXine->isSeekable() ); |
103 | |||
103 | // which gui (video / audio) | 104 | // which gui (video / audio) |
104 | mediaPlayerState->setView( whichGui ); | 105 | mediaPlayerState->setView( whichGui ); |
105 | 106 | ||
106 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 107 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
107 | if ( !disabledSuspendScreenSaver ) { | 108 | if ( !disabledSuspendScreenSaver ) { |
108 | disabledSuspendScreenSaver = TRUE; | 109 | disabledSuspendScreenSaver = TRUE; |