]> git.vomp.tv Git - vompclient.git/commitdiff
Fixed a few bugs. Standby off main menu, video off signal, numbers after del r0-1-0
authorChris Tallon <chris@vomp.tv>
Sat, 17 Dec 2005 18:07:09 +0000 (18:07 +0000)
committerChris Tallon <chris@vomp.tv>
Sat, 17 Dec 2005 18:07:09 +0000 (18:07 +0000)
on recordings list

command.cc
command.h
playervideo.cc
vlivebanner.cc
vrecordinglist.cc
vwelcome.cc

index 23e332374bac86beab1c7cd56b8877866a930a9c..815309abcea916b46a0d3b18cdd64a665a4d1d63 100644 (file)
@@ -154,12 +154,21 @@ void Command::postMessage(Message* m)
   // 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
@@ -286,8 +295,8 @@ void Command::doStandby()
   }
   else
   {
-    Video::getInstance()->signalOff();
     viewman->removeAll();
+    Video::getInstance()->signalOff();
     viewman->updateView(wallpaper);
 
     VDR::getInstance()->configSave("General", "Last Power State", "Off");
index 2da9f7812440cab76ae19fcc9b5765d1d2e03085..13db4e25ea12780b92abdea4fadb771d57c75fe0 100644 (file)
--- a/command.h
+++ b/command.h
@@ -68,6 +68,7 @@ class Command : public MessageQueue
     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();
 
index a0e572abb76c4b69db4ff29afe0ea56aaf9b41a6..5c6d71de9b3ba8f8265e5b41a6adc6d5d101f76d 100644 (file)
@@ -195,13 +195,11 @@ int PlayerVideo::play()
   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;
@@ -214,7 +212,14 @@ int PlayerVideo::play()
   audio->play();
   video->sync();
   audio->sync();
+
+  video->pause();
+      usleep(500000); // SYNC
+  video->sync();
+  video->unPause();
+  video->sync();
 */
+
 // ------------------------------------------------------------------------------------------------
 
   playing = 1;
index 9323b74bd3282372a02f95f0720829c5b1d3784d..1ca5a9fb0eb852aff8f13cd729598fb1187b3705 100644 (file)
@@ -125,10 +125,10 @@ void VLiveBanner::setChannel(Channel* tChannel)
       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()
index f7bc4856989fad7488115b9924efd51a741cc232..452876aa366ee55d945a0f85f52946433d75fd2b 100644 (file)
@@ -120,6 +120,7 @@ void VRecordingList::drawData()
   sl.hintSetCurrent(saveIndex);
   sl.hintSetTop(saveTop);
   sl.draw();
+  doShowingBar();
 }
 
 void VRecordingList::draw()
@@ -172,8 +173,6 @@ void VRecordingList::draw()
   // All static stuff done
 
   drawData();
-  sl.draw();
-  doShowingBar();
 }
 
 void VRecordingList::doShowingBar()
index a06520654dcfc4d32bb08d0405f12d731e4a49da..5208f61d19d2c7461a87e944aab4ba3cf29cf5ab 100644 (file)
@@ -149,7 +149,7 @@ int VWelcome::handleCommand(int command)
     {
       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:
@@ -183,7 +183,7 @@ int VWelcome::handleCommand(int command)
       {
         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)