author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/multimedia/opieplayer2/xinecontrol.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 8f11b2e..94f99f8 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -84,43 +84,43 @@ XineControl::~XineControl() { | |||
84 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; | 84 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; |
85 | } | 85 | } |
86 | #endif | 86 | #endif |
87 | delete libXine; | 87 | delete libXine; |
88 | } | 88 | } |
89 | 89 | ||
90 | void XineControl::play( const QString& fileName ) { | 90 | void XineControl::play( const QString& fileName ) { |
91 | 91 | ||
92 | hasVideoChannel = FALSE; | 92 | hasVideoChannel = FALSE; |
93 | hasAudioChannel = FALSE; | 93 | hasAudioChannel = FALSE; |
94 | m_fileName = fileName; | 94 | m_fileName = fileName; |
95 | 95 | ||
96 | qDebug("<<FILENAME: " + fileName + ">>>>"); | 96 | odebug << "<<FILENAME: " + fileName + ">>>>" << oendl; |
97 | 97 | ||
98 | if ( !libXine->play( fileName, 0, 0 ) ) { | 98 | if ( !libXine->play( fileName, 0, 0 ) ) { |
99 | QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); | 99 | QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); |
100 | // toggle stop so the the play button is reset | 100 | // toggle stop so the the play button is reset |
101 | mediaPlayerState.setPlaying( false ); | 101 | mediaPlayerState.setPlaying( false ); |
102 | return; | 102 | return; |
103 | } | 103 | } |
104 | mediaPlayerState.setPlaying( true ); | 104 | mediaPlayerState.setPlaying( true ); |
105 | 105 | ||
106 | MediaPlayerState::DisplayType displayType; | 106 | MediaPlayerState::DisplayType displayType; |
107 | if ( !libXine->hasVideo() ) { | 107 | if ( !libXine->hasVideo() ) { |
108 | displayType = MediaPlayerState::Audio; | 108 | displayType = MediaPlayerState::Audio; |
109 | qDebug("HAS AUDIO"); | 109 | odebug << "HAS AUDIO" << oendl; |
110 | libXine->setShowVideo( false ); | 110 | libXine->setShowVideo( false ); |
111 | hasAudioChannel = TRUE; | 111 | hasAudioChannel = TRUE; |
112 | } else { | 112 | } else { |
113 | displayType = MediaPlayerState::Video; | 113 | displayType = MediaPlayerState::Video; |
114 | qDebug("HAS VIDEO"); | 114 | odebug << "HAS VIDEO" << oendl; |
115 | libXine->setShowVideo( true ); | 115 | libXine->setShowVideo( true ); |
116 | hasVideoChannel = TRUE; | 116 | hasVideoChannel = TRUE; |
117 | } | 117 | } |
118 | // determine if slider is shown | 118 | // determine if slider is shown |
119 | mediaPlayerState.setIsSeekable( libXine->isSeekable() ); | 119 | mediaPlayerState.setIsSeekable( libXine->isSeekable() ); |
120 | 120 | ||
121 | // which gui (video / audio) | 121 | // which gui (video / audio) |
122 | mediaPlayerState.setDisplayType( displayType ); | 122 | mediaPlayerState.setDisplayType( displayType ); |
123 | 123 | ||
124 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 124 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
125 | if ( !disabledSuspendScreenSaver ) { | 125 | if ( !disabledSuspendScreenSaver ) { |
126 | disabledSuspendScreenSaver = TRUE; | 126 | disabledSuspendScreenSaver = TRUE; |
@@ -234,25 +234,25 @@ QString XineControl::getMetaInfo() { | |||
234 | } | 234 | } |
235 | 235 | ||
236 | if ( !libXine->metaInfo( 5 ).isEmpty() ) { | 236 | if ( !libXine->metaInfo( 5 ).isEmpty() ) { |
237 | returnString += tr( " Year: " + libXine->metaInfo( 5 ) ); | 237 | returnString += tr( " Year: " + libXine->metaInfo( 5 ) ); |
238 | } | 238 | } |
239 | return returnString; | 239 | return returnString; |
240 | } | 240 | } |
241 | 241 | ||
242 | QString XineControl::getErrorCode() { | 242 | QString XineControl::getErrorCode() { |
243 | 243 | ||
244 | int errorCode = libXine->error(); | 244 | int errorCode = libXine->error(); |
245 | 245 | ||
246 | qDebug( QString("ERRORCODE: %1 ").arg(errorCode) ); | 246 | odebug << QString("ERRORCODE: %1 ").arg(errorCode) << oendl; |
247 | 247 | ||
248 | if ( errorCode == 1 ) { | 248 | if ( errorCode == 1 ) { |
249 | return tr( "No input plugin found for this media type" ); | 249 | return tr( "No input plugin found for this media type" ); |
250 | } else if ( errorCode == 2 ) { | 250 | } else if ( errorCode == 2 ) { |
251 | return tr( "No demux plugin found for this media type" ); | 251 | return tr( "No demux plugin found for this media type" ); |
252 | } else if ( errorCode == 3 ) { | 252 | } else if ( errorCode == 3 ) { |
253 | return tr( "Demuxing failed for this media type" ); | 253 | return tr( "Demuxing failed for this media type" ); |
254 | } else if ( errorCode == 4 ) { | 254 | } else if ( errorCode == 4 ) { |
255 | return tr( "Malformed MRL" ); | 255 | return tr( "Malformed MRL" ); |
256 | } else { | 256 | } else { |
257 | return tr( "Some other error" ); | 257 | return tr( "Some other error" ); |
258 | } | 258 | } |