1
0
mirror of https://github.com/rofafor/vdr-plugin-femon.git synced 2023-10-10 13:36:53 +02:00

Added whitespace cleanups.

Changed info window to use the channel source instead of the frontend type.
This commit is contained in:
Rolf Ahrenberg 2008-12-13 22:25:26 +02:00
parent 2340ade6c8
commit 83556bf2d3
4 changed files with 32 additions and 27 deletions

View File

@ -320,3 +320,8 @@ VDR Plugin 'femon' Revision History
- Replaced "Use single area (8bpp)" option with VDR's "Setup/OSD/Anti-alias". - Replaced "Use single area (8bpp)" option with VDR's "Setup/OSD/Anti-alias".
- Removed the FEMON_NTSC option. - Removed the FEMON_NTSC option.
- Fixed a deadlock in cFemonReceiver (Thanks to Antti Seppälä for reporting this one). - Fixed a deadlock in cFemonReceiver (Thanks to Antti Seppälä for reporting this one).
200x-xx-xx: Version 1.6.5
- Added whitespace cleanups.
- Changed info window to use the channel source instead of the frontend type.

View File

@ -18,7 +18,7 @@
#error "VDR-1.6.0 API version or greater is required!" #error "VDR-1.6.0 API version or greater is required!"
#endif #endif
static const char VERSION[] = "1.6.4"; static const char VERSION[] = "1.6.5";
static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)"); static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)");
static const char MAINMENUENTRY[] = trNOOP("Signal Information"); static const char MAINMENUENTRY[] = trNOOP("Signal Information");

View File

@ -317,8 +317,8 @@ void cFemonOsd::DrawInfoWindow(void)
offset += OSDROWHEIGHT; offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("CA"), *getCAids(channel, femonConfig.showcasystem)); OSDDRAWINFOLEFT( trVDR("CA"), *getCAids(channel, femonConfig.showcasystem));
offset += OSDROWHEIGHT; offset += OSDROWHEIGHT;
switch (m_FrontendInfo.type) { switch (channel->Source() & cSource::st_Mask) {
case FE_QPSK: case cSource::stSat:
OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", tr("Satellite Card"), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name)); OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", tr("Satellite Card"), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name));
offset += OSDROWHEIGHT; offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency())); OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
@ -334,7 +334,7 @@ void cFemonOsd::DrawInfoWindow(void)
//OSDDRAWINFORIGHT(trVDR("RollOff"), *getRollOff(channel->RollOff())); //OSDDRAWINFORIGHT(trVDR("RollOff"), *getRollOff(channel->RollOff()));
break; break;
case FE_QAM: case cSource::stCable:
OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", tr("Cable Card"), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name)); OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", tr("Cable Card"), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name));
offset += OSDROWHEIGHT; offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency())); OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
@ -347,7 +347,7 @@ void cFemonOsd::DrawInfoWindow(void)
OSDDRAWINFORIGHT(trVDR("CoderateH"), *getCoderate(channel->CoderateH())); OSDDRAWINFORIGHT(trVDR("CoderateH"), *getCoderate(channel->CoderateH()));
break; break;
case FE_OFDM: case cSource::stTerr:
OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", tr("Terrestrial Card"), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name)); OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", tr("Terrestrial Card"), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name));
offset += OSDROWHEIGHT; offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency())); OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
@ -462,25 +462,25 @@ void cFemonOsd::Action(void)
if (cmd.responseCode == 900) { if (cmd.responseCode == 900) {
for (cLine *line = cmd.reply.First(); line; line = cmd.reply.Next(line)) { for (cLine *line = cmd.reply.First(); line; line = cmd.reply.Next(line)) {
const char *s = line->Text(); const char *s = line->Text();
if (strncasecmp(s, "CARD:", 5) == 0) if (!strncasecmp(s, "CARD:", 5))
m_SvdrpFrontend = strtol(s + 5, NULL, 10); m_SvdrpFrontend = strtol(s + 5, NULL, 10);
else if (strncasecmp(s, "TYPE:", 5) == 0) else if (!strncasecmp(s, "TYPE:", 5))
m_FrontendInfo.type = (fe_type_t) strtol(s + 5, NULL, 10); m_FrontendInfo.type = (fe_type_t) strtol(s + 5, NULL, 10);
else if (strncasecmp(s, "NAME:", 5) == 0) else if (!strncasecmp(s, "NAME:", 5))
strn0cpy(m_FrontendInfo.name, s + 5, sizeof(m_FrontendInfo.name)); strn0cpy(m_FrontendInfo.name, s + 5, sizeof(m_FrontendInfo.name));
else if (strncasecmp(s, "STAT:", 5) == 0) else if (!strncasecmp(s, "STAT:", 5))
m_FrontendStatus = (fe_status_t) strtol(s + 5, NULL, 16); m_FrontendStatus = (fe_status_t) strtol(s + 5, NULL, 16);
else if (strncasecmp(s, "SGNL:", 5) == 0) else if (!strncasecmp(s, "SGNL:", 5))
m_Signal = strtol(s + 5, NULL, 16); m_Signal = strtol(s + 5, NULL, 16);
else if (strncasecmp(s, "SNRA:", 5) == 0) else if (!strncasecmp(s, "SNRA:", 5))
m_SNR = strtol(s + 5, NULL, 16); m_SNR = strtol(s + 5, NULL, 16);
else if (strncasecmp(s, "BERA:", 5) == 0) else if (!strncasecmp(s, "BERA:", 5))
m_BER = strtol(s + 5, NULL, 16); m_BER = strtol(s + 5, NULL, 16);
else if (strncasecmp(s, "UNCB:", 5) == 0) else if (!strncasecmp(s, "UNCB:", 5))
m_UNC = strtol(s + 5, NULL, 16); m_UNC = strtol(s + 5, NULL, 16);
else if (strncasecmp(s, "VIBR:", 5) == 0) else if (!strncasecmp(s, "VIBR:", 5))
m_SvdrpVideoBitrate = strtol(s + 5, NULL, 10); m_SvdrpVideoBitrate = strtol(s + 5, NULL, 10);
else if (strncasecmp(s, "AUBR:", 5) == 0) else if (!strncasecmp(s, "AUBR:", 5))
m_SvdrpAudioBitrate = strtol(s + 5, NULL, 10); m_SvdrpAudioBitrate = strtol(s + 5, NULL, 10);
} }
} }