summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/loopcontrol.cpp
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/loopcontrol.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp42
1 files changed, 25 insertions, 17 deletions
diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp
index 4ed5921..91153fd 100644
--- a/core/multimedia/opieplayer/loopcontrol.cpp
+++ b/core/multimedia/opieplayer/loopcontrol.cpp
@@ -21,3 +21,12 @@
+
+#include "mediaplayerstate.h"
+#include "loopcontrol.h"
+#include "videowidget.h"
+#include "audiodevice.h"
+
+/* OPIE */
#include <qpe/qpeapplication.h>
+#include <qpe/mediaplayerplugininterface.h>
+#include <opie2/odebug.h>
@@ -26,2 +35,6 @@
#endif
+
+/* QT */
+
+/* STD */
#include <stdio.h>
@@ -32,7 +45,2 @@
#include <unistd.h>
-#include "loopcontrol.h"
-#include "videowidget.h"
-#include "audiodevice.h"
-#include <qpe/mediaplayerplugininterface.h>
-#include "mediaplayerstate.h"
@@ -102,3 +110,3 @@ LoopControl::LoopControl( QObject *parent, const char *name )
connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( setMute(bool) ) );
- //qDebug("starting loopcontrol");
+ //odebug << "starting loopcontrol" << oendl;
audioMutex = new Mutex;
@@ -114,3 +122,3 @@ LoopControl::LoopControl( QObject *parent, const char *name )
} else {
- // qDebug( "Error setting up a realtime thread, reverting to using a normal thread." );
+ // odebug << "Error setting up a realtime thread, reverting to using a normal thread." << oendl;
pthread_attr_destroy(&audio_attr);
@@ -119,3 +127,3 @@ LoopControl::LoopControl( QObject *parent, const char *name )
#endif
- //qDebug("create audio thread");
+ //odebug << "create audio thread" << oendl;
pthread_create(&audio_tid, &audio_attr, (void * (*)(void *))startAudioThread, this);
@@ -155,3 +163,3 @@ void LoopControl::setPosition( long pos ) {
audioMutex->lock();
-// qDebug("Loop control %d", pos);
+// odebug << "Loop control " << pos << "" << oendl;
if ( hasVideoChannel && hasAudioChannel ) {
@@ -230,3 +238,3 @@ void LoopControl::startAudio() {
// if ( currentSample != audioSampleCounter + 1 )
-// qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter);
+// odebug << "out of sync with decoder " << currentSample << " " << audioSampleCounter << "" << oendl;
@@ -243,3 +251,3 @@ void LoopControl::startAudio() {
else if ( sampleWaitTime <= -5000 ) {
- // qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
+ // odebug << "need to catch up by: " << -sampleWaitTime << " (" << currentSample << "," << sampleWeShouldBeAt << ")" << oendl;
// //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
@@ -363,3 +371,3 @@ bool LoopControl::init( const QString& filename ) {
- // qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() );
+ // odebug << "Using the " << mediaPlayerState->curDecoder()->pluginName() << " decoder" << oendl;
@@ -389,3 +397,3 @@ bool LoopControl::init( const QString& filename ) {
- // qDebug( "LC- channels = %d", channels );
+ // odebug << "LC- channels = " << channels << "" << oendl;
@@ -395,3 +403,3 @@ bool LoopControl::init( const QString& filename ) {
total_audio_samples += 1000;
- // qDebug("total samples %d", total_audio_samples);
+ // odebug << "total samples " << total_audio_samples << "" << oendl;
mediaPlayerState->setLength( total_audio_samples );
@@ -399,3 +407,3 @@ bool LoopControl::init( const QString& filename ) {
freq = mediaPlayerState->curDecoder()->audioFrequency( astream );
- // qDebug( "LC- frequency = %d", freq );
+ // odebug << "LC- frequency = " << freq << "" << oendl;
@@ -405,3 +413,3 @@ bool LoopControl::init( const QString& filename ) {
bits_per_sample =(int) mediaPlayerState->curDecoder()->getTime();
- // qDebug("using stupid hack");
+ // odebug << "using stupid hack" << oendl;
} else {
@@ -453,3 +461,3 @@ bool LoopControl::init( const QString& filename ) {
void LoopControl::play() {
- // qDebug("LC- play");
+ // odebug << "LC- play" << oendl;
mediaPlayerState->setPosition( 0); //uglyhack