author | llornkcor <llornkcor> | 2003-02-25 23:38:02 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-02-25 23:38:02 (UTC) |
commit | 94cb45ce60cc00d719a802baeb8acf74f42150d2 (patch) (unidiff) | |
tree | 27f70d60579a5301f04986e56cf4bfa2067dad9c /core/multimedia/opieplayer | |
parent | bde9ed97c92b6f7eefa8a66d9f58aa4c78127733 (diff) | |
download | opie-94cb45ce60cc00d719a802baeb8acf74f42150d2.zip opie-94cb45ce60cc00d719a802baeb8acf74f42150d2.tar.gz opie-94cb45ce60cc00d719a802baeb8acf74f42150d2.tar.bz2 |
remove libmad depending on libmpeg3, and fix crash when skin not found
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 12 | ||||
-rw-r--r-- | core/multimedia/opieplayer/loopcontrol.cpp | 20 |
2 files changed, 18 insertions, 14 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index 9a55608..3dfe182 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp | |||
@@ -29,3 +29,3 @@ | |||
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | 30 | #include <qdir.h> | |
31 | #include "audiowidget.h" | 31 | #include "audiowidget.h" |
@@ -83,3 +83,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
83 | skin = cfg.readEntry("Skin","default"); | 83 | skin = cfg.readEntry("Skin","default"); |
84 | //skin = "scaleTest"; | 84 | //skin = "scaleTest"; |
85 | // color of background, frame, degree of transparency | 85 | // color of background, frame, degree of transparency |
@@ -87,4 +87,8 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
87 | // QString skinPath = "opieplayer/skins/" + skin; | 87 | // QString skinPath = "opieplayer/skins/" + skin; |
88 | QString skinPath = "opieplayer2/skins/" + skin; | 88 | QString skinPath; |
89 | qDebug("skin path "+skinPath); | 89 | skinPath = "opieplayer2/skins/" + skin; |
90 | if(!QDir(skinPath).exists()) | ||
91 | skinPath = "opieplayer2/skins/default"; | ||
92 | |||
93 | qDebug("skin path " + skinPath); | ||
90 | 94 | ||
diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp index ba14882..8cf0a75 100644 --- a/core/multimedia/opieplayer/loopcontrol.cpp +++ b/core/multimedia/opieplayer/loopcontrol.cpp | |||
@@ -102,3 +102,3 @@ LoopControl::LoopControl( QObject *parent, const char *name ) | |||
102 | connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( setMute(bool) ) ); | 102 | connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( setMute(bool) ) ); |
103 | //qDebug("starting loopcontrol"); | 103 | qDebug("starting loopcontrol"); |
104 | audioMutex = new Mutex; | 104 | audioMutex = new Mutex; |
@@ -119,3 +119,3 @@ LoopControl::LoopControl( QObject *parent, const char *name ) | |||
119 | #endif | 119 | #endif |
120 | //qDebug("create audio thread"); | 120 | qDebug("create audio thread"); |
121 | pthread_create(&audio_tid, &audio_attr, (void * (*)(void *))startAudioThread, this); | 121 | pthread_create(&audio_tid, &audio_attr, (void * (*)(void *))startAudioThread, this); |
@@ -366,8 +366,8 @@ bool LoopControl::init( const QString& filename ) { | |||
366 | // ### Hack to use libmpeg3plugin to get the number of audio samples if we are using the libmad plugin | 366 | // ### Hack to use libmpeg3plugin to get the number of audio samples if we are using the libmad plugin |
367 | if ( mediaPlayerState->curDecoder()->pluginName() == QString("LibMadPlugin") ) { | 367 | // if ( mediaPlayerState->curDecoder()->pluginName() == QString("LibMadPlugin") ) { |
368 | if ( mediaPlayerState->libMpeg3Decoder() && mediaPlayerState->libMpeg3Decoder()->open( filename )) { | 368 | // if ( mediaPlayerState->libMpeg3Decoder() && mediaPlayerState->libMpeg3Decoder()->open( filename )) { |
369 | total_audio_samples = mediaPlayerState->libMpeg3Decoder()->audioSamples( 0 ); | 369 | // total_audio_samples = mediaPlayerState->libMpeg3Decoder()->audioSamples( 0 ); |
370 | mediaPlayerState->libMpeg3Decoder()->close(); | 370 | // mediaPlayerState->libMpeg3Decoder()->close(); |
371 | } | 371 | // } |
372 | } | 372 | // } |
373 | 373 | ||
@@ -391,3 +391,3 @@ bool LoopControl::init( const QString& filename ) { | |||
391 | 391 | ||
392 | if ( !total_audio_samples ) | 392 | // if ( !total_audio_samples ) |
393 | total_audio_samples = mediaPlayerState->curDecoder()->audioSamples( astream ); | 393 | total_audio_samples = mediaPlayerState->curDecoder()->audioSamples( astream ); |
@@ -395,3 +395,3 @@ bool LoopControl::init( const QString& filename ) { | |||
395 | total_audio_samples += 1000; | 395 | total_audio_samples += 1000; |
396 | 396 | qDebug("total samples %d", total_audio_samples); | |
397 | mediaPlayerState->setLength( total_audio_samples ); | 397 | mediaPlayerState->setLength( total_audio_samples ); |