mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 1.3.40
- Fixed a second place where a message should be given when an instant recording is started (reported by Jesus Bravo Alvarez). - Modified logging so that even on NPTL systems each line in the log file shows the individual thread's pid (based on a suggestion from Francois-Xavier Kowalski). - Fixed a problem with @plugin in keymacros.conf in case the named plugin is not loaded (reported by Franz Gangkofer). - Fixed a crash after executing the SVDRP command CLRE, caused by dangling 'schedule' pointers from cChannel objects (reported by Malte Schröder). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Improved NULL checking in strreplace(). - Fixed a crash in the Schedule menu with events that have no title (reported by Rolf Ahrenberg). cEvent::FixEpgBugs() now assigns a "No title" string to events that have no title. - Updated the Estonian OSD texts (thanks to Arthur Konovalov). - Recordings are now only started if there is at least 300MB free disk space (suggested by Markus Hahn). - When entering text via the numeric keys, the cursor now automatically advances (based on a patch from Rolf Ahrenberg). - Updated the Polish OSD texts and the fontosd-iso8859-2.c file (thanks to Jaroslaw Swierczynski). - Disabled the "buffer reserve" in Transfer Mode. Last chance to complain if you really need it - it will be completely removed in the next version. If you are experiencing problems with a/v running out of sync, try the latest driver and firmware (if you are using a full featured DVB card). - Switching channels with the Up/Down or Channel+/Channel- keys now works a lot faster when the repeat function kicks in, by not actually switching the channel every time, but rather only displaying the channel info and doing the final switch when the key is released. - The channel display is now updated _before_ the channel is switched. - Added a missing initialization of 'timeout' in the cDisplayChannel constructor. - Fixed detecting if there can be any useful further input when entering channel numbers (thanks to Thomas Bergwinkl). - Updated the Spanish OSD texts (thanks to Jesus Bravo Alvarez). - Fixed handling the '0' key for switching between the last two channels (thanks to Thomas Bergwinkl).
This commit is contained in:
parent
78e3da813c
commit
446b0e8e0b
30
CONTRIBUTORS
30
CONTRIBUTORS
@ -936,6 +936,9 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
|
||||
for reporting a bug in handling key macros with keys after @plugin
|
||||
for adding compiler options "-fPIC -g" to all plugins
|
||||
for adding a leading '0' to the day in the DayDateTime() function
|
||||
for reporting a crash in the Schedule menu with events that have no title
|
||||
for a patch that was used to implement automatic cursor advance when entering text
|
||||
via the numeric keys
|
||||
|
||||
Ralf Klueber <ralf.klueber@vodafone.com>
|
||||
for reporting a bug in cutting a recording if there is only a single editing mark
|
||||
@ -1154,11 +1157,14 @@ Andreas Regel <andreas.regel@gmx.de>
|
||||
for reporting a problem with messages when a cOsdObject uses the raw OSD
|
||||
for implementing palette replace mode in the OSD bitmaps
|
||||
|
||||
Thomas Bergwinkl <Thomas.Bergwinkl@t-online.de>
|
||||
Thomas Bergwinkl <Thomas.Bergwinkl@vr-web.de>
|
||||
for fixing the validity check for channel IDs, because some providers use TIDs
|
||||
with value 0
|
||||
for pointing out that transponder handling didn't work with satellites that provide
|
||||
two transponders on the same frequency, with different polarization
|
||||
for fixing detecting if there can be any useful further input when entering channel
|
||||
numbers
|
||||
for fixing handling the '0' key for switching between the last two channels
|
||||
|
||||
Stéphane Esté-Gracias <sestegra@free.fr>
|
||||
for fixing a typo in libsi/si.h
|
||||
@ -1655,3 +1661,25 @@ Andr
|
||||
Jürgen Schilling <juergen_schilling@web.de>
|
||||
for reporting that color buttons were displayed in the recording info menu if it
|
||||
has been invoked from a player
|
||||
|
||||
Jesus Bravo Alvarez <jba@pobox.com>
|
||||
for reporting a second place where a message should be given when an instant
|
||||
recording is started
|
||||
for updating the Spanish OSD texts
|
||||
|
||||
Francois-Xavier Kowalski <francois-xavier.kowalski@hp.com>
|
||||
for suggesting how to modify logging so that even on NPTL systems each line in
|
||||
the log file shows the individual thread's pid
|
||||
|
||||
Franz Gangkofer <Franz.Gangkofer@cadsoft.de>
|
||||
for reporting a problem with @plugin in keymacros.conf in case the named plugin
|
||||
is not loaded
|
||||
|
||||
Malte Schröder <MalteSch@gmx.de>
|
||||
for reporting a crash after executing the SVDRP command CLRE
|
||||
|
||||
Markus Hahn <mhahn@reel-multimedia.com>
|
||||
for suggesting to only start recordings if there is at least 300MB free disk space
|
||||
|
||||
Jaroslaw Swierczynski <swiergot@gmail.com>
|
||||
for updating the Polish OSD texts and the fontosd-iso8859-2.c file
|
||||
|
38
HISTORY
38
HISTORY
@ -4189,3 +4189,41 @@ Video Disk Recorder Revision History
|
||||
Ahrenberg).
|
||||
- No longer displaying color buttons in the recording info menu if it has been
|
||||
invoked from a player (reported by Jürgen Schilling).
|
||||
|
||||
2006-01-22: Version 1.3.40
|
||||
|
||||
- Fixed a second place where a message should be given when an instant recording
|
||||
is started (reported by Jesus Bravo Alvarez).
|
||||
- Modified logging so that even on NPTL systems each line in the log file shows
|
||||
the individual thread's pid (based on a suggestion from Francois-Xavier Kowalski).
|
||||
- Fixed a problem with @plugin in keymacros.conf in case the named plugin is not
|
||||
loaded (reported by Franz Gangkofer).
|
||||
- Fixed a crash after executing the SVDRP command CLRE, caused by dangling 'schedule'
|
||||
pointers from cChannel objects (reported by Malte Schröder).
|
||||
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||
- Improved NULL checking in strreplace().
|
||||
- Fixed a crash in the Schedule menu with events that have no title (reported by
|
||||
Rolf Ahrenberg). cEvent::FixEpgBugs() now assigns a "No title" string to events
|
||||
that have no title.
|
||||
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
|
||||
- Recordings are now only started if there is at least 300MB free disk space
|
||||
(suggested by Markus Hahn).
|
||||
- When entering text via the numeric keys, the cursor now automatically advances
|
||||
(based on a patch from Rolf Ahrenberg).
|
||||
- Updated the Polish OSD texts and the fontosd-iso8859-2.c file (thanks to Jaroslaw
|
||||
Swierczynski).
|
||||
- Disabled the "buffer reserve" in Transfer Mode. Last chance to complain if you
|
||||
really need it - it will be completely removed in the next version. If you are
|
||||
experiencing problems with a/v running out of sync, try the latest driver and
|
||||
firmware (if you are using a full featured DVB card).
|
||||
- Switching channels with the Up/Down or Channel+/Channel- keys now works a lot
|
||||
faster when the repeat function kicks in, by not actually switching the
|
||||
channel every time, but rather only displaying the channel info and doing
|
||||
the final switch when the key is released.
|
||||
- The channel display is now updated _before_ the channel is switched.
|
||||
- Added a missing initialization of 'timeout' in the cDisplayChannel constructor.
|
||||
- Fixed detecting if there can be any useful further input when entering channel
|
||||
numbers (thanks to Thomas Bergwinkl).
|
||||
- Updated the Spanish OSD texts (thanks to Jesus Bravo Alvarez).
|
||||
- Fixed handling the '0' key for switching between the last two channels (thanks
|
||||
to Thomas Bergwinkl).
|
||||
|
@ -23,7 +23,7 @@ Super RTL,S RTL;RTL World:12187:hC34:S19.2E:27500:165:120=deu:65:0:12040:1:1089:
|
||||
VOX;RTL World:12187:hC34:S19.2E:27500:167:136=deu:71:0:12060:1:1089:0
|
||||
KABEL1;ProSiebenSat.1:12480:vC34:S19.2E:27500:511:512=deu:33:0:899:133:33:0
|
||||
DAS VIERTE,D VIERTE;BetaDigital:12460:hC34:S19.2E:27500:2047:2048=deu:36:0:1793:133:5:0
|
||||
NEUN LIVE Television,NEUN LIVE;BetaDigital:12480:vC34:S19.2E:27500:767:768=deu:35:0:897:133:33:0
|
||||
9Live;BetaDigital:12480:vC34:S19.2E:27500:767:768=deu:35:0:897:133:33:0
|
||||
DSF;BetaDigital:12480:vC34:S19.2E:27500:1023:1024=deu:39:0:900:133:33:0
|
||||
HSE24,HSE24;BetaDigital:12480:vC34:S19.2E:27500:1279:1280=deu:37:0:40:133:33:0
|
||||
Bloomberg TV Germany;Bloomberg:12551:vC56:S19.2E:22000:162:99=deu:0:0:12160:1:1108:0
|
||||
@ -46,7 +46,7 @@ rbb Berlin;ARD:12109:hC34:S19.2E:27500:601:602=deu:604:0:28206:1:1073:0
|
||||
:Premiere World
|
||||
PREMIERE START,START;PREMIERE:11797:hC34:S19.2E:27500:255:256=deu:32:1801,1722,1702:8:133:2:0
|
||||
PREMIERE 1,PREM 1;PREMIERE:11797:hC34:S19.2E:27500:511:512=deu;515=deu:32:1801,1722,1702:10:133:2:0
|
||||
PREMIERE 2,PREM 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu,1793=deu;1795=deu:32:1801,1722,1702:11:133:2:0
|
||||
PREMIERE 2,PREM 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu;1795=deu:32:1801,1722,1702:11:133:2:0
|
||||
PREMIERE 3,PREM 3;PREMIERE:11797:hC34:S19.2E:27500:2303:2304=deu,2305=deu:32:1722,1702,1801:43:133:2:0
|
||||
PREMIERE 4,PREM 4;PREMIERE:11797:hC34:S19.2E:27500:767:768=deu,769=deu:32:1801,1722,1702:9:133:2:0
|
||||
PREMIERE 5,PREM 5;PREMIERE:11797:hC34:S19.2E:27500:1279:1280=deu:32:1722,1702,1801:29:133:2:0
|
||||
@ -65,6 +65,7 @@ PREMIERE WIN,WIN;PREMIERE:12031:hC34:S19.2E:27500:3839:3840=deu:33:0:27:133:4:0
|
||||
N24;ProSiebenSat.1:12480:vC34:S19.2E:27500:2047:2048=deu:36:0:47:133:33:0
|
||||
LibertyTV FR;LibertyTV.com:12610:vC56:S19.2E:22000:941:943=deu:0:0:12199:1:1112:0
|
||||
:-
|
||||
münchen.TV/RFO,müTV/RFO;BetaDigital:12148:hC34:S19.2E:27500:495:496=deu:0:0:658:133:7:0
|
||||
ProSieben Austria;ProSiebenSat.1:12051:vC34:S19.2E:27500:161:84=deu;85=deu:36:0:20002:1:1082:0
|
||||
Kabel 1 Schweiz;ProSiebenSat.1:12051:vC34:S19.2E:27500:162:163=deu:165:0:20003:1:1082:0
|
||||
Kabel 1 Austria;ProSiebenSat.1:12051:vC34:S19.2E:27500:166:167=deu:169:0:20004:1:1082:0
|
||||
@ -83,10 +84,26 @@ RTL TELE Letzebuerg:12551:vC56:S19.2E:22000:168:144=eng,146=fra,151=ltz:74:0:399
|
||||
Nick/Talpa;CANALDIGITAAL:12574:hC56:S19.2E:22000:512+8190:84=dut:33:622,100:5010:53:1109:0
|
||||
NICK;MTV Networks:12226:hC34:S19.2E:27500:513+8190:661=deu:577:0:28640:1:1091:0
|
||||
MTV Central;MTV Networks:11739:vC34:S19.2E:27500:3031:3032:3034:0:28653:1:1066:0
|
||||
VIVA;VIVA Fernsehen GmbH & Co. KG:12669:vC56:S19.2E:22000:309:310=deu:311:0:12732:1:1116:0
|
||||
VIVA PLUS;VIVA Fernsehen GmbH & Co. KG:12551:vC56:S19.2E:22000:171:172=deu:173:0:12120:1:1108:0
|
||||
VIVA;MTV Networks:11973:vC34:S19.2E:27500:4061+8190:4062:4064:0:28676:1:1078:0
|
||||
VIVA PLUS;MTV Networks:11973:vC34:S19.2E:27500:4071+8190:4072:4074:0:28677:1:1078:0
|
||||
QVC Deutschland;QVC:12551:vC56:S19.2E:22000:165:166:167:0:12100:1:1108:0
|
||||
TELE 5;BetaDigital:12480:vC34:S19.2E:27500:1535:1536=deu:38:0:51:133:33:0
|
||||
:NTSC
|
||||
Venevision;T-Systems/MTI:11200:vC56:S13.0E:27500:922:923=und:0:0:4750:0:13400:0
|
||||
EBC.1;T-Systems/MTI:11200:vC56:S13.0E:27500:373:374=eng:0:0:4747:0:13400:0
|
||||
:HDTV
|
||||
HDFORUM;TF1:11242:vC34:S13.0E:27500:33:36=fra:0:0:13809:100:200:0
|
||||
HDFORUM;TF1:11242:vC34:S13.0E:27500:33:36=fra:0:0:13809:318:200:0
|
||||
Euro1080 HD-5;Euro1080:10758:vC78:S23.5E:22000:34:160=eng:0:0:1085:9999:3104:0
|
||||
Euro1080;EURO1080:12168:vC56:S19.2E:27500:308:256:0:0:21100:1:1088:0
|
||||
SMD HD;SES ASTRA:12699:vC56:S19.2E:22000:133+80:234=eng:0:0:29700:0:0:0
|
||||
SMD HD:12699:V:S19.2E:22000:133:234=eng:0:0:3231:1:1118:0
|
||||
Astra HD:12441:vC34:S19.2E:27500:133+80:134=eng:0:0:29700:0:0:0
|
||||
TV HD;CSAT:12581:vC56:S19.2E:22000:165:100=fra;101=fra:0:0:9306:1:1110:0
|
||||
C M HD;Telenor:11261:hC78:S1.0W:24500:517:660=eng;661=eng:0:B00:3306:70:33:0
|
||||
C MORE HD;Telenor:11389:hC78:S1.0W:24500:512:640;641=eng:0:B00:3306:70:34:0
|
||||
HELLAS-HDTV;Scopus Network Technologies:11642:hC34:S13.0E:27500:2201:2211=ell,2212=eng:0:0:2200:318:15700:0
|
||||
TPS Star:10757:vC34:S13.0E:27500:420:430=fra,431=eng:440:500,100:1204:176:11200:0
|
||||
:@201 Sky
|
||||
Sky One;BSkyB:12226:hC23:S28.2E:27500:515+8190:643=eng:579:960,961:4705:2:2027:0
|
||||
Sky Two;BSkyB:12226:hC23:S28.2E:27500:514+8190:642=eng,662=NAR:578:960,961:5104:2:2027:0
|
||||
@ -115,10 +132,6 @@ S1T;BSkyB:12285:vC23:S28.2E:27500:513+8190:641=eng,661=NAR:577:960,961:4409:2:20
|
||||
CNN;BSkyB:12051:vC23:S28.2E:27500:2313:2315=eng:2314:0:7140:2:2018:0
|
||||
BBC PARL'MNT;BSkyB:10847:vC56:S28.2E:22000:2327:2328=eng:2331:0:6902:2:2050:0
|
||||
IGLESIA MME;T-Systems/MTI:11200:vC56:S13.0E:27500:4097:4098:0:0:4733:318:13400:0
|
||||
Euro1080 HD-5;Euro1080:10758:vC78:S23.5E:22000:34:160=eng:0:0:1085:9999:3104:0
|
||||
Euro1080;EURO1080:12168:vC56:S19.2E:27500:308:256:0:0:21100:1:1088:0
|
||||
SMD HD;SES ASTRA:12699:vC56:S19.2E:22000:133+80:234=eng:0:0:29700:0:0:0
|
||||
Astra HD:12441:vC34:S19.2E:27500:133+80:134=eng:0:0:29700:0:0:0
|
||||
eng-WRN-multi;WRN:12597:vC34:S13.0E:27500:0:2132:0:0:8230:318:9400:0
|
||||
Challenger Tv;Telespazio:11304:hC34:S13.0E:27500:490:491:0:0:8409:318:500:0
|
||||
TVS Teleport Bonn;DMV:11535:vC34:S1.0W:5632:308+8190:256=eng,257=eng:0:3:1:65535:1:0
|
||||
|
6
config.h
6
config.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: config.h 1.240 2006/01/13 15:17:19 kls Exp $
|
||||
* $Id: config.h 1.241 2006/01/15 16:01:48 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
@ -19,8 +19,8 @@
|
||||
#include "i18n.h"
|
||||
#include "tools.h"
|
||||
|
||||
#define VDRVERSION "1.3.39"
|
||||
#define VDRVERSNUM 10339 // Version * 10000 + Major * 100 + Minor
|
||||
#define VDRVERSION "1.3.40"
|
||||
#define VDRVERSNUM 10340 // Version * 10000 + Major * 100 + Minor
|
||||
|
||||
#define MAXPRIORITY 99
|
||||
#define MAXLIFETIME 99
|
||||
|
366
epg.c
366
epg.c
@ -7,7 +7,7 @@
|
||||
* Original version (as used in VDR before 1.3.0) written by
|
||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
||||
*
|
||||
* $Id: epg.c 1.49 2006/01/15 13:58:30 kls Exp $
|
||||
* $Id: epg.c 1.51 2006/01/20 14:09:48 kls Exp $
|
||||
*/
|
||||
|
||||
#include "epg.h"
|
||||
@ -422,197 +422,196 @@ void cEvent::FixEpgBugs(void)
|
||||
strreplace(description, '\x86', ' ');
|
||||
strreplace(description, '\x87', ' ');
|
||||
|
||||
if (!title) {
|
||||
// we don't want any "(null)" titles
|
||||
title = strcpyrealloc(title, tr("No title"));
|
||||
EpgBugFixStat(12, ChannelID());
|
||||
}
|
||||
|
||||
if (Setup.EPGBugfixLevel == 0)
|
||||
return;
|
||||
|
||||
// Some TV stations apparently have their own idea about how to fill in the
|
||||
// EPG data. Let's fix their bugs as good as we can:
|
||||
if (title) {
|
||||
|
||||
// Some channels put the ShortText in quotes and use either the ShortText
|
||||
// or the Description field, depending on how long the string is:
|
||||
//
|
||||
// Title
|
||||
// "ShortText". Description
|
||||
//
|
||||
if ((shortText == NULL) != (description == NULL)) {
|
||||
char *p = shortText ? shortText : description;
|
||||
if (*p == '"') {
|
||||
const char *delim = "\".";
|
||||
char *e = strstr(p + 1, delim);
|
||||
if (e) {
|
||||
*e = 0;
|
||||
char *s = strdup(p + 1);
|
||||
char *d = strdup(e + strlen(delim));
|
||||
free(shortText);
|
||||
free(description);
|
||||
shortText = s;
|
||||
description = d;
|
||||
EpgBugFixStat(1, ChannelID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Some channels put the Description into the ShortText (preceded
|
||||
// by a blank) if there is no actual ShortText and the Description
|
||||
// is short enough:
|
||||
//
|
||||
// Title
|
||||
// Description
|
||||
//
|
||||
if (shortText && !description) {
|
||||
if (*shortText == ' ') {
|
||||
memmove(shortText, shortText + 1, strlen(shortText));
|
||||
description = shortText;
|
||||
shortText = NULL;
|
||||
EpgBugFixStat(2, ChannelID());
|
||||
}
|
||||
}
|
||||
|
||||
// Sometimes they repeat the Title in the ShortText:
|
||||
//
|
||||
// Title
|
||||
// Title
|
||||
//
|
||||
if (shortText && strcmp(title, shortText) == 0) {
|
||||
free(shortText);
|
||||
shortText = NULL;
|
||||
EpgBugFixStat(3, ChannelID());
|
||||
}
|
||||
|
||||
// Some channels put the ShortText between double quotes, which is nothing
|
||||
// but annoying (some even put a '.' after the closing '"'):
|
||||
//
|
||||
// Title
|
||||
// "ShortText"[.]
|
||||
//
|
||||
if (shortText && *shortText == '"') {
|
||||
int l = strlen(shortText);
|
||||
if (l > 2 && (shortText[l - 1] == '"' || (shortText[l - 1] == '.' && shortText[l - 2] == '"'))) {
|
||||
memmove(shortText, shortText + 1, l);
|
||||
char *p = strrchr(shortText, '"');
|
||||
if (p)
|
||||
*p = 0;
|
||||
EpgBugFixStat(4, ChannelID());
|
||||
}
|
||||
}
|
||||
|
||||
if (Setup.EPGBugfixLevel <= 1)
|
||||
return;
|
||||
|
||||
// Some channels apparently try to do some formatting in the texts,
|
||||
// which is a bad idea because they have no way of knowing the width
|
||||
// of the window that will actually display the text.
|
||||
// Remove excess whitespace:
|
||||
title = compactspace(title);
|
||||
shortText = compactspace(shortText);
|
||||
description = compactspace(description);
|
||||
|
||||
#define MAX_USEFUL_EPISODE_LENGTH 40
|
||||
// Some channels put a whole lot of information in the ShortText and leave
|
||||
// the Description totally empty. So if the ShortText length exceeds
|
||||
// MAX_USEFUL_EPISODE_LENGTH, let's put this into the Description
|
||||
// instead:
|
||||
if (!isempty(shortText) && isempty(description)) {
|
||||
if (strlen(shortText) > MAX_USEFUL_EPISODE_LENGTH) {
|
||||
free(description);
|
||||
description = shortText;
|
||||
shortText = NULL;
|
||||
EpgBugFixStat(6, ChannelID());
|
||||
}
|
||||
}
|
||||
|
||||
// Some channels put the same information into ShortText and Description.
|
||||
// In that case we delete one of them:
|
||||
if (shortText && description && strcmp(shortText, description) == 0) {
|
||||
if (strlen(shortText) > MAX_USEFUL_EPISODE_LENGTH) {
|
||||
// Some channels put the ShortText in quotes and use either the ShortText
|
||||
// or the Description field, depending on how long the string is:
|
||||
//
|
||||
// Title
|
||||
// "ShortText". Description
|
||||
//
|
||||
if ((shortText == NULL) != (description == NULL)) {
|
||||
char *p = shortText ? shortText : description;
|
||||
if (*p == '"') {
|
||||
const char *delim = "\".";
|
||||
char *e = strstr(p + 1, delim);
|
||||
if (e) {
|
||||
*e = 0;
|
||||
char *s = strdup(p + 1);
|
||||
char *d = strdup(e + strlen(delim));
|
||||
free(shortText);
|
||||
shortText = NULL;
|
||||
}
|
||||
else {
|
||||
free(description);
|
||||
description = NULL;
|
||||
shortText = s;
|
||||
description = d;
|
||||
EpgBugFixStat(1, ChannelID());
|
||||
}
|
||||
EpgBugFixStat(7, ChannelID());
|
||||
}
|
||||
|
||||
// Some channels use the ` ("backtick") character, where a ' (single quote)
|
||||
// would be normally used. Actually, "backticks" in normal text don't make
|
||||
// much sense, so let's replace them:
|
||||
strreplace(title, '`', '\'');
|
||||
strreplace(shortText, '`', '\'');
|
||||
strreplace(description, '`', '\'');
|
||||
|
||||
if (Setup.EPGBugfixLevel <= 2)
|
||||
return;
|
||||
|
||||
// The stream components have a "description" field which some channels
|
||||
// apparently have no idea of how to set correctly:
|
||||
if (components) {
|
||||
for (int i = 0; i < components->NumComponents(); i++) {
|
||||
tComponent *p = components->Component(i);
|
||||
switch (p->stream) {
|
||||
case 0x01: { // video
|
||||
if (p->description) {
|
||||
if (strcasecmp(p->description, "Video") == 0 ||
|
||||
strcasecmp(p->description, "Bildformat") == 0) {
|
||||
// Yes, we know it's video - that's what the 'stream' code
|
||||
// is for! But _which_ video is it?
|
||||
free(p->description);
|
||||
p->description = NULL;
|
||||
EpgBugFixStat(8, ChannelID());
|
||||
}
|
||||
}
|
||||
if (!p->description) {
|
||||
switch (p->type) {
|
||||
case 0x01:
|
||||
case 0x05: p->description = strdup("4:3"); break;
|
||||
case 0x02:
|
||||
case 0x03:
|
||||
case 0x06:
|
||||
case 0x07: p->description = strdup("16:9"); break;
|
||||
case 0x04:
|
||||
case 0x08: p->description = strdup(">16:9"); break;
|
||||
case 0x09:
|
||||
case 0x0D: p->description = strdup("HD 4:3"); break;
|
||||
case 0x0A:
|
||||
case 0x0B:
|
||||
case 0x0E:
|
||||
case 0x0F: p->description = strdup("HD 16:9"); break;
|
||||
case 0x0C:
|
||||
case 0x10: p->description = strdup("HD >16:9"); break;
|
||||
}
|
||||
EpgBugFixStat(9, ChannelID());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x02: { // audio
|
||||
if (p->description) {
|
||||
if (strcasecmp(p->description, "Audio") == 0) {
|
||||
// Yes, we know it's audio - that's what the 'stream' code
|
||||
// is for! But _which_ audio is it?
|
||||
free(p->description);
|
||||
p->description = NULL;
|
||||
EpgBugFixStat(10, ChannelID());
|
||||
}
|
||||
}
|
||||
if (!p->description) {
|
||||
switch (p->type) {
|
||||
case 0x05: p->description = strdup("Dolby Digital"); break;
|
||||
// all others will just display the language
|
||||
}
|
||||
EpgBugFixStat(11, ChannelID());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// we don't want any "(null)" titles
|
||||
title = strcpyrealloc(title, tr("No title"));
|
||||
EpgBugFixStat(12, ChannelID());
|
||||
|
||||
// Some channels put the Description into the ShortText (preceded
|
||||
// by a blank) if there is no actual ShortText and the Description
|
||||
// is short enough:
|
||||
//
|
||||
// Title
|
||||
// Description
|
||||
//
|
||||
if (shortText && !description) {
|
||||
if (*shortText == ' ') {
|
||||
memmove(shortText, shortText + 1, strlen(shortText));
|
||||
description = shortText;
|
||||
shortText = NULL;
|
||||
EpgBugFixStat(2, ChannelID());
|
||||
}
|
||||
}
|
||||
|
||||
// Sometimes they repeat the Title in the ShortText:
|
||||
//
|
||||
// Title
|
||||
// Title
|
||||
//
|
||||
if (shortText && strcmp(title, shortText) == 0) {
|
||||
free(shortText);
|
||||
shortText = NULL;
|
||||
EpgBugFixStat(3, ChannelID());
|
||||
}
|
||||
|
||||
// Some channels put the ShortText between double quotes, which is nothing
|
||||
// but annoying (some even put a '.' after the closing '"'):
|
||||
//
|
||||
// Title
|
||||
// "ShortText"[.]
|
||||
//
|
||||
if (shortText && *shortText == '"') {
|
||||
int l = strlen(shortText);
|
||||
if (l > 2 && (shortText[l - 1] == '"' || (shortText[l - 1] == '.' && shortText[l - 2] == '"'))) {
|
||||
memmove(shortText, shortText + 1, l);
|
||||
char *p = strrchr(shortText, '"');
|
||||
if (p)
|
||||
*p = 0;
|
||||
EpgBugFixStat(4, ChannelID());
|
||||
}
|
||||
}
|
||||
|
||||
if (Setup.EPGBugfixLevel <= 1)
|
||||
return;
|
||||
|
||||
// Some channels apparently try to do some formatting in the texts,
|
||||
// which is a bad idea because they have no way of knowing the width
|
||||
// of the window that will actually display the text.
|
||||
// Remove excess whitespace:
|
||||
title = compactspace(title);
|
||||
shortText = compactspace(shortText);
|
||||
description = compactspace(description);
|
||||
|
||||
#define MAX_USEFUL_EPISODE_LENGTH 40
|
||||
// Some channels put a whole lot of information in the ShortText and leave
|
||||
// the Description totally empty. So if the ShortText length exceeds
|
||||
// MAX_USEFUL_EPISODE_LENGTH, let's put this into the Description
|
||||
// instead:
|
||||
if (!isempty(shortText) && isempty(description)) {
|
||||
if (strlen(shortText) > MAX_USEFUL_EPISODE_LENGTH) {
|
||||
free(description);
|
||||
description = shortText;
|
||||
shortText = NULL;
|
||||
EpgBugFixStat(6, ChannelID());
|
||||
}
|
||||
}
|
||||
|
||||
// Some channels put the same information into ShortText and Description.
|
||||
// In that case we delete one of them:
|
||||
if (shortText && description && strcmp(shortText, description) == 0) {
|
||||
if (strlen(shortText) > MAX_USEFUL_EPISODE_LENGTH) {
|
||||
free(shortText);
|
||||
shortText = NULL;
|
||||
}
|
||||
else {
|
||||
free(description);
|
||||
description = NULL;
|
||||
}
|
||||
EpgBugFixStat(7, ChannelID());
|
||||
}
|
||||
|
||||
// Some channels use the ` ("backtick") character, where a ' (single quote)
|
||||
// would be normally used. Actually, "backticks" in normal text don't make
|
||||
// much sense, so let's replace them:
|
||||
strreplace(title, '`', '\'');
|
||||
strreplace(shortText, '`', '\'');
|
||||
strreplace(description, '`', '\'');
|
||||
|
||||
if (Setup.EPGBugfixLevel <= 2)
|
||||
return;
|
||||
|
||||
// The stream components have a "description" field which some channels
|
||||
// apparently have no idea of how to set correctly:
|
||||
if (components) {
|
||||
for (int i = 0; i < components->NumComponents(); i++) {
|
||||
tComponent *p = components->Component(i);
|
||||
switch (p->stream) {
|
||||
case 0x01: { // video
|
||||
if (p->description) {
|
||||
if (strcasecmp(p->description, "Video") == 0 ||
|
||||
strcasecmp(p->description, "Bildformat") == 0) {
|
||||
// Yes, we know it's video - that's what the 'stream' code
|
||||
// is for! But _which_ video is it?
|
||||
free(p->description);
|
||||
p->description = NULL;
|
||||
EpgBugFixStat(8, ChannelID());
|
||||
}
|
||||
}
|
||||
if (!p->description) {
|
||||
switch (p->type) {
|
||||
case 0x01:
|
||||
case 0x05: p->description = strdup("4:3"); break;
|
||||
case 0x02:
|
||||
case 0x03:
|
||||
case 0x06:
|
||||
case 0x07: p->description = strdup("16:9"); break;
|
||||
case 0x04:
|
||||
case 0x08: p->description = strdup(">16:9"); break;
|
||||
case 0x09:
|
||||
case 0x0D: p->description = strdup("HD 4:3"); break;
|
||||
case 0x0A:
|
||||
case 0x0B:
|
||||
case 0x0E:
|
||||
case 0x0F: p->description = strdup("HD 16:9"); break;
|
||||
case 0x0C:
|
||||
case 0x10: p->description = strdup("HD >16:9"); break;
|
||||
}
|
||||
EpgBugFixStat(9, ChannelID());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x02: { // audio
|
||||
if (p->description) {
|
||||
if (strcasecmp(p->description, "Audio") == 0) {
|
||||
// Yes, we know it's audio - that's what the 'stream' code
|
||||
// is for! But _which_ audio is it?
|
||||
free(p->description);
|
||||
p->description = NULL;
|
||||
EpgBugFixStat(10, ChannelID());
|
||||
}
|
||||
}
|
||||
if (!p->description) {
|
||||
switch (p->type) {
|
||||
case 0x05: p->description = strdup("Dolby Digital"); break;
|
||||
// all others will just display the language
|
||||
}
|
||||
EpgBugFixStat(11, ChannelID());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -935,7 +934,10 @@ bool cSchedules::ClearAll(void)
|
||||
cSchedulesLock SchedulesLock(true, 1000);
|
||||
cSchedules *s = (cSchedules *)Schedules(SchedulesLock);
|
||||
if (s) {
|
||||
s->Clear();
|
||||
for (cTimer *Timer = Timers.First(); Timer; Timer = Timers.Next(Timer))
|
||||
Timer->SetEvent(NULL);
|
||||
for (cSchedule *Schedule = s->First(); Schedule; Schedule = s->Next(Schedule))
|
||||
Schedule->Cleanup(INT_MAX);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -3948,23 +3948,23 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x000001F0, // ....*****....
|
||||
0x000003F8, // ...*******...
|
||||
0x0000071C, // ..***...***..
|
||||
0x00000C0C, // .**......**..
|
||||
0x00000C06, // .**.......**.
|
||||
0x00000C06, // .**.......**.
|
||||
0x00000E00, // .***.........
|
||||
0x00000700, // ..***........
|
||||
0x00000FE0, // .*******.....
|
||||
0x00000FA0, // .*****.*.....
|
||||
0x00000380, // ...***.......
|
||||
0x00000180, // ....**.......
|
||||
0x00000180, // ....**.......
|
||||
0x00000300, // ...**........
|
||||
0x00000600, // ..**.........
|
||||
0x00000FFE, // .***********.
|
||||
0x00000FFC, // .**********..
|
||||
0x00000600, // ..**.........
|
||||
0x00000600, // ..**.........
|
||||
0x00000600, // ..**.........
|
||||
0x00000600, // ..**.........
|
||||
0x00000600, // ..**.........
|
||||
0x00000600, // ..**.........
|
||||
0x00000600, // ..**.........
|
||||
0x00000FE0, // .*******.....
|
||||
0x00000FE0, // .*******.....
|
||||
0x00000600, // ..**.........
|
||||
0x00000600, // ..**.........
|
||||
0x00000600, // ..**.........
|
||||
0x00000600, // ..**.........
|
||||
0x00000600, // ..**.........
|
||||
0x000007FE, // ..**********.
|
||||
0x000007FE, // ..**********.
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
@ -4032,34 +4032,34 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // .............
|
||||
},
|
||||
{ // 166
|
||||
6, 27,
|
||||
0x00000000, // ......
|
||||
0x00000000, // ......
|
||||
0x00000000, // ......
|
||||
0x00000000, // ......
|
||||
0x00000000, // ......
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x00000000, // ......
|
||||
0x00000000, // ......
|
||||
0x00000000, // ......
|
||||
0x00000000, // ......
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
0x0000000C, // ..**..
|
||||
15, 27,
|
||||
0x00000070, // ........***....
|
||||
0x000000E0, // .......***.....
|
||||
0x000001C0, // ......***......
|
||||
0x00000380, // .....***.......
|
||||
0x00000000, // ...............
|
||||
0x000003E0, // .....*****.....
|
||||
0x00000FF8, // ...*********...
|
||||
0x00000C1C, // ...**.....***..
|
||||
0x0000180C, // ..**.......**..
|
||||
0x00001804, // ..**........*..
|
||||
0x00001800, // ..**...........
|
||||
0x00001C00, // ..***..........
|
||||
0x00000F80, // ...*****.......
|
||||
0x000007F8, // ....********...
|
||||
0x0000007C, // ........*****..
|
||||
0x0000000E, // ...........***.
|
||||
0x00000006, // ............**.
|
||||
0x00003006, // .**.........**.
|
||||
0x00001806, // ..**........**.
|
||||
0x0000180C, // ..**.......**..
|
||||
0x00000FF8, // ...*********...
|
||||
0x000007F0, // ....*******....
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
},
|
||||
{ // 167
|
||||
13, 27,
|
||||
@ -4212,34 +4212,34 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // ..............
|
||||
},
|
||||
{ // 172
|
||||
13, 27,
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000FFF, // .************
|
||||
0x00000FFF, // .************
|
||||
0x00000003, // ...........**
|
||||
0x00000003, // ...........**
|
||||
0x00000003, // ...........**
|
||||
0x00000003, // ...........**
|
||||
0x00000003, // ...........**
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
14, 27,
|
||||
0x00000000, // ..............
|
||||
0x00000030, // ........**....
|
||||
0x00000060, // .......**.....
|
||||
0x000000C0, // ......**......
|
||||
0x00000000, // ..............
|
||||
0x00001FFE, // .************.
|
||||
0x00001FFE, // .************.
|
||||
0x0000000E, // ..........***.
|
||||
0x0000000C, // ..........**..
|
||||
0x0000001C, // .........***..
|
||||
0x00000038, // ........***...
|
||||
0x00000070, // .......***....
|
||||
0x000000E0, // ......***.....
|
||||
0x000000C0, // ......**......
|
||||
0x000001C0, // .....***......
|
||||
0x00000380, // ....***.......
|
||||
0x00000700, // ...***........
|
||||
0x00000600, // ...**.........
|
||||
0x00000E00, // ..***.........
|
||||
0x00001C00, // .***..........
|
||||
0x00001FFE, // .************.
|
||||
0x00001FFE, // .************.
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
},
|
||||
{ // 173
|
||||
8, 27,
|
||||
@ -4302,34 +4302,34 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // ..............
|
||||
},
|
||||
{ // 175
|
||||
8, 27,
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x0000007E, // .******.
|
||||
0x0000007E, // .******.
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
14, 27,
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x000000C0, // ......**......
|
||||
0x000000C0, // ......**......
|
||||
0x00000000, // ..............
|
||||
0x00001FFE, // .************.
|
||||
0x00001FFE, // .************.
|
||||
0x0000000E, // ..........***.
|
||||
0x0000000C, // ..........**..
|
||||
0x0000001C, // .........***..
|
||||
0x00000038, // ........***...
|
||||
0x00000070, // .......***....
|
||||
0x000000E0, // ......***.....
|
||||
0x000000C0, // ......**......
|
||||
0x000001C0, // .....***......
|
||||
0x00000380, // ....***.......
|
||||
0x00000700, // ...***........
|
||||
0x00000600, // ...**.........
|
||||
0x00000E00, // ..***.........
|
||||
0x00001C00, // .***..........
|
||||
0x00001FFE, // .************.
|
||||
0x00001FFE, // .************.
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
},
|
||||
{ // 176
|
||||
14, 27,
|
||||
@ -4371,23 +4371,23 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000060, // ......**.....
|
||||
0x00000060, // ......**.....
|
||||
0x00000060, // ......**.....
|
||||
0x00000060, // ......**.....
|
||||
0x00000FFE, // .***********.
|
||||
0x00000FFE, // .***********.
|
||||
0x00000060, // ......**.....
|
||||
0x00000060, // ......**.....
|
||||
0x00000060, // ......**.....
|
||||
0x00000060, // ......**.....
|
||||
0x00000060, // ......**.....
|
||||
0x00000000, // .............
|
||||
0x00000FFE, // .***********.
|
||||
0x00000FFE, // .***********.
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x000001F0, // ....*****....
|
||||
0x000007FC, // ..*********..
|
||||
0x0000060C, // ..**.....**..
|
||||
0x0000040C, // ..*......**..
|
||||
0x0000000C, // .........**..
|
||||
0x000001FC, // ....*******..
|
||||
0x000007CC, // ..*****..**..
|
||||
0x00000E0C, // .***.....**..
|
||||
0x00000C0C, // .**......**..
|
||||
0x00000C1C, // .**.....***..
|
||||
0x00000FFE, // .***********.
|
||||
0x000003EE, // ...*****.***.
|
||||
0x0000000E, // .........***.
|
||||
0x0000000E, // .........***.
|
||||
0x00000006, // ..........**.
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
},
|
||||
@ -4428,23 +4428,23 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x0000001E, // ...****.
|
||||
0x0000003C, // ..****..
|
||||
0x0000007E, // .******.
|
||||
0x00000046, // .*...**.
|
||||
0x00000006, // .....**.
|
||||
0x0000001C, // ...***..
|
||||
0x00000006, // .....**.
|
||||
0x00000003, // ......**
|
||||
0x000000C3, // **....**
|
||||
0x0000007E, // .******.
|
||||
0x0000003C, // ..****..
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000070, // .***....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000030, // ..**....
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
0x00000000, // ........
|
||||
@ -4518,27 +4518,27 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x000000FF, // ....********
|
||||
0x000001FF, // ...*********
|
||||
0x000003F6, // ..******.**.
|
||||
0x000003F6, // ..******.**.
|
||||
0x000007F6, // .*******.**.
|
||||
0x000007F6, // .*******.**.
|
||||
0x000007F6, // .*******.**.
|
||||
0x000007F6, // .*******.**.
|
||||
0x000003F6, // ..******.**.
|
||||
0x000003F6, // ..******.**.
|
||||
0x000000F6, // ....****.**.
|
||||
0x00000036, // ......**.**.
|
||||
0x00000036, // ......**.**.
|
||||
0x00000036, // ......**.**.
|
||||
0x00000036, // ......**.**.
|
||||
0x00000036, // ......**.**.
|
||||
0x00000036, // ......**.**.
|
||||
0x00000036, // ......**.**.
|
||||
0x00000036, // ......**.**.
|
||||
0x00000036, // ......**.**.
|
||||
0x00000036, // ......**.**.
|
||||
0x00000030, // ......**....
|
||||
0x00000060, // .....**.....
|
||||
0x000000C0, // ....**......
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x000001F8, // ...******...
|
||||
0x000003FC, // ..********..
|
||||
0x0000060C, // .**.....**..
|
||||
0x00000600, // .**.........
|
||||
0x00000700, // .***........
|
||||
0x000003F0, // ..******....
|
||||
0x000000FC, // ....******..
|
||||
0x0000000E, // ........***.
|
||||
0x00000606, // .**......**.
|
||||
0x00000606, // .**......**.
|
||||
0x000007FC, // .*********..
|
||||
0x000001F8, // ...******...
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
},
|
||||
{ // 183
|
||||
@ -4692,34 +4692,34 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // .......
|
||||
},
|
||||
{ // 188
|
||||
20, 27,
|
||||
0x00000000, // ....................
|
||||
0x00000000, // ....................
|
||||
0x00000000, // ....................
|
||||
0x00000000, // ....................
|
||||
0x00000000, // ....................
|
||||
0x00000000, // ....................
|
||||
0x00018030, // ...**.........**....
|
||||
0x00038020, // ..***.........*.....
|
||||
0x00078040, // .****........*......
|
||||
0x000180C0, // ...**.......**......
|
||||
0x00018180, // ...**......**.......
|
||||
0x00018100, // ...**......*........
|
||||
0x0001830C, // ...**.....**....**..
|
||||
0x0001860C, // ...**....**.....**..
|
||||
0x0001861C, // ...**....**....***..
|
||||
0x00000C3C, // ........**....****..
|
||||
0x0000186C, // .......**....**.**..
|
||||
0x0000384C, // ......***....*..**..
|
||||
0x000030FF, // ......**....********
|
||||
0x000060FF, // .....**.....********
|
||||
0x0000E00C, // ....***.........**..
|
||||
0x0000C004, // ....**...........*..
|
||||
0x00000000, // ....................
|
||||
0x00000000, // ....................
|
||||
0x00000000, // ....................
|
||||
0x00000000, // ....................
|
||||
0x00000000, // ....................
|
||||
12, 27,
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000030, // ......**....
|
||||
0x00000060, // .....**.....
|
||||
0x000000C0, // ....**......
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x000007FC, // .*********..
|
||||
0x000007FC, // .*********..
|
||||
0x00000018, // .......**...
|
||||
0x00000018, // .......**...
|
||||
0x00000030, // ......**....
|
||||
0x00000060, // .....**.....
|
||||
0x000000C0, // ....**......
|
||||
0x00000180, // ...**.......
|
||||
0x00000300, // ..**........
|
||||
0x00000600, // .**.........
|
||||
0x000007FE, // .**********.
|
||||
0x000007FE, // .**********.
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
},
|
||||
{ // 189
|
||||
20, 27,
|
||||
@ -4782,34 +4782,34 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // ............
|
||||
},
|
||||
{ // 191
|
||||
14, 27,
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x000000C0, // ......**......
|
||||
0x000000C0, // ......**......
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x00000000, // ..............
|
||||
0x000000C0, // ......**......
|
||||
0x000000C0, // ......**......
|
||||
0x000001C0, // .....***......
|
||||
0x00000380, // ....***.......
|
||||
0x00000700, // ...***........
|
||||
0x00000600, // ...**.........
|
||||
0x00000C00, // ..**..........
|
||||
0x00000C0C, // ..**......**..
|
||||
0x00000C0C, // ..**......**..
|
||||
0x00000E1C, // ..***....***..
|
||||
0x000007F8, // ...********...
|
||||
0x000003E0, // ....*****.....
|
||||
12, 27,
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000060, // .....**.....
|
||||
0x00000060, // .....**.....
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x000007FC, // .*********..
|
||||
0x000007FC, // .*********..
|
||||
0x00000018, // .......**...
|
||||
0x00000018, // .......**...
|
||||
0x00000030, // ......**....
|
||||
0x00000060, // .....**.....
|
||||
0x000000C0, // ....**......
|
||||
0x00000180, // ...**.......
|
||||
0x00000300, // ..**........
|
||||
0x00000600, // .**.........
|
||||
0x000007FE, // .**********.
|
||||
0x000007FE, // .**********.
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
0x00000000, // ............
|
||||
},
|
||||
{ // 192
|
||||
15, 27,
|
||||
@ -5113,10 +5113,10 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
},
|
||||
{ // 202
|
||||
15, 27,
|
||||
0x000000C0, // .......**......
|
||||
0x000001E0, // ......****.....
|
||||
0x00000320, // .....**..*.....
|
||||
0x00000230, // .....*...**....
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
0x00001FFE, // ..************.
|
||||
0x00001FFE, // ..************.
|
||||
@ -5135,9 +5135,9 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00001800, // ..**...........
|
||||
0x00001FFE, // ..************.
|
||||
0x00001FFE, // ..************.
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
0x00000006, // ............**.
|
||||
0x00000006, // ............**.
|
||||
0x00000006, // ............**.
|
||||
0x00000000, // ...............
|
||||
0x00000000, // ...............
|
||||
},
|
||||
@ -5323,10 +5323,10 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
},
|
||||
{ // 209
|
||||
17, 27,
|
||||
0x00000000, // .................
|
||||
0x00000760, // ......***.**.....
|
||||
0x00000FE0, // .....*******.....
|
||||
0x00000070, // ..........***....
|
||||
0x00000060, // ..........**.....
|
||||
0x000000C0, // .........**......
|
||||
0x00000180, // ........**.......
|
||||
0x00000000, // .................
|
||||
0x0000600C, // ..**.........**..
|
||||
0x0000700C, // ..***........**..
|
||||
@ -6078,9 +6078,9 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x000000E0, // .....***.....
|
||||
0x000000B0, // .....*.**....
|
||||
0x00000190, // ....**..*....
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x000001F0, // ....*****....
|
||||
@ -6095,9 +6095,9 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x0000060C, // ..**.....**..
|
||||
0x000007F8, // ..********...
|
||||
0x000001F0, // ....*****....
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000038, // .......***...
|
||||
0x00000070, // ......***....
|
||||
0x00000038, // .......***...
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
},
|
||||
@ -6288,9 +6288,9 @@ cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x00000180, // ....**.......
|
||||
0x000003F8, // ...*******...
|
||||
0x00000270, // ...*..***....
|
||||
0x0000000C, // .........**..
|
||||
0x00000018, // ........**...
|
||||
0x00000030, // .......**....
|
||||
0x00000000, // .............
|
||||
0x00000000, // .............
|
||||
0x000004F8, // ..*..*****...
|
||||
|
12
keys.c
12
keys.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: keys.c 1.10 2006/01/05 15:39:26 kls Exp $
|
||||
* $Id: keys.c 1.11 2006/01/16 17:01:25 kls Exp $
|
||||
*/
|
||||
|
||||
#include "keys.h"
|
||||
@ -250,9 +250,11 @@ cKeyMacros KeyMacros;
|
||||
|
||||
const cKeyMacro *cKeyMacros::Get(eKeys Key)
|
||||
{
|
||||
for (cKeyMacro *k = First(); k; k = Next(k)) {
|
||||
if (*k->Macro() == Key)
|
||||
return k;
|
||||
}
|
||||
if (Key != kNone) {
|
||||
for (cKeyMacro *k = First(); k; k = Next(k)) {
|
||||
if (*k->Macro() == Key)
|
||||
return k;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
181
menu.c
181
menu.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menu.c 1.396 2006/01/15 15:02:36 kls Exp $
|
||||
* $Id: menu.c 1.403 2006/01/22 16:06:39 kls Exp $
|
||||
*/
|
||||
|
||||
#include "menu.h"
|
||||
@ -36,6 +36,8 @@
|
||||
#define MAXRECORDCONTROLS (MAXDEVICES * MAXRECEIVERS)
|
||||
#define MAXINSTANTRECTIME (24 * 60 - 1) // 23:59 hours
|
||||
#define MAXWAITFORCAMMENU 4 // seconds to wait for the CAM menu to open
|
||||
#define MINFREEDISK 300 // minimum free disk space required to start recording
|
||||
#define NODISKSPACEDELTA 300 // seconds between "Not enough disk space to start recording!" messages
|
||||
|
||||
#define CHNUMWIDTH (numdigits(Channels.MaxNumber()) + 1)
|
||||
|
||||
@ -2996,9 +2998,12 @@ static void SetTrackDescriptions(bool Live)
|
||||
|
||||
#define DIRECTCHANNELTIMEOUT 1000 //ms
|
||||
|
||||
cDisplayChannel *cDisplayChannel::currentDisplayChannel = NULL;
|
||||
|
||||
cDisplayChannel::cDisplayChannel(int Number, bool Switched)
|
||||
:cOsdObject(true)
|
||||
{
|
||||
currentDisplayChannel = this;
|
||||
group = -1;
|
||||
withInfo = !Switched || Setup.ShowInfoOnChSwitch;
|
||||
displayChannel = Skins.Current()->DisplayChannel(withInfo);
|
||||
@ -3017,12 +3022,15 @@ cDisplayChannel::cDisplayChannel(int Number, bool Switched)
|
||||
cDisplayChannel::cDisplayChannel(eKeys FirstKey)
|
||||
:cOsdObject(true)
|
||||
{
|
||||
currentDisplayChannel = this;
|
||||
group = -1;
|
||||
number = 0;
|
||||
timeout = true;
|
||||
lastPresent = lastFollowing = NULL;
|
||||
lastTime.Set();
|
||||
withInfo = Setup.ShowInfoOnChSwitch;
|
||||
displayChannel = Skins.Current()->DisplayChannel(withInfo);
|
||||
channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
ProcessKey(FirstKey);
|
||||
}
|
||||
|
||||
@ -3030,6 +3038,7 @@ cDisplayChannel::~cDisplayChannel()
|
||||
{
|
||||
delete displayChannel;
|
||||
cStatus::MsgOsdClear();
|
||||
currentDisplayChannel = NULL;
|
||||
}
|
||||
|
||||
void cDisplayChannel::DisplayChannel(void)
|
||||
@ -3063,14 +3072,27 @@ void cDisplayChannel::DisplayInfo(void)
|
||||
|
||||
void cDisplayChannel::Refresh(void)
|
||||
{
|
||||
channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
DisplayChannel();
|
||||
displayChannel->SetEvents(NULL, NULL);
|
||||
lastTime.Set();
|
||||
}
|
||||
|
||||
cChannel *cDisplayChannel::NextAvailableChannel(cChannel *Channel, int Direction)
|
||||
{
|
||||
if (Direction) {
|
||||
while (Channel) {
|
||||
Channel = Direction > 0 ? Channels.Next(Channel) : Channels.Prev(Channel);
|
||||
if (Channel && !Channel->GroupSep() && cDevice::GetDevice(Channel, 0))
|
||||
return Channel;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
eOSState cDisplayChannel::ProcessKey(eKeys Key)
|
||||
{
|
||||
cChannel *NewChannel = NULL;
|
||||
if (Key != kNone)
|
||||
lastTime.Set();
|
||||
switch (Key) {
|
||||
case k0:
|
||||
if (number == 0) {
|
||||
@ -3081,31 +3103,32 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
|
||||
case k1 ... k9:
|
||||
if (number >= 0) {
|
||||
number = number * 10 + Key - k0;
|
||||
if (number > 0) {
|
||||
channel = Channels.GetByNumber(number);
|
||||
displayChannel->SetEvents(NULL, NULL);
|
||||
withInfo = false;
|
||||
DisplayChannel();
|
||||
lastTime.Set();
|
||||
// Lets see if there can be any useful further input:
|
||||
int n = channel ? number * 10 : 0;
|
||||
cChannel *ch = channel;
|
||||
while (ch && (ch = Channels.Next(ch)) != NULL) {
|
||||
if (!ch->GroupSep()) {
|
||||
if (n <= ch->Number() && ch->Number() <= n + 9) {
|
||||
n = 0;
|
||||
break;
|
||||
}
|
||||
if (ch->Number() > n)
|
||||
n *= 10;
|
||||
channel = Channels.GetByNumber(number);
|
||||
displayChannel->SetEvents(NULL, NULL);
|
||||
withInfo = false;
|
||||
DisplayChannel();
|
||||
// Lets see if there can be any useful further input:
|
||||
int n = channel ? number * 10 : 0;
|
||||
int m = 10;
|
||||
cChannel *ch = channel;
|
||||
while (ch && (ch = Channels.Next(ch)) != NULL) {
|
||||
if (!ch->GroupSep()) {
|
||||
if (n <= ch->Number() && ch->Number() < n + m) {
|
||||
n = 0;
|
||||
break;
|
||||
}
|
||||
if (ch->Number() > n) {
|
||||
n *= 10;
|
||||
m *= 10;
|
||||
}
|
||||
}
|
||||
if (n > 0) {
|
||||
// This channel is the only one that fits the input, so let's take it right away:
|
||||
displayChannel->Flush(); // makes sure the user sees his last input
|
||||
Channels.SwitchTo(number);
|
||||
return osEnd;
|
||||
}
|
||||
if (n > 0) {
|
||||
// This channel is the only one that fits the input, so let's take it right away:
|
||||
displayChannel->Flush(); // makes sure the user sees his last input
|
||||
NewChannel = channel;
|
||||
withInfo = true;
|
||||
number = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -3136,18 +3159,27 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
|
||||
group = -1;
|
||||
}
|
||||
}
|
||||
lastTime.Set();
|
||||
break;
|
||||
case kUp|k_Repeat:
|
||||
case kUp:
|
||||
case kDown|k_Repeat:
|
||||
case kDown:
|
||||
cDevice::SwitchChannel(NORMALKEY(Key) == kUp ? 1 : -1);
|
||||
// no break here
|
||||
case kChanUp|k_Repeat:
|
||||
case kChanUp:
|
||||
case kChanDn|k_Repeat:
|
||||
case kChanDn:
|
||||
case kChanDn: {
|
||||
eKeys k = NORMALKEY(Key);
|
||||
cChannel *ch = NextAvailableChannel(channel, (k == kUp || k == kChanUp) ? 1 : -1);
|
||||
if (ch)
|
||||
channel = ch;
|
||||
}
|
||||
// no break here
|
||||
case kUp|k_Release:
|
||||
case kDown|k_Release:
|
||||
case kChanUp|k_Release:
|
||||
case kChanDn|k_Release:
|
||||
if (!(Key & k_Repeat) && channel)
|
||||
NewChannel = channel;
|
||||
withInfo = true;
|
||||
group = -1;
|
||||
number = 0;
|
||||
@ -3155,43 +3187,57 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
|
||||
break;
|
||||
case kNone:
|
||||
if (number && lastTime.Elapsed() > DIRECTCHANNELTIMEOUT) {
|
||||
if (Channels.GetByNumber(number))
|
||||
Channels.SwitchTo(number);
|
||||
else {
|
||||
number = 0;
|
||||
channel = NULL;
|
||||
DisplayChannel();
|
||||
lastTime.Set();
|
||||
return osContinue;
|
||||
}
|
||||
return osEnd;
|
||||
channel = Channels.GetByNumber(number);
|
||||
if (channel)
|
||||
NewChannel = channel;
|
||||
withInfo = true;
|
||||
number = 0;
|
||||
Refresh();
|
||||
lastTime.Set();
|
||||
}
|
||||
break;
|
||||
//TODO
|
||||
//XXX case kGreen: return osEventNow;
|
||||
//XXX case kYellow: return osEventNext;
|
||||
case kOk: if (group >= 0) {
|
||||
channel = Channels.Get(Channels.GetNextNormal(group));
|
||||
if (channel)
|
||||
Channels.SwitchTo(channel->Number());
|
||||
withInfo = true;
|
||||
group = -1;
|
||||
Refresh();
|
||||
break;
|
||||
}
|
||||
else if (number > 0 && channel)
|
||||
Channels.SwitchTo(number);
|
||||
return osEnd;
|
||||
default: if ((Key & (k_Repeat | k_Release)) == 0) {
|
||||
cRemote::Put(Key);
|
||||
return osEnd;
|
||||
}
|
||||
case kOk:
|
||||
if (group >= 0) {
|
||||
channel = Channels.Get(Channels.GetNextNormal(group));
|
||||
if (channel)
|
||||
NewChannel = channel;
|
||||
withInfo = true;
|
||||
group = -1;
|
||||
Refresh();
|
||||
}
|
||||
else if (number > 0) {
|
||||
channel = Channels.GetByNumber(number);
|
||||
if (channel)
|
||||
NewChannel = channel;
|
||||
withInfo = true;
|
||||
number = 0;
|
||||
Refresh();
|
||||
}
|
||||
else
|
||||
return osEnd;
|
||||
break;
|
||||
default:
|
||||
if ((Key & (k_Repeat | k_Release)) == 0) {
|
||||
cRemote::Put(Key);
|
||||
return osEnd;
|
||||
}
|
||||
};
|
||||
if (!timeout || lastTime.Elapsed() < (uint64)(Setup.ChannelInfoTime * 1000)) {
|
||||
if (!number && group < 0 && channel && channel->Number() != cDevice::CurrentChannel())
|
||||
Refresh(); // makes sure a channel switch through the SVDRP CHAN command is displayed
|
||||
if (Key == kNone && !number && group < 0 && !NewChannel && channel && channel->Number() != cDevice::CurrentChannel()) {
|
||||
// makes sure a channel switch through the SVDRP CHAN command is displayed
|
||||
channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
Refresh();
|
||||
lastTime.Set();
|
||||
}
|
||||
DisplayInfo();
|
||||
displayChannel->Flush();
|
||||
if (NewChannel) {
|
||||
Channels.SwitchTo(NewChannel->Number());
|
||||
channel = NewChannel;
|
||||
}
|
||||
return osContinue;
|
||||
}
|
||||
return osEnd;
|
||||
@ -3520,6 +3566,23 @@ int cRecordControls::state = 0;
|
||||
|
||||
bool cRecordControls::Start(cTimer *Timer, bool Pause)
|
||||
{
|
||||
static time_t LastNoDiskSpaceMessage = 0;
|
||||
int FreeMB = 0;
|
||||
if (Timer) {
|
||||
AssertFreeDiskSpace(Timer->Priority(), !Timer->Pending());
|
||||
Timer->SetPending(true);
|
||||
}
|
||||
VideoDiskSpace(&FreeMB);
|
||||
if (FreeMB < MINFREEDISK) {
|
||||
if (!Timer || time(NULL) - LastNoDiskSpaceMessage > NODISKSPACEDELTA) {
|
||||
isyslog("not enough disk space to start recording%s%s", Timer ? " timer " : "", Timer ? *Timer->ToDescr() : "");
|
||||
Skins.Message(mtWarning, tr("Not enough disk space to start recording!"));
|
||||
LastNoDiskSpaceMessage = time(NULL);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
LastNoDiskSpaceMessage = 0;
|
||||
|
||||
ChangeState();
|
||||
int ch = Timer ? Timer->Channel()->Number() : cDevice::CurrentChannel();
|
||||
cChannel *channel = Channels.GetByNumber(ch);
|
||||
@ -3548,8 +3611,10 @@ bool cRecordControls::Start(cTimer *Timer, bool Pause)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!Timer || (Timer->Priority() >= Setup.PrimaryLimit && !Timer->Pending()))
|
||||
else if (!Timer || (Timer->Priority() >= Setup.PrimaryLimit && !Timer->Pending())) {
|
||||
isyslog("no free DVB device to record channel %d!", ch);
|
||||
Skins.Message(mtError, tr("No free DVB device to record!"));
|
||||
}
|
||||
}
|
||||
else
|
||||
esyslog("ERROR: channel %d not defined!", ch);
|
||||
|
5
menu.h
5
menu.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menu.h 1.81 2006/01/06 11:30:38 kls Exp $
|
||||
* $Id: menu.h 1.82 2006/01/22 14:24:31 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __MENU_H
|
||||
@ -82,14 +82,17 @@ private:
|
||||
cChannel *channel;
|
||||
const cEvent *lastPresent;
|
||||
const cEvent *lastFollowing;
|
||||
static cDisplayChannel *currentDisplayChannel;
|
||||
void DisplayChannel(void);
|
||||
void DisplayInfo(void);
|
||||
void Refresh(void);
|
||||
cChannel *NextAvailableChannel(cChannel *Channel, int Direction);
|
||||
public:
|
||||
cDisplayChannel(int Number, bool Switched);
|
||||
cDisplayChannel(eKeys FirstKey);
|
||||
virtual ~cDisplayChannel();
|
||||
virtual eOSState ProcessKey(eKeys Key);
|
||||
static bool IsOpen(void) { return currentDisplayChannel != NULL; }
|
||||
};
|
||||
|
||||
class cDisplayVolume : public cOsdObject {
|
||||
|
53
menuitems.c
53
menuitems.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menuitems.c 1.29 2006/01/07 15:37:03 kls Exp $
|
||||
* $Id: menuitems.c 1.30 2006/01/21 12:27:14 kls Exp $
|
||||
*/
|
||||
|
||||
#include "menuitems.h"
|
||||
@ -15,6 +15,8 @@
|
||||
#include "skins.h"
|
||||
#include "status.h"
|
||||
|
||||
#define AUTO_ADVANCE_TIMEOUT 1500 // ms before auto advance when entering characters via numeric keys
|
||||
|
||||
const char *FileNameChars = " abcdefghijklmnopqrstuvwxyz0123456789-.#~,/_@";
|
||||
|
||||
// --- cMenuEditItem ---------------------------------------------------------
|
||||
@ -262,6 +264,23 @@ void cMenuEditStrItem::SetHelpKeys(void)
|
||||
cSkinDisplay::Current()->SetButtons(NULL);
|
||||
}
|
||||
|
||||
void cMenuEditStrItem::AdvancePos(void)
|
||||
{
|
||||
if (pos < length - 2 && pos < int(strlen(value)) ) {
|
||||
if (++pos >= int(strlen(value))) {
|
||||
if (pos >= 2 && value[pos - 1] == ' ' && value[pos - 2] == ' ')
|
||||
pos--; // allow only two blanks at the end
|
||||
else {
|
||||
value[pos] = ' ';
|
||||
value[pos + 1] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
newchar = true;
|
||||
if (!insert && isalpha(value[pos]))
|
||||
uppercase = isupper(value[pos]);
|
||||
}
|
||||
|
||||
void cMenuEditStrItem::Set(void)
|
||||
{
|
||||
char buf[1000];
|
||||
@ -326,6 +345,13 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
|
||||
bool SameKey = Key == lastKey;
|
||||
if (Key != kNone)
|
||||
lastKey = Key;
|
||||
else if (!newchar && autoAdvanceTimeout.TimedOut()) {
|
||||
AdvancePos();
|
||||
newchar = true;
|
||||
currentChar = NULL;
|
||||
Set();
|
||||
return osContinue;
|
||||
}
|
||||
switch (Key) {
|
||||
case kRed: // Switch between upper- and lowercase characters
|
||||
if (InEditMode()) {
|
||||
@ -382,19 +408,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
|
||||
uppercase = isupper(value[pos]);
|
||||
break;
|
||||
case kRight|k_Repeat:
|
||||
case kRight: if (pos < length - 2 && pos < int(strlen(value)) ) {
|
||||
if (++pos >= int(strlen(value))) {
|
||||
if (pos >= 2 && value[pos - 1] == ' ' && value[pos - 2] == ' ')
|
||||
pos--; // allow only two blanks at the end
|
||||
else {
|
||||
value[pos] = ' ';
|
||||
value[pos + 1] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
newchar = true;
|
||||
if (!insert && isalpha(value[pos]))
|
||||
uppercase = isupper(value[pos]);
|
||||
case kRight: AdvancePos();
|
||||
if (pos == 0)
|
||||
SetHelpKeys();
|
||||
break;
|
||||
@ -413,15 +427,19 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
|
||||
value[pos] = toupper(Inc(tolower(value[pos]), NORMALKEY(Key) == kUp));
|
||||
else
|
||||
value[pos] = Inc( value[pos], NORMALKEY(Key) == kUp);
|
||||
newchar = false;
|
||||
newchar = true;
|
||||
}
|
||||
else
|
||||
return cMenuEditItem::ProcessKey(Key);
|
||||
break;
|
||||
case k0|k_Repeat ... k9|k_Repeat:
|
||||
case k0 ... k9: {
|
||||
if (!SameKey)
|
||||
currentChar = NULL;
|
||||
if (InEditMode()) {
|
||||
if (!SameKey) {
|
||||
if (!newchar)
|
||||
AdvancePos();
|
||||
currentChar = NULL;
|
||||
}
|
||||
if (insert && newchar) {
|
||||
// create a new character in insert mode
|
||||
if (int(strlen(value)) < length - 1) {
|
||||
@ -445,6 +463,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
|
||||
currentChar++;
|
||||
}
|
||||
newchar = false;
|
||||
autoAdvanceTimeout.Set(AUTO_ADVANCE_TIMEOUT);
|
||||
}
|
||||
else
|
||||
return cMenuEditItem::ProcessKey(Key);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menuitems.h 1.15 2006/01/06 15:16:25 kls Exp $
|
||||
* $Id: menuitems.h 1.16 2006/01/21 10:45:55 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __MENUITEMS_H
|
||||
@ -85,7 +85,9 @@ private:
|
||||
const char *charMap;
|
||||
const char *currentChar;
|
||||
eKeys lastKey;
|
||||
cTimeMs autoAdvanceTimeout;
|
||||
void SetHelpKeys(void);
|
||||
void AdvancePos(void);
|
||||
virtual void Set(void);
|
||||
char Inc(char c, bool Up);
|
||||
protected:
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: recording.c 1.132 2006/01/08 11:40:13 kls Exp $
|
||||
* $Id: recording.c 1.133 2006/01/20 17:18:59 kls Exp $
|
||||
*/
|
||||
|
||||
#include "recording.h"
|
||||
@ -117,7 +117,7 @@ void RemoveDeletedRecordings(void)
|
||||
}
|
||||
}
|
||||
|
||||
void AssertFreeDiskSpace(int Priority)
|
||||
void AssertFreeDiskSpace(int Priority, bool Force)
|
||||
{
|
||||
static cMutex Mutex;
|
||||
cMutexLock MutexLock(&Mutex);
|
||||
@ -126,7 +126,7 @@ void AssertFreeDiskSpace(int Priority)
|
||||
// it will get removed during the next call.
|
||||
static time_t LastFreeDiskCheck = 0;
|
||||
int Factor = (Priority == -1) ? 10 : 1;
|
||||
if (time(NULL) - LastFreeDiskCheck > DISKCHECKDELTA / Factor) {
|
||||
if (Force || time(NULL) - LastFreeDiskCheck > DISKCHECKDELTA / Factor) {
|
||||
if (!VideoFileSpaceAvailable(MINDISKSPACE)) {
|
||||
// Make sure only one instance of VDR does this:
|
||||
cLockFile LockFile(VideoDirectory);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: recording.h 1.48 2005/12/18 11:26:51 kls Exp $
|
||||
* $Id: recording.h 1.49 2006/01/20 17:18:28 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __RECORDING_H
|
||||
@ -21,9 +21,11 @@
|
||||
extern bool VfatFileSystem;
|
||||
|
||||
void RemoveDeletedRecordings(void);
|
||||
void AssertFreeDiskSpace(int Priority = 0);
|
||||
void AssertFreeDiskSpace(int Priority = 0, bool Force = false);
|
||||
///< The special Priority value -1 means that we shall get rid of any
|
||||
///< deleted recordings faster than normal (because we're cutting).
|
||||
///< If Force is true, the check will be done even if the timeout
|
||||
///< hasn't expired yet.
|
||||
|
||||
class cResumeFile {
|
||||
private:
|
||||
|
30
tools.c
30
tools.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: tools.c 1.110 2006/01/15 14:31:45 kls Exp $
|
||||
* $Id: tools.c 1.112 2006/01/20 14:01:28 kls Exp $
|
||||
*/
|
||||
|
||||
#include "tools.h"
|
||||
@ -26,9 +26,22 @@ extern "C" {
|
||||
#include <unistd.h>
|
||||
#include <utime.h>
|
||||
#include "i18n.h"
|
||||
#include "thread.h"
|
||||
|
||||
int SysLogLevel = 3;
|
||||
|
||||
#define MAXSYSLOGBUF 256
|
||||
|
||||
void syslog_with_tid(int priority, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char fmt[MAXSYSLOGBUF];
|
||||
snprintf(fmt, sizeof(fmt), "[%d] %s", cThread::ThreadId(), format);
|
||||
va_start(ap, format);
|
||||
vsyslog(priority, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
int BCD2INT(int x)
|
||||
{
|
||||
return ((1000000 * BCDCHARTOINT((x >> 24) & 0xFF)) +
|
||||
@ -125,13 +138,14 @@ char *strn0cpy(char *dest, const char *src, size_t n)
|
||||
|
||||
char *strreplace(char *s, char c1, char c2)
|
||||
{
|
||||
char *p = s;
|
||||
|
||||
while (p && *p) {
|
||||
if (*p == c1)
|
||||
*p = c2;
|
||||
p++;
|
||||
}
|
||||
if (s) {
|
||||
char *p = s;
|
||||
while (*p) {
|
||||
if (*p == c1)
|
||||
*p = c2;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
10
tools.h
10
tools.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: tools.h 1.89 2006/01/08 11:40:37 kls Exp $
|
||||
* $Id: tools.h 1.90 2006/01/15 16:19:56 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TOOLS_H
|
||||
@ -26,9 +26,9 @@ typedef unsigned long long int uint64;
|
||||
|
||||
extern int SysLogLevel;
|
||||
|
||||
#define esyslog(a...) void( (SysLogLevel > 0) ? syslog(LOG_ERR, a) : void() )
|
||||
#define isyslog(a...) void( (SysLogLevel > 1) ? syslog(LOG_INFO, a) : void() )
|
||||
#define dsyslog(a...) void( (SysLogLevel > 2) ? syslog(LOG_DEBUG, a) : void() )
|
||||
#define esyslog(a...) void( (SysLogLevel > 0) ? syslog_with_tid(LOG_ERR, a) : void() )
|
||||
#define isyslog(a...) void( (SysLogLevel > 1) ? syslog_with_tid(LOG_INFO, a) : void() )
|
||||
#define dsyslog(a...) void( (SysLogLevel > 2) ? syslog_with_tid(LOG_DEBUG, a) : void() )
|
||||
|
||||
#define LOG_ERROR esyslog("ERROR (%s,%d): %m", __FILE__, __LINE__)
|
||||
#define LOG_ERROR_STR(s) esyslog("ERROR: %s: %m", s)
|
||||
@ -52,6 +52,8 @@ template<class T> inline int sgn(T a) { return a < 0 ? -1 : a > 0 ? 1 : 0; }
|
||||
template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }
|
||||
#endif
|
||||
|
||||
void syslog_with_tid(int priority, const char *format, ...);
|
||||
|
||||
#define BCDCHARTOINT(x) (10 * ((x & 0xF0) >> 4) + (x & 0xF))
|
||||
int BCD2INT(int x);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: transfer.c 1.30 2005/08/14 10:55:03 kls Exp $
|
||||
* $Id: transfer.c 1.31 2006/01/21 14:13:16 kls Exp $
|
||||
*/
|
||||
|
||||
#include "transfer.h"
|
||||
@ -63,6 +63,7 @@ void cTransfer::Action(void)
|
||||
int Result = 0;
|
||||
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
|
||||
bool GotBufferReserve = false;
|
||||
GotBufferReserve = true; //XXX remove this line if you absolutely need the buffer reserve
|
||||
int RequiredBufferReserve = KILOBYTE(DvbCardWith4MBofSDRAM ? 288 : 576);
|
||||
#endif
|
||||
while (Running()) {
|
||||
|
31
vdr.c
31
vdr.c
@ -22,7 +22,7 @@
|
||||
*
|
||||
* The project's page is at http://www.cadsoft.de/vdr
|
||||
*
|
||||
* $Id: vdr.c 1.238 2006/01/15 13:31:57 kls Exp $
|
||||
* $Id: vdr.c 1.244 2006/01/22 15:59:13 kls Exp $
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
@ -447,7 +447,7 @@ int main(int argc, char *argv[])
|
||||
// Log file:
|
||||
|
||||
if (SysLogLevel > 0)
|
||||
openlog("vdr", LOG_PID | LOG_CONS, SysLogTarget);
|
||||
openlog("vdr", LOG_CONS, SysLogTarget); // LOG_PID doesn't work as expected under NPTL
|
||||
|
||||
// Check the video directory:
|
||||
|
||||
@ -727,7 +727,7 @@ int main(int argc, char *argv[])
|
||||
LastChannel = cDevice::CurrentChannel();
|
||||
LastChannelChanged = time(NULL);
|
||||
}
|
||||
if (time(NULL) - LastChannelChanged >= Setup.ZapTimeout && LastChannel != PreviousChannel[0] && LastChannel != PreviousChannel[1])
|
||||
if (time(NULL) - LastChannelChanged >= Setup.ZapTimeout && LastChannel != PreviousChannel[PreviousChannelIndex])
|
||||
PreviousChannel[PreviousChannelIndex ^= 1] = LastChannel;
|
||||
// Timers and Recordings:
|
||||
if (!Timers.BeingEdited()) {
|
||||
@ -822,6 +822,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
break;
|
||||
// Direct main menu functions:
|
||||
#define DirectMainFunction(function)\
|
||||
DELETE_MENU;\
|
||||
if (cControl::Control())\
|
||||
@ -855,7 +856,15 @@ int main(int argc, char *argv[])
|
||||
case kChanUp:
|
||||
case kChanDn|k_Repeat:
|
||||
case kChanDn:
|
||||
cDevice::SwitchChannel(NORMALKEY(key) == kChanUp ? 1 : -1);
|
||||
if (!Interact)
|
||||
Menu = new cDisplayChannel(NORMALKEY(key));
|
||||
else if (cDisplayChannel::IsOpen()) {
|
||||
Interact->ProcessKey(key);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
cDevice::SwitchChannel(NORMALKEY(key) == kChanUp ? 1 : -1);
|
||||
key = kNone; // nobody else needs to see these keys
|
||||
break;
|
||||
// Volume control:
|
||||
case kVolUp|k_Repeat:
|
||||
@ -901,9 +910,7 @@ int main(int argc, char *argv[])
|
||||
case kRecord:
|
||||
if (!cControl::Control()) {
|
||||
if (cRecordControls::Start())
|
||||
;//XXX Skins.Message(mtInfo, tr("Recording"));
|
||||
else
|
||||
Skins.Message(mtError, tr("No free DVB device to record!"));
|
||||
Skins.Message(mtInfo, tr("Recording started"));
|
||||
key = kNone; // nobody else needs to see this key
|
||||
}
|
||||
break;
|
||||
@ -947,8 +954,6 @@ int main(int argc, char *argv[])
|
||||
case osRecord: DELETE_MENU;
|
||||
if (cRecordControls::Start())
|
||||
Skins.Message(mtInfo, tr("Recording started"));
|
||||
else
|
||||
Skins.Message(mtError, tr("No free DVB device to record!"));
|
||||
break;
|
||||
case osRecordings:
|
||||
DELETE_MENU;
|
||||
@ -985,7 +990,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else {
|
||||
// Key functions in "normal" viewing mode:
|
||||
if (KeyMacros.Get(key)) {
|
||||
if (key != kNone && KeyMacros.Get(key)) {
|
||||
cRemote::PutMacro(key);
|
||||
key = kNone;
|
||||
}
|
||||
@ -999,21 +1004,17 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
// Direct Channel Select:
|
||||
case k1 ... k9:
|
||||
Menu = new cDisplayChannel(key);
|
||||
break;
|
||||
// Left/Right rotates trough channel groups:
|
||||
case kLeft|k_Repeat:
|
||||
case kLeft:
|
||||
case kRight|k_Repeat:
|
||||
case kRight:
|
||||
Menu = new cDisplayChannel(NORMALKEY(key));
|
||||
break;
|
||||
// Up/Down Channel Select:
|
||||
case kUp|k_Repeat:
|
||||
case kUp:
|
||||
case kDown|k_Repeat:
|
||||
case kDown:
|
||||
cDevice::SwitchChannel(NORMALKEY(key) == kUp ? 1 : -1);
|
||||
Menu = new cDisplayChannel(NORMALKEY(key));
|
||||
break;
|
||||
// Viewing Control:
|
||||
case kOk: LastChannel = -1; break; // forces channel display
|
||||
|
Loading…
x
Reference in New Issue
Block a user