Minor changes to debug output, I was trying to track something down, actually

a problem in the OSS media node which also affects at least the ZETA 1.2
MediaPlayer on ZETA.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26143 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2008-06-26 22:41:30 +00:00
parent 992a8afd5d
commit 3b057d9fad
2 changed files with 11 additions and 5 deletions
@@ -370,6 +370,7 @@ PlaybackManager::SetCurrentFrame(int64 frame)
void
PlaybackManager::SetPlayMode(int32 mode, bool continuePlaying)
{
//printf("PlaybackManager::SetPlayMode(%ld, %d)\n", mode, continuePlaying);
PlayingState* newState = new PlayingState(*_LastState());
newState->play_mode = mode;
// Jump to the playing start frame if we should not continue, where we
@@ -603,6 +604,8 @@ PlaybackManager::PlaylistFrameAtFrame(int64 frame, int32& playingDirection,
result = _FrameForRangeFrame(state, index);
}
//TRACE("PlaybackManager::PlaylistFrameAtFrame() done: %lld\n", result);
//printf("PlaybackManager::PlaylistFrameAtFrame(%lld): %lld, direction: %ld\n",
// frame, result, playingDirection);
return result;
}
@@ -791,7 +794,7 @@ if (!info) {
else if (TimeForFrame(frame + 1) <= time)
frame++;
//TRACE("PlaybackManager::FrameForTime() done: %lld\n", frame);
//fprintf(stderr, "PlaybackManager::FrameForTime(%lld): %lld\n", time, frame);
//printf("PlaybackManager::FrameForTime(%lld): %lld\n", time, frame);
return frame;
}
@@ -1563,6 +1566,7 @@ PlaybackManager::_TimeForNextFrame() const
void
PlaybackManager::_CheckStopPlaying()
{
//printf("_CheckStopPlaying() - %lld, next: %lld\n", fStopPlayingFrame, NextFrame());
if (fStopPlayingFrame >= 0 && fStopPlayingFrame <= NextFrame()) {
StopPlaying();
NotifyStopFrameReached();
@@ -599,6 +599,7 @@ AudioProducer::HandleEvent(const media_timed_event* event, bigtime_t lateness,
if (RunState() != B_STARTED) {
fFramesSent = 0;
fStartTime = event->event_time;
printf("B_START: start time: %lld\n", fStartTime);
media_timed_event firstBufferEvent(fStartTime,
BTimedEventQueue::B_HANDLE_BUFFER);
EventQueue()->AddEvent(firstBufferEvent);
@@ -630,8 +631,7 @@ AudioProducer::HandleEvent(const media_timed_event* event, bigtime_t lateness,
& media_raw_audio_format::B_AUDIO_SIZE_MASK;
size_t nFrames = fOutput.format.u.raw_audio.buffer_size
/ (sampleSize
* fOutput.format.u.raw_audio.channel_count);
/ (sampleSize * fOutput.format.u.raw_audio.channel_count);
fFramesSent += nFrames;
bigtime_t nextEvent = fStartTime
@@ -640,6 +640,8 @@ AudioProducer::HandleEvent(const media_timed_event* event, bigtime_t lateness,
media_timed_event nextBufferEvent(nextEvent,
BTimedEventQueue::B_HANDLE_BUFFER);
EventQueue()->AddEvent(nextBufferEvent);
} else {
fprintf(stderr, "B_HANDLE_BUFFER, but not started!\n");
}
TRACE("AudioProducer::HandleEvent(B_HANDLE_BUFFER) done\n");
break;
@@ -692,7 +694,7 @@ AudioProducer::_FillNextBuffer(bigtime_t eventTime)
fOutput.format.u.raw_audio.buffer_size, BufferDuration());
if (!buffer) {
TRACE("AudioProducer::_FillNextBuffer() - no buffer\n");
ERROR("AudioProducer::_FillNextBuffer() - no buffer\n");
return NULL;
}
@@ -719,7 +721,7 @@ AudioProducer::_FillNextBuffer(bigtime_t eventTime)
if (!fSupplier || fSupplier->InitCheck() != B_OK
|| fSupplier->GetFrames(buffer->Data(), frameCount, startTime,
endTime) != B_OK) {
TRACE("AudioProducer::_FillNextBuffer() - error -> silence\n");
ERROR("AudioProducer::_FillNextBuffer() - supplier error -> silence\n");
memset(buffer->Data(), 0, buffer->SizeUsed());
}