author | llornkcor <llornkcor> | 2003-06-11 22:11:38 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-06-11 22:11:38 (UTC) |
commit | 24097a2790fd7bb241a0a8da24ef2996e4f4ad15 (patch) (unidiff) | |
tree | 142e0fb758067bc9a601b3bd2dabdff27675c0f3 /core/multimedia/opieplayer/mediaplayerstate.cpp | |
parent | 188319af82322c84f02e1abb848d908ca8f9e26c (diff) | |
download | opie-24097a2790fd7bb241a0a8da24ef2996e4f4ad15.zip opie-24097a2790fd7bb241a0a8da24ef2996e4f4ad15.tar.gz opie-24097a2790fd7bb241a0a8da24ef2996e4f4ad15.tar.bz2 |
fix setDoc for playlists and others. remove qDebugs
Diffstat (limited to 'core/multimedia/opieplayer/mediaplayerstate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/mediaplayerstate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp index cf166d6..6823076 100644 --- a/core/multimedia/opieplayer/mediaplayerstate.cpp +++ b/core/multimedia/opieplayer/mediaplayerstate.cpp | |||
@@ -98,65 +98,65 @@ MediaPlayerDecoder *MediaPlayerState::newDecoder( const QString& file ) { | |||
98 | MediaPlayerDecoder *tmpDecoder = NULL; | 98 | MediaPlayerDecoder *tmpDecoder = NULL; |
99 | QValueList<MediaPlayerPlugin>::Iterator it; | 99 | QValueList<MediaPlayerPlugin>::Iterator it; |
100 | for ( it = pluginList.begin(); it != pluginList.end(); ++it ) { | 100 | for ( it = pluginList.begin(); it != pluginList.end(); ++it ) { |
101 | if ( (*it).decoder->isFileSupported( file ) ) { | 101 | if ( (*it).decoder->isFileSupported( file ) ) { |
102 | tmpDecoder = (*it).decoder; | 102 | tmpDecoder = (*it).decoder; |
103 | break; | 103 | break; |
104 | } | 104 | } |
105 | } | 105 | } |
106 | if(file.left(4)=="http") | 106 | if(file.left(4)=="http") |
107 | isStreaming = TRUE; | 107 | isStreaming = TRUE; |
108 | else | 108 | else |
109 | isStreaming = FALSE; | 109 | isStreaming = FALSE; |
110 | return decoder = tmpDecoder; | 110 | return decoder = tmpDecoder; |
111 | } | 111 | } |
112 | 112 | ||
113 | 113 | ||
114 | MediaPlayerDecoder *MediaPlayerState::curDecoder() { | 114 | MediaPlayerDecoder *MediaPlayerState::curDecoder() { |
115 | return decoder; | 115 | return decoder; |
116 | } | 116 | } |
117 | 117 | ||
118 | 118 | ||
119 | // ### hack to get true sample count | 119 | // ### hack to get true sample count |
120 | MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() { | 120 | MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() { |
121 | return libmpeg3decoder; | 121 | return libmpeg3decoder; |
122 | } | 122 | } |
123 | 123 | ||
124 | // ### hack to get true sample count | 124 | // ### hack to get true sample count |
125 | // MediaPlayerDecoder *MediaPlayerState::libWavDecoder() { | 125 | // MediaPlayerDecoder *MediaPlayerState::libWavDecoder() { |
126 | // return libwavdecoder; | 126 | // return libwavdecoder; |
127 | // } | 127 | // } |
128 | 128 | ||
129 | void MediaPlayerState::loadPlugins() { | 129 | void MediaPlayerState::loadPlugins() { |
130 | qDebug("load plugins"); | 130 | // qDebug("load plugins"); |
131 | #ifndef QT_NO_COMPONENT | 131 | #ifndef QT_NO_COMPONENT |
132 | QValueList<MediaPlayerPlugin>::Iterator mit; | 132 | QValueList<MediaPlayerPlugin>::Iterator mit; |
133 | for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) { | 133 | for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) { |
134 | (*mit).iface->release(); | 134 | (*mit).iface->release(); |
135 | (*mit).library->unload(); | 135 | (*mit).library->unload(); |
136 | delete (*mit).library; | 136 | delete (*mit).library; |
137 | } | 137 | } |
138 | pluginList.clear(); | 138 | pluginList.clear(); |
139 | 139 | ||
140 | QString path = QPEApplication::qpeDir() + "/plugins/codecs"; | 140 | QString path = QPEApplication::qpeDir() + "/plugins/codecs"; |
141 | QDir dir( path, "lib*.so" ); | 141 | QDir dir( path, "lib*.so" ); |
142 | QStringList list = dir.entryList(); | 142 | QStringList list = dir.entryList(); |
143 | QStringList::Iterator it; | 143 | QStringList::Iterator it; |
144 | for ( it = list.begin(); it != list.end(); ++it ) { | 144 | for ( it = list.begin(); it != list.end(); ++it ) { |
145 | MediaPlayerPluginInterface *iface = 0; | 145 | MediaPlayerPluginInterface *iface = 0; |
146 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 146 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
147 | // qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); | 147 | // qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); |
148 | 148 | ||
149 | if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) { | 149 | if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) { |
150 | 150 | ||
151 | // qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); | 151 | // qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); |
152 | 152 | ||
153 | MediaPlayerPlugin plugin; | 153 | MediaPlayerPlugin plugin; |
154 | plugin.library = lib; | 154 | plugin.library = lib; |
155 | plugin.iface = iface; | 155 | plugin.iface = iface; |
156 | plugin.decoder = plugin.iface->decoder(); | 156 | plugin.decoder = plugin.iface->decoder(); |
157 | plugin.encoder = plugin.iface->encoder(); | 157 | plugin.encoder = plugin.iface->encoder(); |
158 | pluginList.append( plugin ); | 158 | pluginList.append( plugin ); |
159 | 159 | ||
160 | // ### hack to get true sample count | 160 | // ### hack to get true sample count |
161 | if ( plugin.decoder->pluginName() == QString("LibMpeg3Plugin") ) | 161 | if ( plugin.decoder->pluginName() == QString("LibMpeg3Plugin") ) |
162 | libmpeg3decoder = plugin.decoder; | 162 | libmpeg3decoder = plugin.decoder; |