summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/loopcontrol_threaded.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/loopcontrol_threaded.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/loopcontrol_threaded.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/multimedia/opieplayer/loopcontrol_threaded.cpp b/core/multimedia/opieplayer/loopcontrol_threaded.cpp
index e99c97b..364e77b 100644
--- a/core/multimedia/opieplayer/loopcontrol_threaded.cpp
+++ b/core/multimedia/opieplayer/loopcontrol_threaded.cpp
@@ -192,7 +192,7 @@ void LoopControl::setPosition( long pos ) {
192 if ( hasVideoChannel && hasAudioChannel ) { 192 if ( hasVideoChannel && hasAudioChannel ) {
193 videoMutex->lock(); 193 videoMutex->lock();
194 audioMutex->lock(); 194 audioMutex->lock();
195qDebug("setting position"); 195 //qDebug("setting position");
196 playtime.restart(); 196 playtime.restart();
197 playtime = playtime.addMSecs( -pos * 1000 / framerate ); 197 playtime = playtime.addMSecs( -pos * 1000 / framerate );
198 //begin = clock() - (double)pos * CLOCKS_PER_SEC / framerate; 198 //begin = clock() - (double)pos * CLOCKS_PER_SEC / framerate;
@@ -308,7 +308,7 @@ void LoopControl::startVideo() {
308 if ( check ) { 308 if ( check ) {
309 videoMutex->lock(); 309 videoMutex->lock();
310 if ( current_frame > prev_frame + 1 ) { 310 if ( current_frame > prev_frame + 1 ) {
311 qDebug("skipped a frame"); 311 // qDebug("skipped a frame");
312 mediaPlayerState->curDecoder()->videoSetFrame( current_frame, stream ); 312 mediaPlayerState->curDecoder()->videoSetFrame( current_frame, stream );
313 } 313 }
314 prev_frame = current_frame; 314 prev_frame = current_frame;
@@ -341,8 +341,8 @@ void LoopControl::startAudio() {
341 if ( currentSample == 0 ) 341 if ( currentSample == 0 )
342 currentSample = audioSampleCounter + 1; 342 currentSample = audioSampleCounter + 1;
343 343
344 if ( currentSample != audioSampleCounter + 1 ) 344// if ( currentSample != audioSampleCounter + 1 )
345 qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter); 345// qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter);
346 audioMutex->unlock(); 346 audioMutex->unlock();
347 347
348/* 348/*
@@ -371,7 +371,7 @@ void LoopControl::startAudio() {
371 } else { 371 } else {
372 audioMutex->lock(); 372 audioMutex->lock();
373 if ( sampleWaitTime <= -2000 ) { 373 if ( sampleWaitTime <= -2000 ) {
374 qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt ); 374 // qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
375 mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream ); 375 mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
376 currentSample = sampleWeShouldBeAt; 376 currentSample = sampleWeShouldBeAt;
377 } 377 }
@@ -402,7 +402,7 @@ void LoopControl::startAudio() {
402 } 402 }
403 } 403 }
404 404
405 qDebug( "End of file" ); 405 // qDebug( "End of file" );
406 406
407 if ( !moreVideo && !moreAudio ) 407 if ( !moreVideo && !moreAudio )
408 emitPlayFinished = TRUE; 408 emitPlayFinished = TRUE;
@@ -416,7 +416,7 @@ void LoopControl::killTimers() {
416 if ( pthread_cancel(video_tid) == 0 ) { 416 if ( pthread_cancel(video_tid) == 0 ) {
417 void *thread_result = 0; 417 void *thread_result = 0;
418 if ( pthread_join(video_tid,&thread_result) != 0 ) 418 if ( pthread_join(video_tid,&thread_result) != 0 )
419 qDebug("thread join error 1"); 419 // qDebug("thread join error 1");
420 pthread_attr_destroy(&video_attr); 420 pthread_attr_destroy(&video_attr);
421 } 421 }
422 } 422 }
@@ -426,7 +426,7 @@ void LoopControl::killTimers() {
426 if ( pthread_cancel(audio_tid) == 0 ) { 426 if ( pthread_cancel(audio_tid) == 0 ) {
427 void *thread_result = 0; 427 void *thread_result = 0;
428 if ( pthread_join(audio_tid,&thread_result) != 0 ) 428 if ( pthread_join(audio_tid,&thread_result) != 0 )
429 qDebug("thread join error 2"); 429 // qDebug("thread join error 2");
430 pthread_attr_destroy(&audio_attr); 430 pthread_attr_destroy(&audio_attr);
431 } 431 }
432 } 432 }
@@ -513,7 +513,7 @@ bool LoopControl::init( const QString& filename ) {
513 stream = 0; // only play stream 0 for now 513 stream = 0; // only play stream 0 for now
514 current_frame = total_video_frames = total_audio_samples = 0; 514 current_frame = total_video_frames = total_audio_samples = 0;
515 515
516 qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() ); 516 // qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() );
517 517
518 // ### Hack to use libmpeg3plugin to get the number of audio samples if we are using the libmad plugin 518 // ### Hack to use libmpeg3plugin to get the number of audio samples if we are using the libmad plugin
519 if ( mediaPlayerState->curDecoder()->pluginName() == QString("LibMadPlugin") ) { 519 if ( mediaPlayerState->curDecoder()->pluginName() == QString("LibMadPlugin") ) {