Re: [vdr] [patch] channels with same pids+channels update
Am Samstag 12 April 2008 schrieb Udo Richter: Peter Evertz wrote: I am very interested in this feature. My providers (astra/hotbird) are smart enough not to send not to much garbage, but deleting of unused channels is really a pain. I am at 4500 Channels in my channels.conf and I am pretty sure that at least 30 % of them are long gone. I'm using a (not yet published) small patch and a (also not yet published) plugin to keep track of channels: The patch keeps a time stamp whenever a channel announcement is seen, and the plugin tracks the first-seen and last-seen time of all channels Is this timestamp stored in the channels.conf? If so, what about compatibility? If there's interest in this, I can publish these two. Yes, i would be interested. Please post it. regards, Thiemo ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] SetPlayMode() on radio channels
Am Freitag, 26. Januar 2007 15:32 schrieb Klaus Schmidinger: Thiemo wrote: Hi, is there a special reason that SetPlayMode() is always called with pmAudioVideo even on radio channels instead of pmAudioOnly or pmAudioOnlyBlack? It would make things much easier if it would do so (for displaying a background image). Can you give me a hint where I could change this? pmAudioVideo is the default play mode for VDR, and by itself VDR doesn't use anything else. This was introduced in case a plugin wants to implement a player that needs a different play mode. When replaying a recording, VDR sets up a cDvbPlayerControl in maybe you got me wrong - i don't want this for replaying a recording but for live-broadcasts. (although replaying is an issue i did not think about yet). currently its realy a pain finding out if a stream is audio-only or not in the mpeg-player (where it does not belong imho). t. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] SetPlayMode() on radio channels
Am Mittwoch, 31. Januar 2007 17:05 schrieb Laz: currently its realy a pain finding out if a stream is audio-only or not in the mpeg-player (where it does not belong imho). What would be nice is something like bool cRecording::IsRadio(). Why reinventing the wheel if pmAudioOnly is already there? Even more, one could already either set pmAudioOnly or pmAudioOnlyBlack depending if the mpeg-player should or should not show a background picture (i.e. for the mp3 pi which shows its own backgrounds) this won't be possible with the bool solution... t. ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] [vdr bug]Shutdown during an active timer is broken
Am Samstag, 9. Dezember 2006 17:48 schrieb Udo Richter: Thiemo wrote: So here is my solution: - if a recording is running and User presses Power tell him the box will shutdown after the current recording - If he presses Power a second time, ask if he realy wants to do this (like before) *and* stop any running recordings (i reused the code from Udo which work very well, thanks) I agree that the shutdown-not-confirmed state should be more visible to users by some message that VDR is just waiting for background tasks to complete before shutdown. A solution I thought of was to put up a message after not confirming shutdown that VDR will shut down as soon as whatever is done - maybe even keeping that message on screen all the time. The idea of pressing power button twice is also nice, though it will confuse scripts that send power key presses. No it won't. VDR still remembers the shutdown-after-recording-state with my changes. The only difference here is that the user is told whats going on. A script never knows if it has to confirm the kPower or not (except if you would parse the timers to see if one is running). So if a script wants to shutdown vdr regardless of its state (i.e. for some maintenance ;) ) then sending kPower via svdrp isn't the right action at all. (one should use killall -1 vdr or similar and prevent vdr from starting up again). Plus, effectively, while you currently confirm shutdown with power, ok, you now confirm with power, power. And together with the other numerous reasons for not shutting down, this gets confusing: Use power button to override running timers, and use ok button to override timers in a few minutes? No, you still confirm with Ok, theres just one additional step before. I suggest you try it out - thats easier than describing it here. - if a timer is pending within MinEventTimeout ask if he really wants to do so but do *not* modify any timers or wakeup times. So you *do* want running timers to be disabled, but *not* want to ignore timers in a few minutes? exactly. If you would alter a timer (or the wakeuptime whats the same in the end) you would have to give a clear warning Your timers will be shifted by xx minutes. Are you sure. But as i wrote in the previous post, it's not a good idea to alter a timer at all. I think it's the task of whoever adopts vdr to a mainboard or box to program a valid wakeup time, not the vdr itself. Then we can also go back to what it was before, leave all timers alone and report wakeup in -30 minutes to the shutdown script. In the end it doesn't matter if any timers are running when VDR is killed. No, it's an improvement to what is was before. Users treat negative times as bugs. (And it *is* a bug to ask recording in -x min instead of a recording is active) Tim ___ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Re: [vdr] Parameter --manual-start/--timer-start (was: vdr shutdown handling / streamdev plugin)
Am Samstag, 2. Dezember 2006 16:24 schrieb Matthias Schwarzott: To manual start check I have another idea. Perhaps vdr can get a parameter for setting explicitly manual-start or start based on timer. Then the startskript could check the time that was written into nvram/acpi/wherever and tell vdr if start was manual or not. Matthias The attached patch does what you suggest, but I don't see any correlation to the shutdown behaviour of plugins... Tim diff -Nur vdr-1.4.0-pl8/vdr.c vdr-1.4.0/vdr.c --- vdr-1.4.0-pl8/vdr.c 2006-06-07 15:04:35.0 +0200 +++ vdr-1.4.0/vdr.c 2006-06-07 16:43:31.0 +0200 @@ -188,6 +188,8 @@ int WatchdogTimeout = DEFAULTWATCHDOG; const char *Terminal = NULL; const char *Shutdown = NULL; + bool TimerWakeup = false; + bool AutoShutdown = false; bool UseKbd = true; const char *LircDevice = NULL; @@ -230,6 +232,7 @@ { record, required_argument, NULL, 'r' }, { shutdown, required_argument, NULL, 's' }, { terminal, required_argument, NULL, 't' }, + { timerwakeup, no_argument,NULL, 'T' }, { user, required_argument, NULL, 'u' }, { version, no_argument, NULL, 'V' }, { vfat, no_argument, NULL, 'v' | 0x100 }, @@ -239,7 +242,7 @@ }; int c; - while ((c = getopt_long(argc, argv, a:c:dD:E:g:hk:l:L:mp:P:r:s:t:u:v:Vw:, long_options, NULL)) != -1) { + while ((c = getopt_long(argc, argv, a:c:dD:E:g:hk:l:L:mp:P:r:s:t:Tu:v:Vw:, long_options, NULL)) != -1) { switch (c) { case 'a': AudioCommand = optarg; break; @@ -330,6 +333,8 @@ case 'u': if (*optarg) VdrUser = optarg; break; + case 'T': TimerWakeup = true; +break; case 'V': DisplayVersion = true; break; case 'v' | 0x100: @@ -521,6 +526,7 @@ int LastTimerChannel = -1; int PreviousChannel[2] = { 1, 1 }; int PreviousChannelIndex = 0; + time_t vdrStartTime = time(NULL); time_t LastChannelChanged = time(NULL); time_t LastActivity = 0; time_t LastCamMenu = 0; @@ -772,6 +778,14 @@ if (time(NULL) - LastChannelChanged = Setup.ZapTimeout LastChannel != PreviousChannel[PreviousChannelIndex]) PreviousChannel[PreviousChannelIndex ^= 1] = LastChannel; // Timers and Recordings: +if (TimerWakeup Shutdown time(NULL) - vdrStartTime SHUTDOWNWAIT) { + if (LastActivity == 0) { + LastActivity = 1; + AutoShutdown = true; + } + else if (LastActivity != 1) + AutoShutdown = false; + } if (!Timers.BeingEdited()) { // Assign events to timers: Timers.SetEvents(); @@ -1037,7 +1051,7 @@ cTimer *timer = Timers.GetNextActiveTimer(); time_t Next = timer ? timer-StartTime() : 0; time_t Delta = timer ? Next - time(NULL) : 0; - if (Next Delta = Setup.MinEventTimeout * 60) { + if (Next Delta = Setup.MinEventTimeout * 60 !AutoShutdown) { char *buf; asprintf(buf, tr(Recording in %ld minutes, shut down anyway?), Delta / 60); bool confirm = Interface-Confirm(buf); @@ -1167,7 +1181,7 @@ Skins.Message(mtInfo, tr(Editing process finished)); } } -if (!Interact ((!cRecordControls::Active() !cCutter::Active() !cPluginManager::Active() (!Interface-HasSVDRPConnection() || UserShutdown)) || ForceShutdown)) { +if (!Interact ((!cRecordControls::Active() !cCutter::Active() !cPluginManager::Active() (!Interface-HasSVDRPConnection() || UserShutdown || AutoShutdown)) || ForceShutdown)) { time_t Now = time(NULL); if (Now - LastActivity ACTIVITYTIMEOUT) { // Shutdown: @@ -1185,13 +1199,14 @@ else LastActivity = 1; } - if (!Next || Delta Setup.MinEventTimeout * 60 || ForceShutdown) { + if (!Next || Delta Setup.MinEventTimeout * 60 || ForceShutdown || (AutoShutdown Delta Setup.MinEventTimeout * 60)) { ForceShutdown = false; +AutoShutdown = false; if (timer) dsyslog(next timer event at %s, *TimeToString(Next)); if (WatchdogTimeout 0) signal(SIGALRM, SIG_IGN); -if (Interface-Confirm(tr(Press any key to cancel shutdown), UserShutdown ? 5 : SHUTDOWNWAIT, true)) { +if (Interface-Confirm(tr(Press any key to cancel shutdown), UserShutdown ? 1 : SHUTDOWNWAIT, true)) { cControl::Shutdown(); int Channel = timer ? timer-Channel()-Number() : 0; const char *File = timer ?
[vdr] [PATCH] Fix EPG for UPC direct
UPC is a provider for middle european countries (Czechia, Hungary and Poland). They use iso6937-2 for encoding their EPG data so this looks quite strange in the vdr. The applied patch does a remapping to iso8859-2 so that characters are displayed correct. (Currently only tested with Czech and Hungarian, but should also work for Polish) While testing this with the help of an hungarian user, i also found out that the the codepage for Hungary must be 8859-2, not -1. The patch is work by Helmut Auer. cheers, Tim --- vdr-1.4.4-vanilla/epg.c 2006-10-28 11:12:42.0 +0200 +++ vdr-1.4/epg.c 2006-11-28 12:39:33.0 +0100 @@ -18,6 +18,165 @@ #define RUNNINGSTATUSTIMEOUT 30 // seconds before the running status is considered unknown +// UPC Direct / HBO strange two-character encoding. 0xC2 means acute, 0xCF caron. +// many thanks to the czechs who helped me while solving this. +void checkUPC( char *str ) +{ + char *s1 = str; + char *s2 = str; + char nc; + + if (!str) + return; + + while (*s1 != '\0') { + nc = *s1; + switch (*s1) { + case 0xC2: // acute: á é í ó ú ý +s1++; +switch (*s1) { + case 'A': nc = (char)0xC1; + break; + case 'a': nc = (char)0xE1; + break; + case 'E': nc = (char)0xC9; + break; + case 'e': nc = (char)0xE9; + break; + case 'I': nc = (char)0xCD; + break; + case 'i': nc = (char)0xED; + break; + case 'O': nc = (char)0xD3; + break; + case 'o': nc = (char)0xF3; + break; + case 'U': nc = (char)0xDA; + break; + case 'u': nc = (char)0xFA; + break; + case 'Y': nc = (char)0xDD; + break; + case 'y': nc = (char)0xFD; + break; + default: + s1--; + break; +} + break; + case 0xC6: +s1++; +switch (*s1) { + case 'S': nc = (char)0xA9; + break; + case 's': nc = (char)0xB9; + break; + default: + s1--; + break; +} +break; + case 0xC8: +s1++; +switch (*s1) { + case 'A': nc = (char)0xC4; + break; + case 'a': nc = (char)0xE4; + break; + case 'O': nc = (char)0xD6; + break; + case 'o': nc = (char)0xF6; + break; + case 'U': nc = (char)0xDC; + break; + case 'u': nc = (char)0xFC; + break; + default: + s1--; + break; +} +break; + case 0xCA: // krouzek http://de.wikipedia.org/wiki/Krouzek +s1++; +switch (*s1) { + case 'U': nc = (char)0xD9; + break; + case 'u': nc = (char)0xF9; + break; + default: + s1--; + break; +} +break; + case 0xCD: +s1++; +switch (*s1) { + case 'O': nc = (char)0xD5; + break; + case 'o': nc = (char)0xF5; + break; + case 'U': nc = (char)0xDB; + break; + case 'u': nc = (char)0xFB; + break; + default: + s1--; + break; +} +break; + case 0xCF: // caron +s1++; +switch (*s1) { + case 'C': nc = (char)0xC8; + break; + case 'c': nc = (char)0xE8; + break; + case 'D': nc = (char)0xCF; + break; + case 'd': nc = (char)0xEF; + break; + case 'E': nc = (char)0xCC; + break; + case 'e': nc = (char)0xEC; + break; + case 'L': nc = (char)0xC5;// not sure if they really exist. + break; + case 'l': nc = (char)0xE5; + break; + case 'N': nc = (char)0xD2; + break; + case 'n': nc = (char)0xF2; + break; + case 'R': nc = (char)0xD8; + break; + case 'r': nc = (char)0xF8; + break; + case 'S': nc = (char)0xA9; + break; + case 's': nc = (char)0xB9; + break; + case 'T': nc = (char)0xAB; +