Diffstat (limited to 'core/multimedia/opieplayer/mediaplayerstate.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/mediaplayerstate.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp index 13741f6..a960c49 100644 --- a/core/multimedia/opieplayer/mediaplayerstate.cpp +++ b/core/multimedia/opieplayer/mediaplayerstate.cpp | |||
@@ -20,16 +20,17 @@ | |||
20 | #include <qpe/qpeapplication.h> | 20 | #include <qpe/qpeapplication.h> |
21 | #include <qpe/qlibrary.h> | 21 | #include <qpe/qlibrary.h> |
22 | #include <qpe/config.h> | 22 | #include <qpe/config.h> |
23 | #include <qvaluelist.h> | 23 | #include <qvaluelist.h> |
24 | #include <qobject.h> | 24 | #include <qobject.h> |
25 | #include <qdir.h> | 25 | #include <qdir.h> |
26 | #include "mediaplayerplugininterface.h" | 26 | #include <qpe/mediaplayerplugininterface.h> |
27 | #include "mediaplayerstate.h" | 27 | #include "mediaplayerstate.h" |
28 | 28 | ||
29 | 29 | ||
30 | |||
30 | #ifdef QT_NO_COMPONENT | 31 | #ifdef QT_NO_COMPONENT |
31 | // Plugins which are compiled in when no plugin architecture available | 32 | // Plugins which are compiled in when no plugin architecture available |
32 | #include "libmad/libmadpluginimpl.h" | 33 | #include "libmad/libmadpluginimpl.h" |
33 | #include "libmpeg3/libmpeg3pluginimpl.h" | 34 | #include "libmpeg3/libmpeg3pluginimpl.h" |
34 | #include "wavplugin/wavpluginimpl.h" | 35 | #include "wavplugin/wavpluginimpl.h" |
35 | #endif | 36 | #endif |
@@ -57,12 +58,13 @@ void MediaPlayerState::readConfig( Config& cfg ) { | |||
57 | cfg.setGroup("Options"); | 58 | cfg.setGroup("Options"); |
58 | isFullscreen = cfg.readBoolEntry( "FullScreen" ); | 59 | isFullscreen = cfg.readBoolEntry( "FullScreen" ); |
59 | isScaled = cfg.readBoolEntry( "Scaling" ); | 60 | isScaled = cfg.readBoolEntry( "Scaling" ); |
60 | isLooping = cfg.readBoolEntry( "Looping" ); | 61 | isLooping = cfg.readBoolEntry( "Looping" ); |
61 | isShuffled = cfg.readBoolEntry( "Shuffle" ); | 62 | isShuffled = cfg.readBoolEntry( "Shuffle" ); |
62 | usePlaylist = cfg.readBoolEntry( "UsePlayList" ); | 63 | usePlaylist = cfg.readBoolEntry( "UsePlayList" ); |
64 | usePlaylist = TRUE; | ||
63 | isPlaying = FALSE; | 65 | isPlaying = FALSE; |
64 | isPaused = FALSE; | 66 | isPaused = FALSE; |
65 | curPosition = 0; | 67 | curPosition = 0; |
66 | curLength = 0; | 68 | curLength = 0; |
67 | curView = 'l'; | 69 | curView = 'l'; |
68 | } | 70 | } |
@@ -118,13 +120,13 @@ MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() { | |||
118 | // ### hack to get true sample count | 120 | // ### hack to get true sample count |
119 | // MediaPlayerDecoder *MediaPlayerState::libWavDecoder() { | 121 | // MediaPlayerDecoder *MediaPlayerState::libWavDecoder() { |
120 | // return libwavdecoder; | 122 | // return libwavdecoder; |
121 | // } | 123 | // } |
122 | 124 | ||
123 | void MediaPlayerState::loadPlugins() { | 125 | void MediaPlayerState::loadPlugins() { |
124 | 126 | qDebug("load plugins"); | |
125 | #ifndef QT_NO_COMPONENT | 127 | #ifndef QT_NO_COMPONENT |
126 | QValueList<MediaPlayerPlugin>::Iterator mit; | 128 | QValueList<MediaPlayerPlugin>::Iterator mit; |
127 | for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) { | 129 | for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) { |
128 | (*mit).iface->release(); | 130 | (*mit).iface->release(); |
129 | (*mit).library->unload(); | 131 | (*mit).library->unload(); |
130 | delete (*mit).library; | 132 | delete (*mit).library; |
@@ -135,18 +137,17 @@ void MediaPlayerState::loadPlugins() { | |||
135 | QDir dir( path, "lib*.so" ); | 137 | QDir dir( path, "lib*.so" ); |
136 | QStringList list = dir.entryList(); | 138 | QStringList list = dir.entryList(); |
137 | QStringList::Iterator it; | 139 | QStringList::Iterator it; |
138 | for ( it = list.begin(); it != list.end(); ++it ) { | 140 | for ( it = list.begin(); it != list.end(); ++it ) { |
139 | MediaPlayerPluginInterface *iface = 0; | 141 | MediaPlayerPluginInterface *iface = 0; |
140 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 142 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
141 | 143 | // qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); | |
142 | MediaPlayerDebug(( "querying: %s", QString( path + "/" + *it ).latin1() )); | ||
143 | 144 | ||
144 | if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) { | 145 | if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) { |
145 | 146 | ||
146 | MediaPlayerDebug(( "loading: %s", QString( path + "/" + *it ).latin1() )); | 147 | // qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); |
147 | 148 | ||
148 | MediaPlayerPlugin plugin; | 149 | MediaPlayerPlugin plugin; |
149 | plugin.library = lib; | 150 | plugin.library = lib; |
150 | plugin.iface = iface; | 151 | plugin.iface = iface; |
151 | plugin.decoder = plugin.iface->decoder(); | 152 | plugin.decoder = plugin.iface->decoder(); |
152 | plugin.encoder = plugin.iface->encoder(); | 153 | plugin.encoder = plugin.iface->encoder(); |