mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 1.7.14
- Fixed handling empty strings in cSource::FromString(). - Assigned the source character 'I' to "IPTV" (suggested by Rolf Ahrenberg). - Assigned the source character 'V' to "Analog Video" (suggested by Lars Hanisch). This obsoletes the ANALOGTV patch. - Added support for ATSC devices (thanks to Alex Lasnier). This obsoletes the ATSC patch. - The "Source" item in the "Edit channel" menu now wraps around the list of sources (suggested by Halim Sahin). - Fixed editing channel parameters. - The new setup option "Recording/Delete timeshift recording" controls whether a timeshift recording is automatically deleted after viewing it. This obsoletes the DELTIMESHIFTREC patch. Note that the meaning of the values for this option is different from the DELTIMESHIFTREC patch: 0 means timeshift recordings are not automatically deleted (the default behavior as in previous versions), while 1 means to ask the user whether the recording shall be deleted. - Added cChannel::IsSourceType() to test if a channel's source is of a given type. - Changed the polarization characters in cDvbSourceParam::GetOsdItem() to uppercase. - The full timer file name is now displayed if it ends with "TITLE" or "EPISODE" (pointed out by Udo Richter). - Fixed "attempt to drop wrong frame from ring buffer" when skipping +/- one minute during replay. - The new setup option "Folders in timer menu" controls whether the file names in the timer menu are shown with their full folder path.
This commit is contained in:
58
sources.c
58
sources.c
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: sources.c 2.1 2010/02/28 12:00:31 kls Exp $
|
||||
* $Id: sources.c 2.2 2010/02/28 15:15:39 kls Exp $
|
||||
*/
|
||||
|
||||
#include "sources.h"
|
||||
@@ -55,35 +55,37 @@ cString cSource::ToString(int Code)
|
||||
|
||||
int cSource::FromString(const char *s)
|
||||
{
|
||||
if ('A' <= *s && *s <= 'Z') {
|
||||
int code = int(*s) << 24;
|
||||
if (code == stSat) {
|
||||
int pos = 0;
|
||||
bool dot = false;
|
||||
bool neg = false;
|
||||
while (*++s) {
|
||||
switch (*s) {
|
||||
case '0' ... '9': pos *= 10;
|
||||
pos += *s - '0';
|
||||
break;
|
||||
case '.': dot = true;
|
||||
break;
|
||||
case 'E': neg = true; // fall through to 'W'
|
||||
case 'W': if (!dot)
|
||||
pos *= 10;
|
||||
break;
|
||||
default: esyslog("ERROR: unknown source character '%c'", *s);
|
||||
return stNone;
|
||||
}
|
||||
}
|
||||
if (neg)
|
||||
pos = -pos;
|
||||
code |= (pos & st_Pos);
|
||||
if (!isempty(s)) {
|
||||
if ('A' <= *s && *s <= 'Z') {
|
||||
int code = int(*s) << 24;
|
||||
if (code == stSat) {
|
||||
int pos = 0;
|
||||
bool dot = false;
|
||||
bool neg = false;
|
||||
while (*++s) {
|
||||
switch (*s) {
|
||||
case '0' ... '9': pos *= 10;
|
||||
pos += *s - '0';
|
||||
break;
|
||||
case '.': dot = true;
|
||||
break;
|
||||
case 'E': neg = true; // fall through to 'W'
|
||||
case 'W': if (!dot)
|
||||
pos *= 10;
|
||||
break;
|
||||
default: esyslog("ERROR: unknown source character '%c'", *s);
|
||||
return stNone;
|
||||
}
|
||||
}
|
||||
if (neg)
|
||||
pos = -pos;
|
||||
code |= (pos & st_Pos);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
return code;
|
||||
else
|
||||
esyslog("ERROR: unknown source key '%c'", *s);
|
||||
}
|
||||
else
|
||||
esyslog("ERROR: unknown source key '%c'", *s);
|
||||
return stNone;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user