mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Several code modifications to avoid compiler warnings
This commit is contained in:
parent
1b973fd8eb
commit
6a208294be
@ -2459,6 +2459,7 @@ Michael Nork <mnork0@gmx.net>
|
|||||||
|
|
||||||
Winfried Köhler <w_koehl@gmx.de>
|
Winfried Köhler <w_koehl@gmx.de>
|
||||||
for fixing wrong value for TableIdBAT in libsi/si.h
|
for fixing wrong value for TableIdBAT in libsi/si.h
|
||||||
|
for making several code modifications to avoid compiler warnings
|
||||||
|
|
||||||
Igor M. Liplianin <liplianin@tut.by>
|
Igor M. Liplianin <liplianin@tut.by>
|
||||||
for a patch that was used to convert VDR to the S2API driver API
|
for a patch that was used to convert VDR to the S2API driver API
|
||||||
|
3
HISTORY
3
HISTORY
@ -6197,7 +6197,7 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed the default value for "Pause key handling" in the MANUAL (reported by
|
- Fixed the default value for "Pause key handling" in the MANUAL (reported by
|
||||||
Diego Pierotto).
|
Diego Pierotto).
|
||||||
|
|
||||||
2009-12-05: Version 1.7.11
|
2009-12-06: Version 1.7.11
|
||||||
|
|
||||||
- Fixed resetting the file size when regenerating the index file.
|
- Fixed resetting the file size when regenerating the index file.
|
||||||
- The new function cDevice::PatPmtParser() can be used in derived devices to access
|
- The new function cDevice::PatPmtParser() can be used in derived devices to access
|
||||||
@ -6209,3 +6209,4 @@ Video Disk Recorder Revision History
|
|||||||
- The 'sky' plugin is no longer part of the VDR source.
|
- The 'sky' plugin is no longer part of the VDR source.
|
||||||
- Improved SPU handling on devices with limited OSD capabilities (thanks to
|
- Improved SPU handling on devices with limited OSD capabilities (thanks to
|
||||||
Matthieu Castet).
|
Matthieu Castet).
|
||||||
|
- Several code modifications to avoid compiler warnings (thanks to Winfried Köhler).
|
||||||
|
@ -63,6 +63,10 @@ VDR Plugin 'hello' Revision History
|
|||||||
|
|
||||||
- Updated the Croatian language texts (thanks to Adrian Caval).
|
- Updated the Croatian language texts (thanks to Adrian Caval).
|
||||||
|
|
||||||
2008-009-06 Version 0.2.3
|
2008-09-06: Version 0.2.3
|
||||||
|
|
||||||
- Updated the Turkish language texts (thanks to Oktay Yolgeçen).
|
- Updated the Turkish language texts (thanks to Oktay Yolgeçen).
|
||||||
|
|
||||||
|
2009-12-06: Version 0.2.4
|
||||||
|
|
||||||
|
- Several code modifications to avoid compiler warnings (thanks to Winfried Köhler).
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: hello.c 2.1 2008/09/06 14:30:00 kls Exp $
|
* $Id: hello.c 2.2 2009/12/06 12:30:15 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#include <vdr/interface.h>
|
#include <vdr/interface.h>
|
||||||
#include <vdr/plugin.h>
|
#include <vdr/plugin.h>
|
||||||
|
|
||||||
static const char *VERSION = "0.2.3";
|
static const char *VERSION = "0.2.4";
|
||||||
static const char *DESCRIPTION = trNOOP("A friendly greeting");
|
static const char *DESCRIPTION = trNOOP("A friendly greeting");
|
||||||
static const char *MAINMENUENTRY = trNOOP("Hello");
|
static const char *MAINMENUENTRY = trNOOP("Hello");
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ bool cPluginHello::ProcessArgs(int argc, char *argv[])
|
|||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{ "aaa", required_argument, NULL, 'a' },
|
{ "aaa", required_argument, NULL, 'a' },
|
||||||
{ "bbb", no_argument, NULL, 'b' },
|
{ "bbb", no_argument, NULL, 'b' },
|
||||||
{ NULL }
|
{ NULL, no_argument, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
|
@ -33,3 +33,7 @@ VDR Plugin 'pictures' Revision History
|
|||||||
2008-03-14: Version 0.0.7
|
2008-03-14: Version 0.0.7
|
||||||
|
|
||||||
- Added Russian translations (thanks to Alexander Gross).
|
- Added Russian translations (thanks to Alexander Gross).
|
||||||
|
|
||||||
|
2009-12-06: Version 0.0.8
|
||||||
|
|
||||||
|
- Several code modifications to avoid compiler warnings (thanks to Winfried Köhler).
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: pictures.c 1.7 2008/03/14 12:57:19 kls Exp $
|
* $Id: pictures.c 2.1 2009/12/06 12:30:21 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
|
||||||
static const char *VERSION = "0.0.7";
|
static const char *VERSION = "0.0.8";
|
||||||
static const char *DESCRIPTION = trNOOP("A simple picture viewer");
|
static const char *DESCRIPTION = trNOOP("A simple picture viewer");
|
||||||
static const char *MAINMENUENTRY = trNOOP("Pictures");
|
static const char *MAINMENUENTRY = trNOOP("Pictures");
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ bool cPluginPictures::ProcessArgs(int argc, char *argv[])
|
|||||||
// Implement command line argument processing here if applicable.
|
// Implement command line argument processing here if applicable.
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{ "dir", required_argument, NULL, 'd' },
|
{ "dir", required_argument, NULL, 'd' },
|
||||||
{ NULL }
|
{ NULL, no_argument, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
|
21
channels.c
21
channels.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: channels.c 2.8 2009/08/30 11:25:50 kls Exp $
|
* $Id: channels.c 2.9 2009/12/05 15:28:32 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "channels.h"
|
#include "channels.h"
|
||||||
@ -24,14 +24,14 @@ const tChannelParameterMap InversionValues[] = {
|
|||||||
{ 0, INVERSION_OFF, trNOOP("off") },
|
{ 0, INVERSION_OFF, trNOOP("off") },
|
||||||
{ 1, INVERSION_ON, trNOOP("on") },
|
{ 1, INVERSION_ON, trNOOP("on") },
|
||||||
{ 999, INVERSION_AUTO, trNOOP("auto") },
|
{ 999, INVERSION_AUTO, trNOOP("auto") },
|
||||||
{ -1 }
|
{ -1, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
const tChannelParameterMap BandwidthValues[] = {
|
const tChannelParameterMap BandwidthValues[] = {
|
||||||
{ 6, 6000000, "6 MHz" },
|
{ 6, 6000000, "6 MHz" },
|
||||||
{ 7, 7000000, "7 MHz" },
|
{ 7, 7000000, "7 MHz" },
|
||||||
{ 8, 8000000, "8 MHz" },
|
{ 8, 8000000, "8 MHz" },
|
||||||
{ -1 }
|
{ -1, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
const tChannelParameterMap CoderateValues[] = {
|
const tChannelParameterMap CoderateValues[] = {
|
||||||
@ -47,7 +47,7 @@ const tChannelParameterMap CoderateValues[] = {
|
|||||||
{ 89, FEC_8_9, "8/9" },
|
{ 89, FEC_8_9, "8/9" },
|
||||||
{ 910, FEC_9_10, "9/10" },
|
{ 910, FEC_9_10, "9/10" },
|
||||||
{ 999, FEC_AUTO, trNOOP("auto") },
|
{ 999, FEC_AUTO, trNOOP("auto") },
|
||||||
{ -1 }
|
{ -1, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
const tChannelParameterMap ModulationValues[] = {
|
const tChannelParameterMap ModulationValues[] = {
|
||||||
@ -62,20 +62,20 @@ const tChannelParameterMap ModulationValues[] = {
|
|||||||
{ 10, VSB_8, "VSB8" },
|
{ 10, VSB_8, "VSB8" },
|
||||||
{ 11, VSB_16, "VSB16" },
|
{ 11, VSB_16, "VSB16" },
|
||||||
{ 998, QAM_AUTO, "QAMAUTO" },
|
{ 998, QAM_AUTO, "QAMAUTO" },
|
||||||
{ -1 }
|
{ -1, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
const tChannelParameterMap SystemValues[] = {
|
const tChannelParameterMap SystemValues[] = {
|
||||||
{ 0, SYS_DVBS, "DVB-S" },
|
{ 0, SYS_DVBS, "DVB-S" },
|
||||||
{ 1, SYS_DVBS2, "DVB-S2" },
|
{ 1, SYS_DVBS2, "DVB-S2" },
|
||||||
{ -1 }
|
{ -1, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
const tChannelParameterMap TransmissionValues[] = {
|
const tChannelParameterMap TransmissionValues[] = {
|
||||||
{ 2, TRANSMISSION_MODE_2K, "2K" },
|
{ 2, TRANSMISSION_MODE_2K, "2K" },
|
||||||
{ 8, TRANSMISSION_MODE_8K, "8K" },
|
{ 8, TRANSMISSION_MODE_8K, "8K" },
|
||||||
{ 999, TRANSMISSION_MODE_AUTO, trNOOP("auto") },
|
{ 999, TRANSMISSION_MODE_AUTO, trNOOP("auto") },
|
||||||
{ -1 }
|
{ -1, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
const tChannelParameterMap GuardValues[] = {
|
const tChannelParameterMap GuardValues[] = {
|
||||||
@ -84,7 +84,7 @@ const tChannelParameterMap GuardValues[] = {
|
|||||||
{ 16, GUARD_INTERVAL_1_16, "1/16" },
|
{ 16, GUARD_INTERVAL_1_16, "1/16" },
|
||||||
{ 32, GUARD_INTERVAL_1_32, "1/32" },
|
{ 32, GUARD_INTERVAL_1_32, "1/32" },
|
||||||
{ 999, GUARD_INTERVAL_AUTO, trNOOP("auto") },
|
{ 999, GUARD_INTERVAL_AUTO, trNOOP("auto") },
|
||||||
{ -1 }
|
{ -1, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
const tChannelParameterMap HierarchyValues[] = {
|
const tChannelParameterMap HierarchyValues[] = {
|
||||||
@ -93,7 +93,7 @@ const tChannelParameterMap HierarchyValues[] = {
|
|||||||
{ 2, HIERARCHY_2, "2" },
|
{ 2, HIERARCHY_2, "2" },
|
||||||
{ 4, HIERARCHY_4, "4" },
|
{ 4, HIERARCHY_4, "4" },
|
||||||
{ 999, HIERARCHY_AUTO, trNOOP("auto") },
|
{ 999, HIERARCHY_AUTO, trNOOP("auto") },
|
||||||
{ -1 }
|
{ -1, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
const tChannelParameterMap RollOffValues[] = {
|
const tChannelParameterMap RollOffValues[] = {
|
||||||
@ -101,7 +101,7 @@ const tChannelParameterMap RollOffValues[] = {
|
|||||||
{ 20, ROLLOFF_20, "0.20" },
|
{ 20, ROLLOFF_20, "0.20" },
|
||||||
{ 25, ROLLOFF_25, "0.25" },
|
{ 25, ROLLOFF_25, "0.25" },
|
||||||
{ 35, ROLLOFF_35, "0.35" },
|
{ 35, ROLLOFF_35, "0.35" },
|
||||||
{ -1 }
|
{ -1, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
int UserIndex(int Value, const tChannelParameterMap *Map)
|
int UserIndex(int Value, const tChannelParameterMap *Map)
|
||||||
@ -259,6 +259,7 @@ int cChannel::Transponder(int Frequency, char Polarization)
|
|||||||
case 'v': Frequency += 200000; break;
|
case 'v': Frequency += 200000; break;
|
||||||
case 'l': Frequency += 300000; break;
|
case 'l': Frequency += 300000; break;
|
||||||
case 'r': Frequency += 400000; break;
|
case 'r': Frequency += 400000; break;
|
||||||
|
default: esyslog("ERROR: invalid value for Polarization '%c'", Polarization);
|
||||||
}
|
}
|
||||||
return Frequency;
|
return Frequency;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: channels.h 2.6 2009/08/30 11:05:54 kls Exp $
|
* $Id: channels.h 2.7 2009/12/06 12:57:45 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CHANNELS_H
|
#ifndef __CHANNELS_H
|
||||||
@ -188,9 +188,9 @@ public:
|
|||||||
const char *Alang(int i) const { return (0 <= i && i < MAXAPIDS) ? alangs[i] : ""; }
|
const char *Alang(int i) const { return (0 <= i && i < MAXAPIDS) ? alangs[i] : ""; }
|
||||||
const char *Dlang(int i) const { return (0 <= i && i < MAXDPIDS) ? dlangs[i] : ""; }
|
const char *Dlang(int i) const { return (0 <= i && i < MAXDPIDS) ? dlangs[i] : ""; }
|
||||||
const char *Slang(int i) const { return (0 <= i && i < MAXSPIDS) ? slangs[i] : ""; }
|
const char *Slang(int i) const { return (0 <= i && i < MAXSPIDS) ? slangs[i] : ""; }
|
||||||
uchar SubtitlingType(int i) const { return (0 <= i && i < MAXSPIDS) ? subtitlingTypes[i] : 0; }
|
uchar SubtitlingType(int i) const { return (0 <= i && i < MAXSPIDS) ? subtitlingTypes[i] : uchar(0); }
|
||||||
uint16_t CompositionPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? compositionPageIds[i] : 0; }
|
uint16_t CompositionPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? compositionPageIds[i] : uint16_t(0); }
|
||||||
uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : 0; }
|
uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : uint16_t(0); }
|
||||||
int Tpid(void) const { return tpid; }
|
int Tpid(void) const { return tpid; }
|
||||||
const int *Caids(void) const { return caids; }
|
const int *Caids(void) const { return caids; }
|
||||||
int Ca(int Index = 0) const { return Index < MAXCAIDS ? caids[Index] : 0; }
|
int Ca(int Index = 0) const { return Index < MAXCAIDS ? caids[Index] : 0; }
|
||||||
|
15
ci.c
15
ci.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: ci.c 2.3 2009/08/16 13:21:07 kls Exp $
|
* $Id: ci.c 2.4 2009/12/05 15:51:12 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ci.h"
|
#include "ci.h"
|
||||||
@ -1424,6 +1424,15 @@ bool cCiTransportConnection::Process(cTPDU *TPDU)
|
|||||||
SendTPDU(T_DTC_REPLY);
|
SendTPDU(T_DTC_REPLY);
|
||||||
state = stIDLE;
|
state = stIDLE;
|
||||||
return true;
|
return true;
|
||||||
|
case T_RCV:
|
||||||
|
case T_CREATE_TC:
|
||||||
|
case T_CTC_REPLY:
|
||||||
|
case T_DTC_REPLY:
|
||||||
|
case T_NEW_TC:
|
||||||
|
case T_TC_ERROR:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
esyslog("ERROR: unknown TPDU tag: 0x%02X (%s)", TPDU->Tag(), __FUNCTION__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (timer.TimedOut())
|
else if (timer.TimedOut())
|
||||||
@ -1443,6 +1452,8 @@ bool cCiTransportConnection::Process(cTPDU *TPDU)
|
|||||||
state = stIDLE;
|
state = stIDLE;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
esyslog("ERROR: unknown state: %d (%s)", state, __FUNCTION__);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1668,6 +1679,8 @@ void cCamSlot::Process(cTPDU *TPDU)
|
|||||||
NewConnection();
|
NewConnection();
|
||||||
resendPmt = caProgramList.Count() > 0;
|
resendPmt = caProgramList.Count() > 0;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
esyslog("ERROR: unknown module status %d (%s)", ms, __FUNCTION__);
|
||||||
}
|
}
|
||||||
lastModuleStatus = ms;
|
lastModuleStatus = ms;
|
||||||
}
|
}
|
||||||
|
4
config.c
4
config.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: config.c 2.5 2009/06/13 10:25:05 kls Exp $
|
* $Id: config.c 2.6 2009/12/05 15:30:30 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -76,7 +76,7 @@ const char *cCommand::Execute(const char *Parameters)
|
|||||||
while ((c = fgetc(p)) != EOF) {
|
while ((c = fgetc(p)) != EOF) {
|
||||||
if (l % 20 == 0)
|
if (l % 20 == 0)
|
||||||
result = (char *)realloc(result, l + 21);
|
result = (char *)realloc(result, l + 21);
|
||||||
result[l++] = c;
|
result[l++] = char(c);
|
||||||
}
|
}
|
||||||
if (result)
|
if (result)
|
||||||
result[l] = 0;
|
result[l] = 0;
|
||||||
|
4
device.c
4
device.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: device.c 2.26 2009/11/22 13:19:03 kls Exp $
|
* $Id: device.c 2.27 2009/12/05 15:52:54 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
@ -371,6 +371,7 @@ void cDevice::SetVideoDisplayFormat(eVideoDisplayFormat VideoDisplayFormat)
|
|||||||
case vdfCenterCutOut:
|
case vdfCenterCutOut:
|
||||||
spuDecoder->setScaleMode(cSpuDecoder::eSpuNormal);
|
spuDecoder->setScaleMode(cSpuDecoder::eSpuNormal);
|
||||||
break;
|
break;
|
||||||
|
default: esyslog("ERROR: invalid value for VideoDisplayFormat '%d'", VideoDisplayFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -611,6 +612,7 @@ bool cDevice::SwitchChannel(const cChannel *Channel, bool LiveView)
|
|||||||
case scrNoTransfer: Skins.Message(mtError, tr("Can't start Transfer Mode!"));
|
case scrNoTransfer: Skins.Message(mtError, tr("Can't start Transfer Mode!"));
|
||||||
return false;
|
return false;
|
||||||
case scrFailed: break; // loop will retry
|
case scrFailed: break; // loop will retry
|
||||||
|
default: esyslog("ERROR: invalid return value from SetChannel");
|
||||||
}
|
}
|
||||||
esyslog("retrying");
|
esyslog("retrying");
|
||||||
}
|
}
|
||||||
|
6
diseqc.c
6
diseqc.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: diseqc.c 1.6 2008/02/10 14:09:27 kls Exp $
|
* $Id: diseqc.c 2.1 2009/12/05 15:57:02 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "diseqc.h"
|
#include "diseqc.h"
|
||||||
@ -36,7 +36,7 @@ bool cDiseqc::Parse(const char *s)
|
|||||||
if (4 <= fields && fields <= 5) {
|
if (4 <= fields && fields <= 5) {
|
||||||
source = cSource::FromString(sourcebuf);
|
source = cSource::FromString(sourcebuf);
|
||||||
if (Sources.Get(source)) {
|
if (Sources.Get(source)) {
|
||||||
polarization = toupper(polarization);
|
polarization = char(toupper(polarization));
|
||||||
if (polarization == 'V' || polarization == 'H' || polarization == 'L' || polarization == 'R') {
|
if (polarization == 'V' || polarization == 'H' || polarization == 'L' || polarization == 'R') {
|
||||||
parsing = true;
|
parsing = true;
|
||||||
char *CurrentAction = NULL;
|
char *CurrentAction = NULL;
|
||||||
@ -81,7 +81,7 @@ char *cDiseqc::Codes(char *s)
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
int n = strtol(t, &p, 16);
|
int n = strtol(t, &p, 16);
|
||||||
if (!errno && p != t && 0 <= n && n <= 255) {
|
if (!errno && p != t && 0 <= n && n <= 255) {
|
||||||
codes[numCodes++] = n;
|
codes[numCodes++] = uchar(n);
|
||||||
t = skipspace(p);
|
t = skipspace(p);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbdevice.c 2.21 2009/06/06 11:17:20 kls Exp $
|
* $Id: dvbdevice.c 2.22 2009/12/05 16:02:11 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
@ -238,6 +238,7 @@ bool cDvbTuner::SetFrontend(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: esyslog("ERROR: unknown diseqc command %d", da);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diseqcCommands = diseqc->Commands();
|
diseqcCommands = diseqc->Commands();
|
||||||
@ -383,6 +384,8 @@ void cDvbTuner::Action(void)
|
|||||||
lastTimeoutReport = 0;
|
lastTimeoutReport = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
default: esyslog("ERROR: unknown tuner status %d", tunerStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tunerStatus != tsTuned)
|
if (tunerStatus != tsTuned)
|
||||||
@ -720,6 +723,7 @@ void cDvbDevice::SetVideoDisplayFormat(eVideoDisplayFormat VideoDisplayFormat)
|
|||||||
case vdfCenterCutOut:
|
case vdfCenterCutOut:
|
||||||
CHECK(ioctl(fd_video, VIDEO_SET_DISPLAY_FORMAT, VIDEO_CENTER_CUT_OUT));
|
CHECK(ioctl(fd_video, VIDEO_SET_DISPLAY_FORMAT, VIDEO_CENTER_CUT_OUT));
|
||||||
break;
|
break;
|
||||||
|
default: esyslog("ERROR: unknown video display format %d", VideoDisplayFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1179,6 +1183,7 @@ bool cDvbDevice::SetPlayMode(ePlayMode PlayMode)
|
|||||||
close(fd_audio);
|
close(fd_audio);
|
||||||
fd_video = fd_audio = -1;
|
fd_video = fd_audio = -1;
|
||||||
break;
|
break;
|
||||||
|
default: esyslog("ERROR: unknown playmode %d", PlayMode);
|
||||||
}
|
}
|
||||||
playMode = PlayMode;
|
playMode = PlayMode;
|
||||||
return true;
|
return true;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbplayer.c 2.17 2009/05/31 14:12:42 kls Exp $
|
* $Id: dvbplayer.c 2.18 2009/12/05 16:04:04 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbplayer.h"
|
#include "dvbplayer.h"
|
||||||
@ -666,6 +666,7 @@ void cDvbPlayer::Forward(void)
|
|||||||
trickSpeed = NORMAL_SPEED;
|
trickSpeed = NORMAL_SPEED;
|
||||||
TrickSpeed(Setup.MultiSpeedMode ? -1 : -MAX_SPEEDS);
|
TrickSpeed(Setup.MultiSpeedMode ? -1 : -MAX_SPEEDS);
|
||||||
break;
|
break;
|
||||||
|
default: esyslog("ERROR: unknown playMode %d (%s)", playMode, __FUNCTION__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -717,6 +718,7 @@ void cDvbPlayer::Backward(void)
|
|||||||
TrickSpeed(Setup.MultiSpeedMode ? -1 : -MAX_SPEEDS);
|
TrickSpeed(Setup.MultiSpeedMode ? -1 : -MAX_SPEEDS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: esyslog("ERROR: unknown playMode %d (%s)", playMode, __FUNCTION__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
dvbspu.c
2
dvbspu.c
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* parts of this file are derived from the OMS program.
|
* parts of this file are derived from the OMS program.
|
||||||
*
|
*
|
||||||
* $Id: dvbspu.c 2.3 2009/12/05 14:41:40 kls Exp $
|
* $Id: dvbspu.c 2.4 2009/12/05 16:06:12 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbspu.h"
|
#include "dvbspu.h"
|
||||||
|
5
dvbspu.h
5
dvbspu.h
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* parts of this file are derived from the OMS program.
|
* parts of this file are derived from the OMS program.
|
||||||
*
|
*
|
||||||
* $Id: dvbspu.h 2.2 2009/12/05 14:40:08 kls Exp $
|
* $Id: dvbspu.h 2.3 2009/12/05 15:17:08 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DVBSPU_H
|
#ifndef __DVBSPU_H
|
||||||
@ -197,8 +197,7 @@ inline uint32_t cDvbSpuPalette::yuv2rgb(uint32_t yuv_color)
|
|||||||
|
|
||||||
inline uint32_t cDvbSpuPalette::getColor(uint8_t idx, uint8_t trans) const
|
inline uint32_t cDvbSpuPalette::getColor(uint8_t idx, uint8_t trans) const
|
||||||
{
|
{
|
||||||
uint8_t t = trans == 0x0f ? 0xff : trans << 4;
|
return palette[idx] | (trans == 0x0f) ? 0xff000000 : (trans << 28);
|
||||||
return palette[idx] | (t << 24);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __DVBSPU_H
|
#endif // __DVBSPU_H
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Original author: Marco Schlüßler <marco@lordzodiac.de>
|
* Original author: Marco Schlüßler <marco@lordzodiac.de>
|
||||||
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
|
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
|
||||||
*
|
*
|
||||||
* $Id: dvbsubtitle.c 2.2 2009/11/22 12:28:53 kls Exp $
|
* $Id: dvbsubtitle.c 2.3 2009/12/05 16:11:54 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbsubtitle.h"
|
#include "dvbsubtitle.h"
|
||||||
@ -160,21 +160,22 @@ void cSubtitleObject::DecodeSubBlock(const uchar *Data, int Length, bool Even)
|
|||||||
;
|
;
|
||||||
break;
|
break;
|
||||||
case 0x20: //TODO
|
case 0x20: //TODO
|
||||||
dbgobjects("sub block 2 to 4 map");
|
dbgobjects("sub block 2 to 4 map\n");
|
||||||
index += 4;
|
index += 4;
|
||||||
break;
|
break;
|
||||||
case 0x21: //TODO
|
case 0x21: //TODO
|
||||||
dbgobjects("sub block 2 to 8 map");
|
dbgobjects("sub block 2 to 8 map\n");
|
||||||
index += 4;
|
index += 4;
|
||||||
break;
|
break;
|
||||||
case 0x22: //TODO
|
case 0x22: //TODO
|
||||||
dbgobjects("sub block 4 to 8 map");
|
dbgobjects("sub block 4 to 8 map\n");
|
||||||
index += 16;
|
index += 16;
|
||||||
break;
|
break;
|
||||||
case 0xF0:
|
case 0xF0:
|
||||||
x = 0;
|
x = 0;
|
||||||
y += 2;
|
y += 2;
|
||||||
break;
|
break;
|
||||||
|
default: dbgobjects("unknown sub block %s %d\n", __FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -233,7 +234,7 @@ bool cSubtitleObject::Decode2BppCodeString(const uchar *Data, int &Index, int &x
|
|||||||
rl = 1; //color 0
|
rl = 1; //color 0
|
||||||
else {
|
else {
|
||||||
code = Get2Bits(Data, Index);
|
code = Get2Bits(Data, Index);
|
||||||
switch (code & 0x3) { //switch_3
|
switch (code & 3) { //switch_3
|
||||||
case 0:
|
case 0:
|
||||||
return false;
|
return false;
|
||||||
case 1:
|
case 1:
|
||||||
@ -247,6 +248,7 @@ bool cSubtitleObject::Decode2BppCodeString(const uchar *Data, int &Index, int &x
|
|||||||
rl = (Get2Bits(Data, Index) << 6) + (Get2Bits(Data, Index) << 4) + (Get2Bits(Data, Index) << 2) + Get2Bits(Data, Index) + 29;
|
rl = (Get2Bits(Data, Index) << 6) + (Get2Bits(Data, Index) << 4) + (Get2Bits(Data, Index) << 2) + Get2Bits(Data, Index) + 29;
|
||||||
color = Get2Bits(Data, Index);
|
color = Get2Bits(Data, Index);
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -283,6 +285,7 @@ bool cSubtitleObject::Decode4BppCodeString(const uchar *Data, int &Index, int &x
|
|||||||
rl = (Get4Bits(Data, Index) << 4) + Get4Bits(Data, Index) + 25;
|
rl = (Get4Bits(Data, Index) << 4) + Get4Bits(Data, Index) + 25;
|
||||||
color = Get4Bits(Data, Index);
|
color = Get4Bits(Data, Index);
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -516,6 +519,7 @@ void cDvbSubtitlePage::SetState(int State)
|
|||||||
break;
|
break;
|
||||||
case 3: // reserved
|
case 3: // reserved
|
||||||
break;
|
break;
|
||||||
|
default: dbgpages("unknown page state (%s %d)\n", __FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -900,6 +904,7 @@ int cDvbSubtitleConverter::ExtractSegment(const uchar *Data, int Length, int64_t
|
|||||||
case 2: region->FillRegion((Data[6 + 9] & 0x0C) >> 2); break;
|
case 2: region->FillRegion((Data[6 + 9] & 0x0C) >> 2); break;
|
||||||
case 4: region->FillRegion((Data[6 + 9] & 0xF0) >> 4); break;
|
case 4: region->FillRegion((Data[6 + 9] & 0xF0) >> 4); break;
|
||||||
case 8: region->FillRegion(Data[6 + 8]); break;
|
case 8: region->FillRegion(Data[6 + 8]); break;
|
||||||
|
default: dbgregions("unknown bpp %d (%s %d)\n", region->Bpp(), __FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 6 + 10; i < segmentLength; i += 6) {
|
for (int i = 6 + 10; i < segmentLength; i += 6) {
|
||||||
|
3
eit.c
3
eit.c
@ -8,7 +8,7 @@
|
|||||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
||||||
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
|
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
|
||||||
*
|
*
|
||||||
* $Id: eit.c 2.6 2009/06/21 13:46:20 kls Exp $
|
* $Id: eit.c 2.7 2009/12/05 16:13:22 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "eit.h"
|
#include "eit.h"
|
||||||
@ -354,5 +354,6 @@ void cEitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
cTDT TDT(Data);
|
cTDT TDT(Data);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
7
epg.c
7
epg.c
@ -7,7 +7,7 @@
|
|||||||
* Original version (as used in VDR before 1.3.0) written by
|
* Original version (as used in VDR before 1.3.0) written by
|
||||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
||||||
*
|
*
|
||||||
* $Id: epg.c 2.1 2008/05/01 14:53:55 kls Exp $
|
* $Id: epg.c 2.2 2009/12/05 16:17:08 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "epg.h"
|
#include "epg.h"
|
||||||
@ -603,6 +603,7 @@ void cEvent::FixEpgBugs(void)
|
|||||||
case 0x0F: p->description = strdup("HD 16:9"); break;
|
case 0x0F: p->description = strdup("HD 16:9"); break;
|
||||||
case 0x0C:
|
case 0x0C:
|
||||||
case 0x10: p->description = strdup("HD >16:9"); break;
|
case 0x10: p->description = strdup("HD >16:9"); break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
EpgBugFixStat(9, ChannelID());
|
EpgBugFixStat(9, ChannelID());
|
||||||
}
|
}
|
||||||
@ -621,12 +622,13 @@ void cEvent::FixEpgBugs(void)
|
|||||||
if (!p->description) {
|
if (!p->description) {
|
||||||
switch (p->type) {
|
switch (p->type) {
|
||||||
case 0x05: p->description = strdup("Dolby Digital"); break;
|
case 0x05: p->description = strdup("Dolby Digital"); break;
|
||||||
// all others will just display the language
|
default: ; // all others will just display the language
|
||||||
}
|
}
|
||||||
EpgBugFixStat(11, ChannelID());
|
EpgBugFixStat(11, ChannelID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -863,6 +865,7 @@ void cSchedule::Dump(FILE *f, const char *Prefix, eDumpMode DumpMode, time_t AtT
|
|||||||
p->Dump(f, Prefix);
|
p->Dump(f, Prefix);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: esyslog("ERROR: unknown DumpMode %d (%s %d)", DumpMode, __FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
fprintf(f, "%sc\n", Prefix);
|
fprintf(f, "%sc\n", Prefix);
|
||||||
}
|
}
|
||||||
|
3
font.c
3
font.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: font.c 2.2 2009/05/03 11:15:39 kls Exp $
|
* $Id: font.c 2.3 2009/12/05 16:19:00 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
@ -346,6 +346,7 @@ const cFont *cFont::GetFont(eDvbFont Font)
|
|||||||
case fontOsd: SetFont(Font, Setup.FontOsd, Setup.FontOsdSize); break;
|
case fontOsd: SetFont(Font, Setup.FontOsd, Setup.FontOsdSize); break;
|
||||||
case fontSml: SetFont(Font, Setup.FontSml, Setup.FontSmlSize); break;
|
case fontSml: SetFont(Font, Setup.FontSml, Setup.FontSmlSize); break;
|
||||||
case fontFix: SetFont(Font, Setup.FontFix, Setup.FontFixSize); break;
|
case fontFix: SetFont(Font, Setup.FontFix, Setup.FontFixSize); break;
|
||||||
|
default: esyslog("ERROR: unknown Font %d (%s %d)", Font, __FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fonts[Font];
|
return fonts[Font];
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or *
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
* (at your option) any later version. *
|
* (at your option) any later version. *
|
||||||
* *
|
* *
|
||||||
* $Id: si.c 1.25 2008/03/05 17:00:55 kls Exp $
|
* $Id: si.c 2.1 2009/12/05 16:20:12 kls Exp $
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
@ -720,6 +720,7 @@ Descriptor *Descriptor::getDescriptor(CharArray da, DescriptorTagDomain domain,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: ; // unknown domain, nothing to do
|
||||||
}
|
}
|
||||||
d->setData(da);
|
d->setData(da);
|
||||||
return d;
|
return d;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* the Free Software Foundation; either version 2 of the License, or *
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
* (at your option) any later version. *
|
* (at your option) any later version. *
|
||||||
* *
|
* *
|
||||||
* $Id: si.h 2.1 2008/09/06 12:44:06 kls Exp $
|
* $Id: si.h 2.2 2009/12/06 11:37:35 kls Exp $
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
@ -411,6 +411,8 @@ public:
|
|||||||
return data.FourBytes(index);
|
return data.FourBytes(index);
|
||||||
case 8:
|
case 8:
|
||||||
return (SixtyFourBit(data.FourBytes(index)) << 32) | data.FourBytes(index+4);
|
return (SixtyFourBit(data.FourBytes(index)) << 32) | data.FourBytes(index+4);
|
||||||
|
default:
|
||||||
|
return 0; // just to avoid a compiler warning
|
||||||
}
|
}
|
||||||
return 0; // just to avoid a compiler warning
|
return 0; // just to avoid a compiler warning
|
||||||
}
|
}
|
||||||
|
13
menu.c
13
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.c 2.9 2009/06/21 09:56:06 kls Exp $
|
* $Id: menu.c 2.10 2009/12/06 11:29:05 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -1373,6 +1373,7 @@ eOSState cMenuSchedule::Number(void)
|
|||||||
case cMenuScheduleItem::ssmThisThis: PrepareScheduleThisThis(Event, Channel); break;
|
case cMenuScheduleItem::ssmThisThis: PrepareScheduleThisThis(Event, Channel); break;
|
||||||
case cMenuScheduleItem::ssmThisAll: PrepareScheduleThisAll(Event, Channel); break;
|
case cMenuScheduleItem::ssmThisAll: PrepareScheduleThisAll(Event, Channel); break;
|
||||||
case cMenuScheduleItem::ssmAllAll: PrepareScheduleAllAll(Event, Channel); break;
|
case cMenuScheduleItem::ssmAllAll: PrepareScheduleAllAll(Event, Channel); break;
|
||||||
|
default: esyslog("ERROR: unknown SortMode %d (%s %d)", cMenuScheduleItem::SortMode(), __FUNCTION__, __LINE__);
|
||||||
}
|
}
|
||||||
CurrentItem = (cMenuScheduleItem *)Get(Current());
|
CurrentItem = (cMenuScheduleItem *)Get(Current());
|
||||||
Sort();
|
Sort();
|
||||||
@ -1897,6 +1898,7 @@ void cMenuRecordings::SetHelpKeys(void)
|
|||||||
case 1: SetHelp(tr("Button$Open")); break;
|
case 1: SetHelp(tr("Button$Open")); break;
|
||||||
case 2:
|
case 2:
|
||||||
case 3: SetHelp(RecordingCommands.Count() ? tr("Commands") : tr("Button$Play"), tr("Button$Rewind"), tr("Button$Delete"), NewHelpKeys == 3 ? tr("Button$Info") : NULL);
|
case 3: SetHelp(RecordingCommands.Count() ? tr("Commands") : tr("Button$Play"), tr("Button$Rewind"), tr("Button$Delete"), NewHelpKeys == 3 ? tr("Button$Info") : NULL);
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
helpKeys = NewHelpKeys;
|
helpKeys = NewHelpKeys;
|
||||||
}
|
}
|
||||||
@ -2242,18 +2244,18 @@ eOSState cMenuSetupOSD::ProcessKey(eKeys Key)
|
|||||||
Utf8Strn0Cpy(data.OSDTheme, themes.Name(themeIndex), sizeof(data.OSDTheme));
|
Utf8Strn0Cpy(data.OSDTheme, themes.Name(themeIndex), sizeof(data.OSDTheme));
|
||||||
ModifiedAppearance |= themeIndex != originalThemeIndex;
|
ModifiedAppearance |= themeIndex != originalThemeIndex;
|
||||||
}
|
}
|
||||||
if (data.OSDLeftP != Setup.OSDLeftP || data.OSDTopP != Setup.OSDTopP || data.OSDWidthP != Setup.OSDWidthP || data.OSDHeightP != Setup.OSDHeightP)
|
if (!(DoubleEqual(data.OSDLeftP, Setup.OSDLeftP) && DoubleEqual(data.OSDTopP, Setup.OSDTopP) && DoubleEqual(data.OSDWidthP, Setup.OSDWidthP) && DoubleEqual(data.OSDHeightP, Setup.OSDHeightP)))
|
||||||
ModifiedAppearance = true;
|
ModifiedAppearance = true;
|
||||||
if (data.UseSmallFont != Setup.UseSmallFont || data.AntiAlias != Setup.AntiAlias)
|
if (data.UseSmallFont != Setup.UseSmallFont || data.AntiAlias != Setup.AntiAlias)
|
||||||
ModifiedAppearance = true;
|
ModifiedAppearance = true;
|
||||||
Utf8Strn0Cpy(data.FontOsd, fontOsdNames[fontOsdIndex], sizeof(data.FontOsd));
|
Utf8Strn0Cpy(data.FontOsd, fontOsdNames[fontOsdIndex], sizeof(data.FontOsd));
|
||||||
Utf8Strn0Cpy(data.FontSml, fontSmlNames[fontSmlIndex], sizeof(data.FontSml));
|
Utf8Strn0Cpy(data.FontSml, fontSmlNames[fontSmlIndex], sizeof(data.FontSml));
|
||||||
Utf8Strn0Cpy(data.FontFix, fontFixNames[fontFixIndex], sizeof(data.FontFix));
|
Utf8Strn0Cpy(data.FontFix, fontFixNames[fontFixIndex], sizeof(data.FontFix));
|
||||||
if (strcmp(data.FontOsd, Setup.FontOsd) || data.FontOsdSizeP != Setup.FontOsdSizeP)
|
if (strcmp(data.FontOsd, Setup.FontOsd) || !DoubleEqual(data.FontOsdSizeP, Setup.FontOsdSizeP))
|
||||||
ModifiedAppearance = true;
|
ModifiedAppearance = true;
|
||||||
if (strcmp(data.FontSml, Setup.FontSml) || data.FontSmlSizeP != Setup.FontSmlSizeP)
|
if (strcmp(data.FontSml, Setup.FontSml) || !DoubleEqual(data.FontSmlSizeP, Setup.FontSmlSizeP))
|
||||||
ModifiedAppearance = true;
|
ModifiedAppearance = true;
|
||||||
if (strcmp(data.FontFix, Setup.FontFix) || data.FontFixSizeP != Setup.FontFixSizeP)
|
if (strcmp(data.FontFix, Setup.FontFix) || !DoubleEqual(data.FontFixSizeP, Setup.FontFixSizeP))
|
||||||
ModifiedAppearance = true;
|
ModifiedAppearance = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3152,6 +3154,7 @@ static void SetTrackDescriptions(int LiveChannel)
|
|||||||
break;
|
break;
|
||||||
case 4: cDevice::PrimaryDevice()->SetAvailableTrack(ttDolby, indexDolby++, 0, LiveChannel ? NULL : p->language, p->description);
|
case 4: cDevice::PrimaryDevice()->SetAvailableTrack(ttDolby, indexDolby++, 0, LiveChannel ? NULL : p->language, p->description);
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menuitems.c 2.4 2009/05/03 13:37:55 kls Exp $
|
* $Id: menuitems.c 2.5 2009/12/06 11:31:20 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menuitems.h"
|
#include "menuitems.h"
|
||||||
@ -257,7 +257,7 @@ eOSState cMenuEditPrcItem::ProcessKey(eKeys Key)
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
newValue /= factor;
|
newValue /= factor;
|
||||||
if (newValue != *value && (!fresh || min <= newValue) && newValue <= max) {
|
if (!DoubleEqual(newValue, *value) && (!fresh || min <= newValue) && newValue <= max) {
|
||||||
*value = newValue;
|
*value = newValue;
|
||||||
Set();
|
Set();
|
||||||
}
|
}
|
||||||
@ -666,6 +666,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
|
|||||||
return ProcessKey(kYellow);
|
return ProcessKey(kYellow);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -675,6 +676,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
|
|||||||
case kfEnd: pos = lengthUtf8 - 1; break;
|
case kfEnd: pos = lengthUtf8 - 1; break;
|
||||||
case kfIns: return ProcessKey(kGreen);
|
case kfIns: return ProcessKey(kGreen);
|
||||||
case kfDel: return ProcessKey(kYellow);
|
case kfDel: return ProcessKey(kYellow);
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -975,6 +977,7 @@ eOSState cMenuEditTimeItem::ProcessKey(eKeys Key)
|
|||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (NORMALKEY(Key) == kLeft) { // TODO might want to increase the delta if repeated quickly?
|
else if (NORMALKEY(Key) == kLeft) { // TODO might want to increase the delta if repeated quickly?
|
||||||
|
3
nit.c
3
nit.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: nit.c 2.3 2008/12/20 10:57:50 kls Exp $
|
* $Id: nit.c 2.4 2009/12/06 11:36:16 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "nit.h"
|
#include "nit.h"
|
||||||
@ -110,6 +110,7 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
case 1: f = BCD2INT(f) / 100; break;
|
case 1: f = BCD2INT(f) / 100; break;
|
||||||
case 2: f = BCD2INT(f) / 10; break;
|
case 2: f = BCD2INT(f) / 10; break;
|
||||||
case 3: f = f * 10; break;
|
case 3: f = f * 10; break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
Frequencies[n++] = f;
|
Frequencies[n++] = f;
|
||||||
}
|
}
|
||||||
|
8
osd.c
8
osd.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: osd.c 2.5 2009/05/09 10:42:35 kls Exp $
|
* $Id: osd.c 2.6 2009/12/06 11:33:47 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "osd.h"
|
#include "osd.h"
|
||||||
@ -101,6 +101,7 @@ void cPalette::Take(const cPalette &Palette, tIndexes *Indexes, tColor ColorFg,
|
|||||||
switch (i) {
|
switch (i) {
|
||||||
case 0: Color = ColorBg; break;
|
case 0: Color = ColorBg; break;
|
||||||
case 1: Color = ColorFg; break;
|
case 1: Color = ColorFg; break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int n = Index(Color);
|
int n = Index(Color);
|
||||||
@ -532,6 +533,7 @@ void cBitmap::DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quad
|
|||||||
case 6: cy = y2; rx /= 2; break;
|
case 6: cy = y2; rx /= 2; break;
|
||||||
case 7: cx = x2; ry /= 2; break;
|
case 7: cx = x2; ry /= 2; break;
|
||||||
case 8: cy = y1; rx /= 2; break;
|
case 8: cy = y1; rx /= 2; break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
int TwoASquare = 2 * rx * rx;
|
int TwoASquare = 2 * rx * rx;
|
||||||
int TwoBSquare = 2 * ry * ry;
|
int TwoBSquare = 2 * ry * ry;
|
||||||
@ -557,6 +559,7 @@ void cBitmap::DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quad
|
|||||||
case -2: DrawRectangle(x1, cy - y, cx - x, cy - y, Color); break;
|
case -2: DrawRectangle(x1, cy - y, cx - x, cy - y, Color); break;
|
||||||
case -3: DrawRectangle(x1, cy + y, cx - x, cy + y, Color); break;
|
case -3: DrawRectangle(x1, cy + y, cx - x, cy + y, Color); break;
|
||||||
case -4: DrawRectangle(cx + x, cy + y, x2, cy + y, Color); break;
|
case -4: DrawRectangle(cx + x, cy + y, x2, cy + y, Color); break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
y++;
|
y++;
|
||||||
StoppingY += TwoASquare;
|
StoppingY += TwoASquare;
|
||||||
@ -591,6 +594,7 @@ void cBitmap::DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quad
|
|||||||
case -2: DrawRectangle(x1, cy - y, cx - x, cy - y, Color); break;
|
case -2: DrawRectangle(x1, cy - y, cx - x, cy - y, Color); break;
|
||||||
case -3: DrawRectangle(x1, cy + y, cx - x, cy + y, Color); break;
|
case -3: DrawRectangle(x1, cy + y, cx - x, cy + y, Color); break;
|
||||||
case -4: DrawRectangle(cx + x, cy + y, x2, cy + y, Color); break;
|
case -4: DrawRectangle(cx + x, cy + y, x2, cy + y, Color); break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
x++;
|
x++;
|
||||||
StoppingX += TwoBSquare;
|
StoppingX += TwoBSquare;
|
||||||
@ -921,7 +925,7 @@ void cOsdProvider::UpdateOsdSize(bool Force)
|
|||||||
int Height;
|
int Height;
|
||||||
double Aspect;
|
double Aspect;
|
||||||
cDevice::PrimaryDevice()->GetOsdSize(Width, Height, Aspect);
|
cDevice::PrimaryDevice()->GetOsdSize(Width, Height, Aspect);
|
||||||
if (Width != oldWidth || Height != oldHeight || Aspect != oldAspect || Force) {
|
if (Width != oldWidth || Height != oldHeight || !DoubleEqual(Aspect, oldAspect) || Force) {
|
||||||
Setup.OSDLeft = int(round(Width * Setup.OSDLeftP));
|
Setup.OSDLeft = int(round(Width * Setup.OSDLeftP));
|
||||||
Setup.OSDTop = int(round(Height * Setup.OSDTopP));
|
Setup.OSDTop = int(round(Height * Setup.OSDTopP));
|
||||||
Setup.OSDWidth = int(round(Width * Setup.OSDWidthP)) & ~0x07; // OSD width must be a multiple of 8
|
Setup.OSDWidth = int(round(Width * Setup.OSDWidthP)) & ~0x07; // OSD width must be a multiple of 8
|
||||||
|
4
pat.c
4
pat.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: pat.c 2.4 2009/08/16 15:01:03 kls Exp $
|
* $Id: pat.c 2.5 2009/12/06 11:39:17 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pat.h"
|
#include "pat.h"
|
||||||
@ -443,7 +443,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//default: printf("PID: %5d %5d %2d %3d %3d\n", pmt.getServiceId(), stream.getPid(), stream.getStreamType(), pmt.getVersionNumber(), Channel->Number());//XXX
|
default: ;//printf("PID: %5d %5d %2d %3d %3d\n", pmt.getServiceId(), stream.getPid(), stream.getStreamType(), pmt.getVersionNumber(), Channel->Number());
|
||||||
}
|
}
|
||||||
for (SI::Loop::Iterator it; (d = (SI::CaDescriptor*)stream.streamDescriptors.getNext(it, SI::CaDescriptorTag)); ) {
|
for (SI::Loop::Iterator it; (d = (SI::CaDescriptor*)stream.streamDescriptors.getNext(it, SI::CaDescriptorTag)); ) {
|
||||||
CaDescriptors->AddCaDescriptor(d, esPid);
|
CaDescriptors->AddCaDescriptor(d, esPid);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recorder.c 2.6 2009/11/21 15:58:12 kls Exp $
|
* $Id: recorder.c 2.7 2009/12/06 11:34:41 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "recorder.h"
|
#include "recorder.h"
|
||||||
@ -128,7 +128,7 @@ void cRecorder::Action(void)
|
|||||||
if (frameDetector->Synced()) {
|
if (frameDetector->Synced()) {
|
||||||
if (!InfoWritten) {
|
if (!InfoWritten) {
|
||||||
if (recordingInfo.Read()) {
|
if (recordingInfo.Read()) {
|
||||||
if (frameDetector->FramesPerSecond() > 0 && recordingInfo.FramesPerSecond() != frameDetector->FramesPerSecond()) {
|
if (frameDetector->FramesPerSecond() > 0 && !DoubleEqual(recordingInfo.FramesPerSecond(), frameDetector->FramesPerSecond())) {
|
||||||
recordingInfo.SetFramesPerSecond(frameDetector->FramesPerSecond());
|
recordingInfo.SetFramesPerSecond(frameDetector->FramesPerSecond());
|
||||||
recordingInfo.Write();
|
recordingInfo.Write();
|
||||||
}
|
}
|
||||||
|
30
recording.c
30
recording.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.c 2.19 2009/11/22 19:38:04 kls Exp $
|
* $Id: recording.c 2.20 2009/12/06 12:55:36 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "recording.h"
|
#include "recording.h"
|
||||||
@ -260,6 +260,7 @@ int cResumeFile::Read(void)
|
|||||||
switch (*s) {
|
switch (*s) {
|
||||||
case 'I': resume = atoi(t);
|
case 'I': resume = atoi(t);
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
@ -443,8 +444,8 @@ bool cRecordingInfo::Read(FILE *f)
|
|||||||
ownEvent->SetEventID(EventID);
|
ownEvent->SetEventID(EventID);
|
||||||
ownEvent->SetStartTime(StartTime);
|
ownEvent->SetStartTime(StartTime);
|
||||||
ownEvent->SetDuration(Duration);
|
ownEvent->SetDuration(Duration);
|
||||||
ownEvent->SetTableID(TableID);
|
ownEvent->SetTableID(uchar(TableID));
|
||||||
ownEvent->SetVersion(Version);
|
ownEvent->SetVersion(uchar(Version));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -570,7 +571,7 @@ char *ExchangeChars(char *s, bool ToFileSystem)
|
|||||||
if (strlen(p) > 2 && isxdigit(*(p + 1)) && isxdigit(*(p + 2))) {
|
if (strlen(p) > 2 && isxdigit(*(p + 1)) && isxdigit(*(p + 2))) {
|
||||||
char buf[3];
|
char buf[3];
|
||||||
sprintf(buf, "%c%c", *(p + 1), *(p + 2));
|
sprintf(buf, "%c%c", *(p + 1), *(p + 2));
|
||||||
unsigned char c = strtol(buf, NULL, 16);
|
uchar c = uchar(strtol(buf, NULL, 16));
|
||||||
if (c) {
|
if (c) {
|
||||||
*p = c;
|
*p = c;
|
||||||
memmove(p + 1, p + 3, strlen(p) - 2);
|
memmove(p + 1, p + 3, strlen(p) - 2);
|
||||||
@ -582,6 +583,7 @@ char *ExchangeChars(char *s, bool ToFileSystem)
|
|||||||
case '\x01': *p = '\''; break;
|
case '\x01': *p = '\''; break;
|
||||||
case '\x02': *p = '/'; break;
|
case '\x02': *p = '/'; break;
|
||||||
case '\x03': *p = ':'; break;
|
case '\x03': *p = ':'; break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1501,19 +1503,19 @@ cIndexFile::cIndexFile(const char *FileName, bool Record, bool IsPesRecording)
|
|||||||
if (access(fileName, R_OK) == 0) {
|
if (access(fileName, R_OK) == 0) {
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
if (stat(fileName, &buf) == 0) {
|
if (stat(fileName, &buf) == 0) {
|
||||||
delta = buf.st_size % sizeof(tIndexTs);
|
delta = int(buf.st_size % sizeof(tIndexTs));
|
||||||
if (delta) {
|
if (delta) {
|
||||||
delta = sizeof(tIndexTs) - delta;
|
delta = sizeof(tIndexTs) - delta;
|
||||||
esyslog("ERROR: invalid file size (%lld) in '%s'", buf.st_size, fileName);
|
esyslog("ERROR: invalid file size (%lld) in '%s'", buf.st_size, fileName);
|
||||||
}
|
}
|
||||||
last = (buf.st_size + delta) / sizeof(tIndexTs) - 1;
|
last = int((buf.st_size + delta) / sizeof(tIndexTs) - 1);
|
||||||
if (!Record && last >= 0) {
|
if (!Record && last >= 0) {
|
||||||
size = last + 1;
|
size = last + 1;
|
||||||
index = MALLOC(tIndexTs, size);
|
index = MALLOC(tIndexTs, size);
|
||||||
if (index) {
|
if (index) {
|
||||||
f = open(fileName, O_RDONLY);
|
f = open(fileName, O_RDONLY);
|
||||||
if (f >= 0) {
|
if (f >= 0) {
|
||||||
if ((int)safe_read(f, index, buf.st_size) != buf.st_size) {
|
if (safe_read(f, index, size_t(buf.st_size)) != buf.st_size) {
|
||||||
esyslog("ERROR: can't read from file '%s'", fileName);
|
esyslog("ERROR: can't read from file '%s'", fileName);
|
||||||
free(index);
|
free(index);
|
||||||
index = NULL;
|
index = NULL;
|
||||||
@ -1579,8 +1581,8 @@ void cIndexFile::ConvertToPes(tIndexTs *IndexTs, int Count)
|
|||||||
tIndexPes IndexPes;
|
tIndexPes IndexPes;
|
||||||
while (Count-- > 0) {
|
while (Count-- > 0) {
|
||||||
IndexPes.offset = uint32_t(IndexTs->offset);
|
IndexPes.offset = uint32_t(IndexTs->offset);
|
||||||
IndexPes.type = IndexTs->independent ? 1 : 2; // I_FRAME : "not I_FRAME" (exact frame type doesn't matter)
|
IndexPes.type = uchar(IndexTs->independent ? 1 : 2); // I_FRAME : "not I_FRAME" (exact frame type doesn't matter)
|
||||||
IndexPes.number = IndexTs->number;
|
IndexPes.number = uchar(IndexTs->number);
|
||||||
IndexPes.reserved = 0;
|
IndexPes.reserved = 0;
|
||||||
memcpy(IndexTs, &IndexPes, sizeof(*IndexTs));
|
memcpy(IndexTs, &IndexPes, sizeof(*IndexTs));
|
||||||
IndexTs++;
|
IndexTs++;
|
||||||
@ -1601,7 +1603,7 @@ bool cIndexFile::CatchUp(int Index)
|
|||||||
f = -1;
|
f = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
int newLast = buf.st_size / sizeof(tIndexTs) - 1;
|
int newLast = int(buf.st_size / sizeof(tIndexTs) - 1);
|
||||||
if (newLast > last) {
|
if (newLast > last) {
|
||||||
if (size <= newLast) {
|
if (size <= newLast) {
|
||||||
size *= 2;
|
size *= 2;
|
||||||
@ -1671,7 +1673,7 @@ bool cIndexFile::Get(int Index, uint16_t *FileNumber, off_t *FileOffset, bool *I
|
|||||||
uint16_t fn = index[Index + 1].number;
|
uint16_t fn = index[Index + 1].number;
|
||||||
off_t fo = index[Index + 1].offset;
|
off_t fo = index[Index + 1].offset;
|
||||||
if (fn == *FileNumber)
|
if (fn == *FileNumber)
|
||||||
*Length = fo - *FileOffset;
|
*Length = int(fo - *FileOffset);
|
||||||
else
|
else
|
||||||
*Length = -1; // this means "everything up to EOF" (the buffer's Read function will act accordingly)
|
*Length = -1; // this means "everything up to EOF" (the buffer's Read function will act accordingly)
|
||||||
}
|
}
|
||||||
@ -1702,7 +1704,7 @@ int cIndexFile::GetNextIFrame(int Index, bool Forward, uint16_t *FileNumber, off
|
|||||||
uint16_t fn = index[Index + 1].number;
|
uint16_t fn = index[Index + 1].number;
|
||||||
off_t fo = index[Index + 1].offset;
|
off_t fo = index[Index + 1].offset;
|
||||||
if (fn == *FileNumber)
|
if (fn == *FileNumber)
|
||||||
*Length = fo - *FileOffset;
|
*Length = int(fo - *FileOffset);
|
||||||
else {
|
else {
|
||||||
esyslog("ERROR: 'I' frame at end of file #%d", *FileNumber);
|
esyslog("ERROR: 'I' frame at end of file #%d", *FileNumber);
|
||||||
*Length = -1;
|
*Length = -1;
|
||||||
@ -1871,11 +1873,11 @@ cUnbufferedFile *cFileName::SetOffset(int Number, off_t Offset)
|
|||||||
Close();
|
Close();
|
||||||
int MaxFilesPerRecording = isPesRecording ? MAXFILESPERRECORDINGPES : MAXFILESPERRECORDINGTS;
|
int MaxFilesPerRecording = isPesRecording ? MAXFILESPERRECORDINGPES : MAXFILESPERRECORDINGTS;
|
||||||
if (0 < Number && Number <= MaxFilesPerRecording) {
|
if (0 < Number && Number <= MaxFilesPerRecording) {
|
||||||
fileNumber = Number;
|
fileNumber = uint16_t(Number);
|
||||||
sprintf(pFileNumber, isPesRecording ? RECORDFILESUFFIXPES : RECORDFILESUFFIXTS, fileNumber);
|
sprintf(pFileNumber, isPesRecording ? RECORDFILESUFFIXPES : RECORDFILESUFFIXTS, fileNumber);
|
||||||
if (record) {
|
if (record) {
|
||||||
if (access(fileName, F_OK) == 0) {
|
if (access(fileName, F_OK) == 0) {
|
||||||
// files exists, check if it has non-zero size
|
// file exists, check if it has non-zero size
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
if (stat(fileName, &buf) == 0) {
|
if (stat(fileName, &buf) == 0) {
|
||||||
if (buf.st_size != 0)
|
if (buf.st_size != 0)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.h 2.10 2009/11/21 16:12:55 kls Exp $
|
* $Id: recording.h 2.11 2009/12/06 12:46:31 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __RECORDING_H
|
#ifndef __RECORDING_H
|
||||||
@ -253,7 +253,7 @@ public:
|
|||||||
class cFileName {
|
class cFileName {
|
||||||
private:
|
private:
|
||||||
cUnbufferedFile *file;
|
cUnbufferedFile *file;
|
||||||
int fileNumber;
|
uint16_t fileNumber;
|
||||||
char *fileName, *pFileNumber;
|
char *fileName, *pFileNumber;
|
||||||
bool record;
|
bool record;
|
||||||
bool blocking;
|
bool blocking;
|
||||||
@ -262,11 +262,11 @@ public:
|
|||||||
cFileName(const char *FileName, bool Record, bool Blocking = false, bool IsPesRecording = false);
|
cFileName(const char *FileName, bool Record, bool Blocking = false, bool IsPesRecording = false);
|
||||||
~cFileName();
|
~cFileName();
|
||||||
const char *Name(void) { return fileName; }
|
const char *Name(void) { return fileName; }
|
||||||
int Number(void) { return fileNumber; }
|
uint16_t Number(void) { return fileNumber; }
|
||||||
bool GetLastPatPmtVersions(int &PatVersion, int &PmtVersion);
|
bool GetLastPatPmtVersions(int &PatVersion, int &PmtVersion);
|
||||||
cUnbufferedFile *Open(void);
|
cUnbufferedFile *Open(void);
|
||||||
void Close(void);
|
void Close(void);
|
||||||
cUnbufferedFile *SetOffset(int Number, off_t Offset = 0);
|
cUnbufferedFile *SetOffset(int Number, off_t Offset = 0); // yes, Number is int for easier internal calculating
|
||||||
cUnbufferedFile *NextFile(void);
|
cUnbufferedFile *NextFile(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
8
remote.c
8
remote.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: remote.c 1.59 2008/02/23 14:14:46 kls Exp $
|
* $Id: remote.c 2.1 2009/12/06 12:08:03 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remote.h"
|
#include "remote.h"
|
||||||
@ -287,7 +287,9 @@ int cKbdRemote::MapCodeToFunc(uint64_t Code)
|
|||||||
if (p->code == Code)
|
if (p->code == Code)
|
||||||
return p->func;
|
return p->func;
|
||||||
}
|
}
|
||||||
return (Code <= 0xFF) ? Code : kfNone;
|
if (Code <= 0xFF)
|
||||||
|
return Code;
|
||||||
|
return kfNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cKbdRemote::ReadKey(void)
|
int cKbdRemote::ReadKey(void)
|
||||||
@ -337,9 +339,11 @@ uint64_t cKbdRemote::ReadKeySequence(void)
|
|||||||
k |= key1 & 0xFF;
|
k |= key1 & 0xFF;
|
||||||
} while (key1 != 0x7E);
|
} while (key1 != 0x7E);
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
remux.c
3
remux.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: remux.c 2.31 2009/12/05 13:15:10 kls Exp $
|
* $Id: remux.c 2.32 2009/12/06 12:10:44 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remux.h"
|
#include "remux.h"
|
||||||
@ -585,6 +585,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
dbgpatpmt("\n");
|
dbgpatpmt("\n");
|
||||||
if (updatePrimaryDevice) {
|
if (updatePrimaryDevice) {
|
||||||
|
3
sdt.c
3
sdt.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: sdt.c 2.1 2008/04/12 13:33:55 kls Exp $
|
* $Id: sdt.c 2.2 2009/12/06 12:11:23 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sdt.h"
|
#include "sdt.h"
|
||||||
@ -92,6 +92,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
patFilter->Trigger();
|
patFilter->Trigger();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: skinsttng.c 1.28 2008/02/23 10:23:44 kls Exp $
|
* $Id: skinsttng.c 2.1 2009/12/06 12:12:03 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
|
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
|
||||||
@ -1068,6 +1068,7 @@ void cSkinSTTNGDisplayTracks::SetAudioChannel(int AudioChannel)
|
|||||||
case 0: bm = &bmAudioStereo; break;
|
case 0: bm = &bmAudioStereo; break;
|
||||||
case 1: bm = &bmAudioLeft; break;
|
case 1: bm = &bmAudioLeft; break;
|
||||||
case 2: bm = &bmAudioRight; break;
|
case 2: bm = &bmAudioRight; break;
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
if (bm)
|
if (bm)
|
||||||
osd->DrawBitmap(x3 + 5, y6 + (y7 - y6 - bm->Height()) / 2, *bm, Theme.Color(clrChannelSymbolOn), frameColor);
|
osd->DrawBitmap(x3 + 5, y6 + (y7 - y6 - bm->Height()) / 2, *bm, Theme.Color(clrChannelSymbolOn), frameColor);
|
||||||
|
5
tools.c
5
tools.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: tools.c 2.4 2009/11/06 15:21:17 kls Exp $
|
* $Id: tools.c 2.5 2009/12/06 12:19:56 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
@ -633,6 +633,7 @@ uint Utf8CharGet(const char *s, int Length)
|
|||||||
case 2: return ((*s & 0x1F) << 6) | (*(s + 1) & 0x3F);
|
case 2: return ((*s & 0x1F) << 6) | (*(s + 1) & 0x3F);
|
||||||
case 3: return ((*s & 0x0F) << 12) | ((*(s + 1) & 0x3F) << 6) | (*(s + 2) & 0x3F);
|
case 3: return ((*s & 0x0F) << 12) | ((*(s + 1) & 0x3F) << 6) | (*(s + 2) & 0x3F);
|
||||||
case 4: return ((*s & 0x07) << 18) | ((*(s + 1) & 0x3F) << 12) | ((*(s + 2) & 0x3F) << 6) | (*(s + 3) & 0x3F);
|
case 4: return ((*s & 0x07) << 18) | ((*(s + 1) & 0x3F) << 12) | ((*(s + 2) & 0x3F) << 6) | (*(s + 3) & 0x3F);
|
||||||
|
default: ;
|
||||||
}
|
}
|
||||||
return *s;
|
return *s;
|
||||||
}
|
}
|
||||||
@ -942,8 +943,8 @@ cString WeekDayNameFull(int WeekDay)
|
|||||||
case 4: return tr("Friday");
|
case 4: return tr("Friday");
|
||||||
case 5: return tr("Saturday");
|
case 5: return tr("Saturday");
|
||||||
case 6: return tr("Sunday");
|
case 6: return tr("Sunday");
|
||||||
|
default: return "???";
|
||||||
}
|
}
|
||||||
return "???";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cString WeekDayNameFull(time_t t)
|
cString WeekDayNameFull(time_t t)
|
||||||
|
14
tools.h
14
tools.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: tools.h 2.2 2009/04/14 20:41:39 kls Exp $
|
* $Id: tools.h 2.3 2009/12/06 11:24:12 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TOOLS_H
|
#ifndef __TOOLS_H
|
||||||
@ -13,7 +13,9 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <float.h>
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
|
#include <math.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -60,7 +62,7 @@ void syslog_with_tid(int priority, const char *format, ...) __attribute__ ((form
|
|||||||
int BCD2INT(int x);
|
int BCD2INT(int x);
|
||||||
|
|
||||||
// Unfortunately there are no platform independent macros for unaligned
|
// Unfortunately there are no platform independent macros for unaligned
|
||||||
// access. so we do it this way:
|
// access, so we do it this way:
|
||||||
|
|
||||||
template<class T> inline T get_unaligned(T *p)
|
template<class T> inline T get_unaligned(T *p)
|
||||||
{
|
{
|
||||||
@ -74,6 +76,14 @@ template<class T> inline void put_unaligned(unsigned int v, T* p)
|
|||||||
((s *)p)->v = v;
|
((s *)p)->v = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Comparing doubles for equality is unsafe, but unfortunately we can't
|
||||||
|
// overwrite operator==(double, double), so this will have to do:
|
||||||
|
|
||||||
|
inline bool DoubleEqual(double a, double b)
|
||||||
|
{
|
||||||
|
return fabs(a - b) <= DBL_EPSILON;
|
||||||
|
}
|
||||||
|
|
||||||
// When handling strings that might contain UTF-8 characters, it may be necessary
|
// When handling strings that might contain UTF-8 characters, it may be necessary
|
||||||
// to process a "symbol" that consists of several actual character bytes. The
|
// to process a "symbol" that consists of several actual character bytes. The
|
||||||
// following functions allow transparently accessing a "char *" string without
|
// following functions allow transparently accessing a "char *" string without
|
||||||
|
4
vdr.c
4
vdr.c
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at http://www.tvdr.de
|
* The project's page is at http://www.tvdr.de
|
||||||
*
|
*
|
||||||
* $Id: vdr.c 2.12 2009/10/25 14:45:47 kls Exp $
|
* $Id: vdr.c 2.13 2009/12/06 12:20:43 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -242,7 +242,7 @@ int main(int argc, char *argv[])
|
|||||||
{ "vfat", no_argument, NULL, 'v' | 0x100 },
|
{ "vfat", no_argument, NULL, 'v' | 0x100 },
|
||||||
{ "video", required_argument, NULL, 'v' },
|
{ "video", required_argument, NULL, 'v' },
|
||||||
{ "watchdog", required_argument, NULL, 'w' },
|
{ "watchdog", required_argument, NULL, 'w' },
|
||||||
{ NULL }
|
{ NULL, no_argument, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
|
Loading…
Reference in New Issue
Block a user