// remote->getButtonPress to break
// locking the mutex ensures that the master thread is waiting on getButtonPress
+
pthread_mutex_lock(&masterLock);
MessageQueue::postMessage(m);
kill(mainPid, SIGURG);
pthread_mutex_unlock(&masterLock);
}
+void Command::postMessageNoLock(Message* m)
+{
+ // As above but use this one if this message is being posted because of a button press
+ // the mutex is already locked, locking around postMessage is not needed as the
+ // queue is guaranteed to be run when the button has been processed
+ MessageQueue::postMessage(m);
+}
+
bool Command::postMessageIfNotBusy(Message* m)
{
// This is for the timers module
}
else
{
- Video::getInstance()->signalOff();
viewman->removeAll();
+ Video::getInstance()->signalOff();
viewman->updateView(wallpaper);
VDR::getInstance()->configSave("General", "Last Power State", "Off");
void stop();
void doReboot();
void postMessage(Message* m); // override of MessageQueue::postMessage
+ void postMessageNoLock(Message* m); // override of MessageQueue::postMessage
bool postMessageIfNotBusy(Message* m); // for timers, when masterMutex might be locked
void sig1();
video->sync();
video->unPause();
video->sync();
-
// ------------------------ This one doesn't work, but it should, and would allow for prebuffering.
/*
-
threadStart();
- sleep(2);
+// sleep(1);
// struct timespec delay;
// delay.tv_sec = 1;
audio->play();
video->sync();
audio->sync();
+
+ video->pause();
+ usleep(500000); // SYNC
+ video->sync();
+ video->unPause();
+ video->sync();
*/
+
// ------------------------------------------------------------------------------------------------
playing = 1;
event->index = sl.addOption(tempString, first);
first = 0;
}
-
- // Reset the timer as it probably took 1-2 seconds to change the channel
- Timers::getInstance()->setTimer(this, 1, (struct timespec){4, 0});
}
+
+ // Reset the timer as it probably took 1-2 seconds to change the channel
+ Timers::getInstance()->setTimer(this, 1, (struct timespec){4, 0});
}
void VLiveBanner::draw()
sl.hintSetCurrent(saveIndex);
sl.hintSetTop(saveTop);
sl.draw();
+ doShowingBar();
}
void VRecordingList::draw()
// All static stuff done
drawData();
- sl.draw();
- doShowingBar();
}
void VRecordingList::doShowingBar()
{
Message* m = new Message(); // Must be done after this view deleted
m->message = Message::STANDBY;
- Command::getInstance()->postMessage(m);
+ Command::getInstance()->postMessageNoLock(m);
return 4;
}
case Remote::SIX:
{
Message* m = new Message(); // Must be done after this view deleted
m->message = Message::STANDBY;
- Command::getInstance()->postMessage(m);
+ Command::getInstance()->postMessageNoLock(m);
return 4;
}
else if (option == 5)