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

Compare commits

...

4 Commits

Author SHA1 Message Date
Rolf Ahrenberg
315a3365ba Updated for vdr-1.7.27. 2012-03-25 16:55:42 +03:00
Rolf Ahrenberg
8e1e025b0f Updated default CXXFLAGS. 2012-03-25 16:02:16 +03:00
Rolf Ahrenberg
543accdd06 Cleaned up compilation warnings again. 2012-03-19 18:09:16 +02:00
Rolf Ahrenberg
66eca7f8b5 Fixed channel switching.
Cleaned up compilation warnings.
2012-03-12 21:59:34 +02:00
26 changed files with 62 additions and 56 deletions

10
HISTORY
View File

@@ -436,3 +436,13 @@ VDR Plugin 'femon' Revision History
2012-03-10: Version 1.7.14
- Updated for vdr-1.7.26.
2012-03-12: Version 1.7.15
- Cleaned up compilation warnings.
- Fixed channel switching.
2012-03-25: Version 1.7.16
- Updated for vdr-1.7.27.
- Cleaned up compilation warnings again.

View File

@@ -24,7 +24,7 @@ GITTAG = $(shell git describe --always 2>/dev/null)
### The C++ compiler and options:
CXX ?= g++
CXXFLAGS ?= -fPIC -g -O3 -Wall -Wextra -Wswitch-default -Wfloat-equal -Wundef -Wpointer-arith -Wconversion -Wcast-align -Wredundant-decls -Wno-unused-parameter -Woverloaded-virtual -Wno-parentheses
CXXFLAGS ?= -fPIC -g -O3 -Wall -Wextra -Wswitch-default -Wfloat-equal -Wundef -Wpointer-arith -Wconversion -Wcast-align -Wredundant-decls -Wno-unused-parameter -Werror=overloaded-virtual -Wno-parentheses
LDFLAGS ?= -Wl,--as-needed
### The directory environment:

View File

@@ -14,15 +14,15 @@
#include "femonservice.h"
#include "femontools.h"
#if defined(APIVERSNUM) && APIVERSNUM < 10726
#error "VDR-1.7.26 API version or greater is required!"
#if defined(APIVERSNUM) && APIVERSNUM < 10727
#error "VDR-1.7.27 API version or greater is required!"
#endif
#ifndef GITVERSION
#define GITVERSION ""
#endif
static const char VERSION[] = "1.7.14" GITVERSION;
static const char VERSION[] = "1.7.16" GITVERSION;
static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)");
static const char MAINMENUENTRY[] = trNOOP("Signal Information");

View File

@@ -10,7 +10,7 @@
#define IS_HEAAC_AUDIO(buf) (((buf)[0] == 0xFF) && (((buf)[1] & 0xF6) == 0xF0))
unsigned int cFemonAAC::s_Samplerates[16] =
int cFemonAAC::s_Samplerates[16] =
{
96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, -1, -1, -1, -1
};

View File

