author | zecke <zecke> | 2004-09-24 15:15:51 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-24 15:15:51 (UTC) |
commit | 4c53e68c3ac96baaaf39cc049c89d8ccf022ff59 (patch) (unidiff) | |
tree | 8273ae338f0d611c28438a4f8a6a6fc8329e90e8 /noncore/multimedia/opieplayer2/xinecontrol.h | |
parent | a214128c01e38ffd50edc4ed5b5c72593796eab2 (diff) | |
download | opie-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) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.h | 4 |
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 | |||
@@ -32,27 +32,24 @@ | |||
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 | ||
41 | class XineControl : public QObject { | 41 | class XineControl : public QObject { |
42 | Q_OBJECT | 42 | Q_OBJECT |
43 | public: | 43 | public: |
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 | ||
57 | public slots: | 54 | public slots: |
58 | void play( const QString& fileName ); | 55 | void play( const QString& fileName ); |
@@ -108,19 +105,20 @@ private: | |||
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 | ||
121 | signals: | 119 | signals: |
122 | void positionChanged( long ); | 120 | void positionChanged( long ); |
123 | }; | 121 | }; |
124 | 122 | ||
125 | 123 | ||
126 | #endif | 124 | #endif |