summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/mediaplayerstate.cpp
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/mediaplayerstate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/mediaplayerstate.cpp68
1 files changed, 31 insertions, 37 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp
index 2a6bca3..7e82166 100644
--- a/core/multimedia/opieplayer/mediaplayerstate.cpp
+++ b/core/multimedia/opieplayer/mediaplayerstate.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qtopia Environment.
+** This file is part of the Qtopia Environment.
**
@@ -21,2 +21,3 @@
#include <qpe/qlibrary.h>
+#include <qpe/mediaplayerplugininterface.h>
#include <qpe/config.h>
@@ -25,7 +26,4 @@
#include <qdir.h>
-#include "mediaplayerplugininterface.h"
#include "mediaplayerstate.h"
-
-
#ifdef QT_NO_COMPONENT
@@ -38,4 +36,4 @@
-//#define MediaPlayerDebug(x) qDebug x
-#define MediaPlayerDebug(x)
+#define MediaPlayerDebug(x) qDebug x
+//#define MediaPlayerDebug(x)
@@ -99,6 +97,6 @@ MediaPlayerDecoder *MediaPlayerState::newDecoder( const QString& file ) {
for ( it = pluginList.begin(); it != pluginList.end(); ++it ) {
- if ( (*it).decoder->isFileSupported( file ) ) {
- tmpDecoder = (*it).decoder;
- break;
- }
+ if ( (*it).decoder->isFileSupported( file ) ) {
+ tmpDecoder = (*it).decoder;
+ break;
+ }
}
@@ -118,6 +116,2 @@ MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() {
-// ### hack to get true sample count
-// MediaPlayerDecoder *MediaPlayerState::libWavDecoder() {
-// return libwavdecoder;
-// }
@@ -128,5 +122,5 @@ void MediaPlayerState::loadPlugins() {
for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) {
- (*mit).iface->release();
- (*mit).library->unload();
- delete (*mit).library;
+ (*mit).iface->release();
+ (*mit).library->unload();
+ delete (*mit).library;
}
@@ -139,25 +133,25 @@ void MediaPlayerState::loadPlugins() {
for ( it = list.begin(); it != list.end(); ++it ) {
- MediaPlayerPluginInterface *iface = 0;
- QLibrary *lib = new QLibrary( path + "/" + *it );
+ MediaPlayerPluginInterface *iface = 0;
+ QLibrary *lib = new QLibrary( path + "/" + *it );
- MediaPlayerDebug(( "querying: %s", QString( path + "/" + *it ).latin1() ));
+ MediaPlayerDebug(( "querying: %s", QString( path + "/" + *it ).latin1() ));
- if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) {
+ if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) {
- MediaPlayerDebug(( "loading: %s", QString( path + "/" + *it ).latin1() ));
+ MediaPlayerDebug(( "loading: %s", QString( path + "/" + *it ).latin1() ));
- MediaPlayerPlugin plugin;
- plugin.library = lib;
- plugin.iface = iface;
- plugin.decoder = plugin.iface->decoder();
- plugin.encoder = plugin.iface->encoder();
- pluginList.append( plugin );
+ MediaPlayerPlugin plugin;
+ plugin.library = lib;
+ plugin.iface = iface;
+ plugin.decoder = plugin.iface->decoder();
+ plugin.encoder = plugin.iface->encoder();
+ pluginList.append( plugin );
- // ### hack to get true sample count
- if ( plugin.decoder->pluginName() == QString("LibMpeg3Plugin") )
- libmpeg3decoder = plugin.decoder;
+ // ### hack to get true sample count
+ if ( plugin.decoder->pluginName() == QString("LibMpeg3Plugin") )
+ libmpeg3decoder = plugin.decoder;
- } else {
- delete lib;
- }
+ } else {
+ delete lib;
+ }
}
@@ -186,5 +180,5 @@ void MediaPlayerState::loadPlugins() {
if ( pluginList.count() )
- MediaPlayerDebug(( "%i decoders found", pluginList.count() ));
+ MediaPlayerDebug(( "%i decoders found", pluginList.count() ));
else
- MediaPlayerDebug(( "No decoders found" ));
+ MediaPlayerDebug(( "No decoders found" ));
}