diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2004-11-01 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2004-11-01 18:00:00 +0100 |
commit | 3038be2a6a849e726d6fe99236d5dc61b679198f (patch) | |
tree | 9901f3dd92799de71853ed18faf8665f17e5cc79 /vdr.c | |
parent | 6f93a5f7819b3c7030a5b199e502bedd4eb7844c (diff) | |
download | vdr-patch-lnbsharing-3038be2a6a849e726d6fe99236d5dc61b679198f.tar.gz vdr-patch-lnbsharing-3038be2a6a849e726d6fe99236d5dc61b679198f.tar.bz2 |
Version 1.3.15vdr-1.3.15
- Fixed some typos in the Makefile's 'font' target (thanks to Uwe Hanke).
- Added more checks and polling when getting frontend events (based on a patch
from Werner Fink).
- No longer explicitly waiting for a tuner lock when switching channels
(apparently setting "live" PIDs before the tuner is locked doesn't hurt).
Moved the wait into cDevice::AttachReceiver() instead.
- Immediately displaying the new channel info when switching channel groups.
- Moved the main program loop variables further up to allow compilation with
older compiler versions (thanks to Marco Schlüßler for reporting this one).
- Now calling pthread_cond_broadcast() in the destructor of cCondWait and
cCondVar to make sure any sleepers will wake up (suggested by Werner Fink).
Also using pthread_cond_broadcast() instead of pthread_cond_signal() in
cCondWait, in case there is more than one sleeper.
- Making sure that timers and channels are only saved together, in a consistent
manner (thanks to Mirko Dölle for reporting a problem with inconsistent
channel and timer lists).
- Now handling the channel name, short name and provider separately. cChannel
therefore has two new functions, ShortName() and Provider(). ShortName()
can be used to display a short version of the name (in case such a version
is available). The optional boolean parameter of ShortName() can be set to
true to make it return the name, if no short name is available.
The sequence of 'name' and 'short name' in the channels.conf file has been
swapped (see man vdr(5)).
- Added the 'portal name' to cChannels (thanks to Marco Schlüßler).
- Fixed handling key codes that start with 0x1B in the KBD remote control code.
- Now using qsort() to sort cListBase lists. For this, the virtual function
cListObject::operator<() has been replaced with cListObject::Compare().
Plugins that implement derived cListObject classes may need to adjust their
code.
- The "Channels" menu can now be sorted "by number" (default), "by name" and
"by provider". While in the "Channels" menu, pressing the '0' key switches
through these modes.
- Fixed the buffer size in cRecording::SortName().
- Now displaying the name of the remote control for which the keys are being
learned inside the menu to avoid overwriting the date/time in the 'classic'
skin (thanks to Oliver Endriss for reporting this one).
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 38 |
1 files changed, 21 insertions, 17 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 1.190 2004/10/24 14:01:11 kls Exp $ + * $Id: vdr.c 1.192 2004/10/31 10:17:23 kls Exp $ */ #include <getopt.h> @@ -347,6 +347,21 @@ int main(int argc, char *argv[]) isyslog("VDR version %s started", VDRVERSION); + // Main program loop variables - need to be here to have them initialized before any EXIT(): + + cOsdObject *Menu = NULL; + cOsdObject *Temp = NULL; + int LastChannel = -1; + int LastTimerChannel = -1; + int PreviousChannel[2] = { 1, 1 }; + int PreviousChannelIndex = 0; + time_t LastChannelChanged = time(NULL); + time_t LastActivity = 0; + int MaxLatencyTime = 0; + bool ForceShutdown = false; + bool UserShutdown = false; + bool TimerInVpsMargin = false; + // Load plugins: if (!PluginManager.LoadPlugins(true)) @@ -490,19 +505,6 @@ int main(int argc, char *argv[]) // Main program loop: - static cOsdObject *Menu = NULL; - static cOsdObject *Temp = NULL; - static int LastChannel = -1; - static int LastTimerChannel = -1; - static int PreviousChannel[2] = { 1, 1 }; - static int PreviousChannelIndex = 0; - static time_t LastChannelChanged = time(NULL); - static time_t LastActivity = 0; - static int MaxLatencyTime = 0; - static bool ForceShutdown = false; - static bool UserShutdown = false; - static bool TimerInVpsMargin = false; - while (!Interrupted) { // Handle emergency exits: if (cThread::EmergencyExit()) { @@ -538,11 +540,13 @@ int main(int argc, char *argv[]) dsyslog("max. latency time %d seconds", MaxLatencyTime); } } - // Handle channel modifications: - if (!Channels.BeingEdited()) { + // Handle channel and timer modifications: + if (!Channels.BeingEdited() && !Timers.BeingEdited()) { int modified = Channels.Modified(); static time_t ChannelSaveTimeout = 0; - if (modified == CHANNELSMOD_USER) + // Channels and timers need to be stored in a consistent manner, + // therefore if one of them is changed, we save both. + if (modified == CHANNELSMOD_USER || Timers.Modified()) ChannelSaveTimeout = 1; // triggers an immediate save else if (modified && !ChannelSaveTimeout) ChannelSaveTimeout = time(NULL) + CHANNELSAVEDELTA; |