summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/xinecontrol.h
authorzecke <zecke>2004-09-24 15:15:51 (UTC)
committer zecke <zecke>2004-09-24 15:15:51 (UTC)
commit4c53e68c3ac96baaaf39cc049c89d8ccf022ff59 (patch) (unidiff)
tree8273ae338f0d611c28438a4f8a6a6fc8329e90e8 /noncore/multimedia/opieplayer2/xinecontrol.h
parenta214128c01e38ffd50edc4ed5b5c72593796eab2 (diff)
downloadopie-4c53e68c3ac96baaaf39cc049c89d8ccf022ff59.zip
opie-4c53e68c3ac96baaaf39cc049c89d8ccf022ff59.tar.gz
opie-4c53e68c3ac96baaaf39cc049c89d8ccf022ff59.tar.bz2
Handling of Errors is a bit problematic with the current design.
We can start playing from multiple contexts. This are the PlayList context and single file context. Now the problem is that MediapPlayerState::setPlaying emits a signal. If started from the the PlayList setPlaying(false) would trigger an infite loop together with the Play ToggleButton, in single file context setPlaying(false) is the right choiche. The intermediate solution is to show an Error MessageBox and to raise the Audio Widget and leave it to the user to close it or go to the next file.
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h
index 3f44f2e..848bd05 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.h
+++ b/noncore/multimedia/opieplayer2/xinecontrol.h
@@ -20,51 +20,48 @@
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#ifndef XINECONTROL_H 34#ifndef XINECONTROL_H
35#define XINECONTROL_H 35#define XINECONTROL_H
36 36
37#include "lib.h" 37#include "lib.h"
38 38
39#include "mediaplayerstate.h" 39#include "mediaplayerstate.h"
40 40
41class XineControl : public QObject { 41class XineControl : public QObject {
42 Q_OBJECT 42 Q_OBJECT
43public: 43public:
44 XineControl( XineVideoWidget *xineWidget,
45 MediaPlayerState &_mediaPlayerState,
46 QObject *parent = 0, const char *name =0 );
47 // note that this constructor takes over ownership of the passed 44 // note that this constructor takes over ownership of the passed
48 // XINE::Lib object. 45 // XINE::Lib object.
49 XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget, 46 XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget,
50 MediaPlayerState &_mediaPlayerState, 47 MediaPlayerState &_mediaPlayerState,
51 QObject *parent = 0, const char *name =0 ); 48 QObject *parent = 0, const char *name =0 );
52 ~XineControl(); 49 ~XineControl();
53 50
54 bool hasVideo() const { return hasVideoChannel; } 51 bool hasVideo() const { return hasVideoChannel; }
55 bool hasAudio() const { return hasAudioChannel; } 52 bool hasAudio() const { return hasAudioChannel; }
56 53
57public slots: 54public slots:
58 void play( const QString& fileName ); 55 void play( const QString& fileName );
59 void stop( bool ); 56 void stop( bool );
60 57
61 /** 58 /**
62 * Pause the media stream 59 * Pause the media stream
63 * @param if pause or not 60 * @param if pause or not
64 */ 61 */
65 void pause( bool ); 62 void pause( bool );
66 63
67 /** 64 /**
68 * Set videos fullscreen 65 * Set videos fullscreen
69 * @param yes or no 66 * @param yes or no
70 */ 67 */
@@ -96,31 +93,32 @@ public slots:
96 QString getErrorCode(); 93 QString getErrorCode();
97 94
98 95
99 void videoResized ( const QSize &s ); 96 void videoResized ( const QSize &s );
100 97
101 /** 98 /**
102 * Set the gamma value of the video output 99 * Set the gamma value of the video output
103 * @param int value between -100 and 100, 0 is original 100 * @param int value between -100 and 100, 0 is original
104 */ 101 */
105 void setGamma( int ); 102 void setGamma( int );
106 103
107private: 104private:
108 void init(); 105 void init();
109 106
110 XINE::Lib *libXine; 107 XINE::Lib *libXine;
111 long m_currentTime; 108 long m_currentTime;
112 long m_position; 109 long m_position;
113 int m_length; 110 int m_length;
114 QString m_fileName; 111 QString m_fileName;
115 bool disabledSuspendScreenSaver : 1; 112 bool disabledSuspendScreenSaver : 1;
116 bool hasVideoChannel : 1; 113 bool hasVideoChannel : 1;
117 bool hasAudioChannel : 1; 114 bool hasAudioChannel : 1;
118 MediaPlayerState &mediaPlayerState; 115 MediaPlayerState &mediaPlayerState;
119 XineVideoWidget *xineVideoWidget; 116 XineVideoWidget *xineVideoWidget;
117 bool m_wasError : 1; // used for chaeting on the metainfo
120 118
121signals: 119signals:
122 void positionChanged( long ); 120 void positionChanged( long );
123}; 121};
124 122
125 123
126#endif 124#endif