i.instruction = I_SETCHANNEL;
i.channelIndex = index;
instructions.push(i);
+ logger->log("PlayerLiveRadio", Log::DEBUG, "posted setChannel instruction, now %i in queue", instructions.size());
threadSignalNoLock();
}
audio->setStreamType(Audio::MPEG2_PES);
audio->systemMuteOff();
audio->doMuting();
-// audio->sync();
audio->play();
audio->pause();
-
demuxer->reset();
-// demuxer->seek();
-
afeed.start();
state = newState;
state = newState;
return;
}
+ case S_PREBUFFERING:
+ {
+ vdr->stopStreaming();
+ clearStreamChunks();
+ afeed.stop();
+ audio->stop();
+ audio->reset();
+ audio->play();
+ audio->pause();
+ demuxer->reset();
+ afeed.start();
+
+ state = newState;
+ preBufferCount = 0;
+ return;
+ }
default:
{
logger->log("PlayerLiveRadio", Log::EMERG, "Thread called state %u to state %u which is not supported", state, newState);
}
case S_PREBUFFERING: // IS THIS HOW IT WORKS?
{
- /*
vdr->stopStreaming();
clearStreamChunks();
- vfeed.stop();
afeed.stop();
- video->stop();
- video->blank();
audio->stop();
- audio->unPause();
audio->reset();
-
- video->reset();
- video->sync();
- video->play();
- video->pause();
-
- audio->setStreamType(Audio::MPEG2_PES);
- audio->sync();
audio->play();
audio->pause();
-
demuxer->reset();
- demuxer->seek();
-
afeed.start();
- vfeed.start();
state = newState;
- preBufferCount = 0;
+ preBufferCount = 0;
return;
- */
}
default:
{
i = instructions.front();
if (i.instruction == I_SETCHANNEL)
{
+ logger->log("PlayerLiveRadio", Log::DEBUG, "Optimised out setch to %i", i.channelIndex);
instructions.pop(); // if this is the first of more than 1 command, currently it cannot possibly be relevant
}
else if (i.instruction == I_STOP)
{
while(!instructions.empty())
{
- if (instructions.size() > 1) optimizeInstructionQueue();
+ if (instructions.size() > 1)
+ {
+ logger->log("PlayerLiveRadio", Log::DEBUG, "Should optimise");
+ optimizeInstructionQueue();
+ }
struct PLInstruction i = instructions.front();
instructions.pop();