@@ -14,7 +14,7 @@ class cFemonAAC {
private:
cFemonAudioIf *m_AudioHandler;
static unsigned int s_Samplerates[16];
static int s_Samplerates[16];
public:
cFemonAAC(cFemonAudioIf *audiohandler);

View File

@@ -9,17 +9,17 @@
#include "femontools.h"
#include "femonac3.h"
unsigned int cFemonAC3::s_Bitrates[32] =
int cFemonAC3::s_Bitrates[32] =
{
32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
unsigned int cFemonAC3::s_Frequencies[4] =
int cFemonAC3::s_Frequencies[4] =
{
480, 441, 320, 0
};
unsigned int cFemonAC3::s_Frames[3][32] =
int cFemonAC3::s_Frames[3][32] =
{
{64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 640, 768, 896, 1024, 1152, 1280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{69, 87, 104, 121, 139, 174, 208, 243, 278, 348, 417, 487, 557, 696, 835, 975, 1114, 1253, 1393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

View File

@@ -14,9 +14,9 @@ class cFemonAC3 {
private:
cFemonAC3If *m_AudioHandler;
static unsigned int s_Bitrates[32];
static unsigned int s_Frequencies[4];
static unsigned int s_Frames[3][32];
static int s_Bitrates[32];
static int s_Frequencies[4];
static int s_Frames[3][32];
public:
cFemonAC3(cFemonAC3If *audiohandler);

View File

@@ -65,14 +65,14 @@ enum eFemonThemes
struct cFemonTheme
{
int bpp;
int clrBackground;
int clrTitleBackground;
int clrTitleText;
int clrActiveText;
int clrInactiveText;
int clrRed;
int clrYellow;
int clrGreen;
unsigned int clrBackground;
unsigned int clrTitleBackground;
unsigned int clrTitleText;
unsigned int clrActiveText;
unsigned int clrInactiveText;
unsigned int clrRed;
unsigned int clrYellow;
unsigned int clrGreen;
};
extern const cFemonTheme femonTheme[eFemonThemeMaxNumber];

View File

@@ -8,14 +8,14 @@
#include "femontools.h"
#include "femonlatm.h"
unsigned int cFemonLATM::s_Bitrates[3][16] =
int cFemonLATM::s_Bitrates[3][16] =
{
{0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1}, // MPEG-2 Layer I
{0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1}, // MPEG-2 Layer II/III
{0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1} // MPEG-2 Layer II/III
};
unsigned int cFemonLATM::s_Samplerates[4] =
int cFemonLATM::s_Samplerates[4] =
{
22050, 24000, 16000, -1
};

View File

@@ -14,8 +14,8 @@ class cFemonLATM {
private:
cFemonAudioIf *m_AudioHandler;
static unsigned int s_Bitrates[3][16];
static unsigned int s_Samplerates[4];
static int s_Bitrates[3][16];
static int s_Samplerates[4];
public:
cFemonLATM(cFemonAudioIf *audiohandler);

View File

@@ -10,7 +10,7 @@
#define IS_EXTENSION_START(buf) (((buf)[0] == 0x00) && ((buf)[1] == 0x00) && ((buf)[2] == 0x01) && ((buf)[3] == 0xB5))
unsigned int cFemonMPEG::s_Bitrates[2][3][16] =
int cFemonMPEG::s_Bitrates[2][3][16] =
{
{
{0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, -1}, // MPEG-2 Layer I
@@ -24,7 +24,7 @@ unsigned int cFemonMPEG::s_Bitrates[2][3][16] =
}
};
unsigned int cFemonMPEG::s_Samplerates[2][4] =
int cFemonMPEG::s_Samplerates[2][4] =
{
{22050, 24000, 16000, -1}, // MPEG-2
{44100, 48000, 32000, -1} // MPEG-1

View File

@@ -16,9 +16,9 @@ private:
cFemonVideoIf *m_VideoHandler;
cFemonAudioIf *m_AudioHandler;
static unsigned int s_Bitrates[2][3][16];
static unsigned int s_Samplerates[2][4];
static eAudioCodec s_Formats[2][4];
static int s_Bitrates[2][3][16];
static int s_Samplerates[2][4];
static eAudioCodec s_Formats[2][4];
public:
cFemonMPEG(cFemonVideoIf *videohandler, cFemonAudioIf *audiohandler);

View File

@@ -183,6 +183,7 @@ cFemonOsd::cFemonOsd()
m_BERValid(false),
m_UNC(0),
m_UNCValid(false),
m_FrontendName(""),
m_FrontendStatusValid(false),
m_DeviceSource(DEVICESOURCE_DVBAPI),
m_DisplayMode(femonConfig.displaymode),
@@ -420,7 +421,7 @@ void cFemonOsd::DrawInfoWindow(void)
offset += OSDROWHEIGHT;
switch (channel->Source() & cSource::st_Mask) {
case cSource::stSat:
OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getSatelliteSystem(dtp.System()), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name));
OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getSatelliteSystem(dtp.System()), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), *m_FrontendName));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
OSDDRAWINFORIGHT(trVDR("Source"), *cSource::ToString(channel->Source()));
@@ -437,7 +438,7 @@ void cFemonOsd::DrawInfoWindow(void)
break;
case cSource::stCable:
OSDDRAWINFOLINE(*cString::sprintf("DVB-C #%d - %s", (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name));
OSDDRAWINFOLINE(*cString::sprintf("DVB-C #%d - %s", (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), *m_FrontendName));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
OSDDRAWINFORIGHT(trVDR("Source"), *cSource::ToString(channel->Source()));
@@ -450,7 +451,7 @@ void cFemonOsd::DrawInfoWindow(void)
break;
case cSource::stTerr:
OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getTerrestrialSystem(dtp.System()), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name));
OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getTerrestrialSystem(dtp.System()), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), *m_FrontendName));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
OSDDRAWINFORIGHT(trVDR("Transmission"), *getTransmission(dtp.Transmission()));
@@ -556,6 +557,7 @@ void cFemonOsd::Action(void)
m_QualityValid = (m_Quality >= 0);
m_Strength = cDevice::ActualDevice()->SignalStrength();
m_StrengthValid = (m_Strength >= 0);
m_FrontendName = cDevice::ActualDevice()->DeviceName();
m_FrontendStatus = (fe_status_t)(m_StrengthValid ? (FE_HAS_LOCK | FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC) : 0);
m_FrontendStatusValid = m_StrengthValid;
m_Signal = uint16_t(m_Strength * 0xFFFF / 100);
@@ -572,6 +574,7 @@ void cFemonOsd::Action(void)
m_QualityValid = (m_Quality >= 0);
m_Strength = cDevice::ActualDevice()->SignalStrength();
m_StrengthValid = (m_Strength >= 0);
m_FrontendName = cDevice::ActualDevice()->DeviceName();
m_FrontendStatus = (fe_status_t)(m_StrengthValid ? (FE_HAS_LOCK | FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC) : 0);
m_FrontendStatusValid = m_StrengthValid;
m_Signal = uint16_t(m_Strength * 0xFFFF / 100);
@@ -590,6 +593,7 @@ void cFemonOsd::Action(void)
m_QualityValid = (m_Quality >= 0);
m_Strength = cDevice::ActualDevice()->SignalStrength();
m_StrengthValid = (m_Strength >= 0);
m_FrontendName = cDevice::ActualDevice()->DeviceName();
m_FrontendStatusValid = (ioctl(m_Frontend, FE_READ_STATUS, &m_FrontendStatus) >= 0);
m_SignalValid = (ioctl(m_Frontend, FE_READ_SIGNAL_STRENGTH, &m_Signal) >= 0);
m_SNRValid = (ioctl(m_Frontend, FE_READ_SNR, &m_SNR) >= 0);
@@ -622,7 +626,7 @@ void cFemonOsd::Action(void)
else if (!strncasecmp(s, "TYPE:", 5))
m_FrontendInfo.type = (fe_type_t)strtol(s + 5, NULL, 10);
else if (!strncasecmp(s, "NAME:", 5)) {
strn0cpy(m_FrontendInfo.name, s + 5, sizeof(m_FrontendInfo.name));
m_FrontendName = s + 5;
}
else if (!strncasecmp(s, "STAT:", 5)) {
m_FrontendStatus = (fe_status_t)strtol(s + 5, NULL, 16);
@@ -731,7 +735,7 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber, bool li
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (!liveView || !device->IsPrimaryDevice() || !channelNumber || !channel || channel->Number() != channelNumber)
if (!liveView || !channelNumber || !channel || channel->Number() != channelNumber)
return;
m_DeviceSource = DEVICESOURCE_DVBAPI;

View File

@@ -55,6 +55,7 @@ private:
bool m_BERValid;
uint32_t m_UNC;
bool m_UNCValid;
cString m_FrontendName;
fe_status_t m_FrontendStatus;
bool m_FrontendStatusValid;
dvb_frontend_info m_FrontendInfo;

View File

@@ -97,7 +97,7 @@ cString getFrontendInfo(cDvbDevice *device)
info = cString::sprintf("CARD:%d\nSTRG:%d\nQUAL:%d", device->CardIndex(), device->SignalStrength(), device->SignalQuality());
if (ioctl(fe, FE_GET_INFO, &value) >= 0)
info = cString::sprintf("%s\nTYPE:%d\nNAME:%s", *info, value.type, value.name);
info = cString::sprintf("%s\nTYPE:%d\nNAME:%s", *info, value.type, *device->DeviceName());
if (ioctl(fe, FE_READ_STATUS, &status) >= 0)
info = cString::sprintf("%s\nSTAT:%02X", *info, status);
if (ioctl(fe, FE_READ_SIGNAL_STRENGTH, &signal) >= 0)
@@ -121,19 +121,10 @@ cString getFrontendInfo(cDvbDevice *device)
cString getFrontendName(cDvbDevice *device)
{
struct dvb_frontend_info value;
if (!device)
return NULL;
int fe = open(*cString::sprintf(FRONTEND_DEVICE, device->Adapter(), device->Frontend()), O_RDONLY | O_NONBLOCK);
if (fe < 0)
return NULL;
memset(&value, 0, sizeof(value));
ioctl(fe, FE_GET_INFO, &value);
close(fe);
return (cString::sprintf("%s on device #%d", value.name, device->CardIndex()));
return (cString::sprintf("%s on device #%d", *device->DeviceName(), device->CardIndex()));
}
cString getFrontendStatus(cDvbDevice *device)

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
"PO-Revision-Date: 2010-10-10 10:10+0300\n"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
"PO-Revision-Date: 2010-10-10 10:10+0300\n"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
"PO-Revision-Date: 2010-10-10 10:10+0300\n"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
"PO-Revision-Date: 2010-10-10 10:10+0300\n"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
"PO-Revision-Date: 2010-10-10 10:10+0300\n"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0200\n"
"PO-Revision-Date: 2010-10-10 10:10+0200\n"

View File

@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
"PO-Revision-Date: 2010-10-10 10:10+0300\n"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
"PO-Revision-Date: 2010-10-10 10:10+0300\n"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
"PO-Revision-Date: 2010-10-10 10:10+0300\n"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
"PO-Revision-Date: 2010-10-10 10:10+0300\n"

View File

@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.14\n"
"Project-Id-Version: vdr-femon 1.7.15\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
"PO-Revision-Date: 2010-10-10 10:10+0300\n"