Diffstat (limited to 'core/multimedia/opieplayer/mediaplayerstate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/mediaplayerstate.cpp | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp index 5bfb87e..b700cd1 100644 --- a/core/multimedia/opieplayer/mediaplayerstate.cpp +++ b/core/multimedia/opieplayer/mediaplayerstate.cpp | |||
@@ -17,14 +17,6 @@ | |||
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qpe/qpeapplication.h> | ||
21 | #include <qpe/qlibrary.h> | ||
22 | #include <qpe/config.h> | ||
23 | #include <qdir.h> | ||
24 | #include <qpe/mediaplayerplugininterface.h> | ||
25 | #include "mediaplayerstate.h" | ||
26 | |||
27 | |||
28 | 20 | ||
29 | #ifdef QT_NO_COMPONENT | 21 | #ifdef QT_NO_COMPONENT |
30 | // Plugins which are compiled in when no plugin architecture available | 22 | // Plugins which are compiled in when no plugin architecture available |
@@ -33,6 +25,18 @@ | |||
33 | #include "wavplugin/wavpluginimpl.h" | 25 | #include "wavplugin/wavpluginimpl.h" |
34 | #endif | 26 | #endif |
35 | 27 | ||
28 | #include "mediaplayerstate.h" | ||
29 | |||
30 | /* OPIE */ | ||
31 | #include <qpe/qpeapplication.h> | ||
32 | #include <qpe/qlibrary.h> | ||
33 | #include <qpe/config.h> | ||
34 | #include <qpe/mediaplayerplugininterface.h> | ||
35 | #include <opie2/odebug.h> | ||
36 | |||
37 | /* QT */ | ||
38 | #include <qdir.h> | ||
39 | |||
36 | 40 | ||
37 | //#define MediaPlayerDebug(x) qDebug x | 41 | //#define MediaPlayerDebug(x) qDebug x |
38 | #define MediaPlayerDebug(x) | 42 | #define MediaPlayerDebug(x) |
@@ -104,8 +108,8 @@ MediaPlayerDecoder *MediaPlayerState::newDecoder( const QString& file ) { | |||
104 | if(file.left(4)=="http") | 108 | if(file.left(4)=="http") |
105 | isStreaming = TRUE; | 109 | isStreaming = TRUE; |
106 | else | 110 | else |
107 | isStreaming = FALSE; | 111 | isStreaming = FALSE; |
108 | return decoder = tmpDecoder; | 112 | return decoder = tmpDecoder; |
109 | } | 113 | } |
110 | 114 | ||
111 | 115 | ||
@@ -125,7 +129,7 @@ MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() { | |||
125 | // } | 129 | // } |
126 | 130 | ||
127 | void MediaPlayerState::loadPlugins() { | 131 | void MediaPlayerState::loadPlugins() { |
128 | // qDebug("load plugins"); | 132 | // odebug << "load plugins" << oendl; |
129 | #ifndef QT_NO_COMPONENT | 133 | #ifndef QT_NO_COMPONENT |
130 | QValueList<MediaPlayerPlugin>::Iterator mit; | 134 | QValueList<MediaPlayerPlugin>::Iterator mit; |
131 | for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) { | 135 | for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) { |
@@ -142,11 +146,11 @@ void MediaPlayerState::loadPlugins() { | |||
142 | for ( it = list.begin(); it != list.end(); ++it ) { | 146 | for ( it = list.begin(); it != list.end(); ++it ) { |
143 | MediaPlayerPluginInterface *iface = 0; | 147 | MediaPlayerPluginInterface *iface = 0; |
144 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 148 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
145 | // qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); | 149 | // odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl; |
146 | 150 | ||
147 | if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) { | 151 | if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) { |
148 | 152 | ||
149 | // qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); | 153 | // odebug << "loading: " << QString( path + "/" + *it ) << "" << oendl; |
150 | 154 | ||
151 | MediaPlayerPlugin plugin; | 155 | MediaPlayerPlugin plugin; |
152 | plugin.library = lib; | 156 | plugin.library = lib; |
@@ -165,7 +169,7 @@ void MediaPlayerState::loadPlugins() { | |||
165 | } | 169 | } |
166 | #else | 170 | #else |
167 | pluginList.clear(); | 171 | pluginList.clear(); |
168 | 172 | ||
169 | MediaPlayerPlugin plugin0; | 173 | MediaPlayerPlugin plugin0; |
170 | plugin0.iface = new LibMpeg3PluginImpl; | 174 | plugin0.iface = new LibMpeg3PluginImpl; |
171 | plugin0.decoder = plugin0.iface->decoder(); | 175 | plugin0.decoder = plugin0.iface->decoder(); |
@@ -185,7 +189,7 @@ void MediaPlayerState::loadPlugins() { | |||
185 | pluginList.append( plugin2 ); | 189 | pluginList.append( plugin2 ); |
186 | #endif | 190 | #endif |
187 | 191 | ||
188 | if ( pluginList.count() ) | 192 | if ( pluginList.count() ) |
189 | MediaPlayerDebug(( "%i decoders found", pluginList.count() )); | 193 | MediaPlayerDebug(( "%i decoders found", pluginList.count() )); |
190 | else | 194 | else |
191 | MediaPlayerDebug(( "No decoders found" )); | 195 | MediaPlayerDebug(( "No decoders found" )); |