mirror of
https://github.com/rofafor/vdr-plugin-femon.git
synced 2023-10-10 11:36:53 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
315a3365ba | ||
|
|
8e1e025b0f | ||
|
|
543accdd06 | ||
|
|
66eca7f8b5 | ||
|
|
905b7c0870 | ||
|
|
597425a271 | ||
|
|
86210928b8 | ||
|
|
c98fe8ca87 | ||
|
|
5598f7cc43 | ||
|
|
62f1f5f776 |
14
HISTORY
14
HISTORY
@@ -432,3 +432,17 @@ VDR Plugin 'femon' Revision History
|
|||||||
|
|
||||||
- Added initial support for PVRINPUT devices (Thanks to Winfried Köhler).
|
- Added initial support for PVRINPUT devices (Thanks to Winfried Köhler).
|
||||||
- Added initial support for IPTV devices.
|
- Added initial support for IPTV devices.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|||||||
13
Makefile
13
Makefile
@@ -19,18 +19,19 @@ PLUGIN = femon
|
|||||||
### The version number of this plugin (taken from the main source file):
|
### The version number of this plugin (taken from the main source file):
|
||||||
|
|
||||||
VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
|
VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
|
||||||
|
GITTAG = $(shell git describe --always 2>/dev/null)
|
||||||
|
|
||||||
### The C++ compiler and options:
|
### The C++ compiler and options:
|
||||||
|
|
||||||
CXX ?= g++
|
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
|
LDFLAGS ?= -Wl,--as-needed
|
||||||
|
|
||||||
### The directory environment:
|
### The directory environment:
|
||||||
|
|
||||||
VDRDIR = ../../..
|
VDRDIR ?= ../../..
|
||||||
LIBDIR = ../../lib
|
LIBDIR ?= ../../lib
|
||||||
TMPDIR = /tmp
|
TMPDIR ?= /tmp
|
||||||
|
|
||||||
### Make sure that necessary options are included:
|
### Make sure that necessary options are included:
|
||||||
|
|
||||||
@@ -59,6 +60,10 @@ ifdef FEMON_DEBUG
|
|||||||
DEFINES += -DDEBUG
|
DEFINES += -DDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(strip $(GITTAG)),)
|
||||||
|
DEFINES += -DGITVERSION='"-GIT-$(GITTAG)"'
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: all all-redirect
|
.PHONY: all all-redirect
|
||||||
all-redirect: all
|
all-redirect: all
|
||||||
|
|
||||||
|
|||||||
12
femon.c
12
femon.c
@@ -14,11 +14,15 @@
|
|||||||
#include "femonservice.h"
|
#include "femonservice.h"
|
||||||
#include "femontools.h"
|
#include "femontools.h"
|
||||||
|
|
||||||
#if defined(APIVERSNUM) && APIVERSNUM < 10723
|
#if defined(APIVERSNUM) && APIVERSNUM < 10727
|
||||||
#error "VDR-1.7.23 API version or greater is required!"
|
#error "VDR-1.7.27 API version or greater is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char VERSION[] = "1.7.13";
|
#ifndef GITVERSION
|
||||||
|
#define GITVERSION ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const char VERSION[] = "1.7.16" GITVERSION;
|
||||||
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");
|
||||||
|
|
||||||
@@ -196,7 +200,7 @@ cString cPluginFemon::SVDRPCommand(const char *Command, const char *Option, int
|
|||||||
{
|
{
|
||||||
cDvbDevice *dev = dynamic_cast<cDvbDevice*>(cDevice::ActualDevice());
|
cDvbDevice *dev = dynamic_cast<cDvbDevice*>(cDevice::ActualDevice());
|
||||||
if (*Option && isnumber(Option)) {
|
if (*Option && isnumber(Option)) {
|
||||||
cDvbDevice *dev2 = dynamic_cast<cDvbDevice*>(cDevice::GetDevice(strtol(Option, NULL, 10)));
|
cDvbDevice *dev2 = dynamic_cast<cDvbDevice*>(cDevice::GetDevice(int(strtol(Option, NULL, 10))));
|
||||||
if (dev2)
|
if (dev2)
|
||||||
dev = dev2;
|
dev = dev2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#define IS_HEAAC_AUDIO(buf) (((buf)[0] == 0xFF) && (((buf)[1] & 0xF6) == 0xF0))
|
#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
|
96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, -1, -1, -1, -1
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class cFemonAAC {
|
|||||||
private:
|
private:
|
||||||
cFemonAudioIf *m_AudioHandler;
|
cFemonAudioIf *m_AudioHandler;
|
||||||
|
|
||||||
static unsigned int s_Samplerates[16];
|
static int s_Samplerates[16];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cFemonAAC(cFemonAudioIf *audiohandler);
|
cFemonAAC(cFemonAudioIf *audiohandler);
|
||||||
|
|||||||
@@ -9,17 +9,17 @@
|
|||||||
#include "femontools.h"
|
#include "femontools.h"
|
||||||
#include "femonac3.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
|
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
|
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},
|
{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},
|
{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},
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ class cFemonAC3 {
|
|||||||
private:
|
private:
|
||||||
cFemonAC3If *m_AudioHandler;
|
cFemonAC3If *m_AudioHandler;
|
||||||
|
|
||||||
static unsigned int s_Bitrates[32];
|
static int s_Bitrates[32];
|
||||||
static unsigned int s_Frequencies[4];
|
static int s_Frequencies[4];
|
||||||
static unsigned int s_Frames[3][32];
|
static int s_Frames[3][32];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cFemonAC3(cFemonAC3If *audiohandler);
|
cFemonAC3(cFemonAC3If *audiohandler);
|
||||||
|
|||||||
16
femoncfg.h
16
femoncfg.h
@@ -65,14 +65,14 @@ enum eFemonThemes
|
|||||||
struct cFemonTheme
|
struct cFemonTheme
|
||||||
{
|
{
|
||||||
int bpp;
|
int bpp;
|
||||||
int clrBackground;
|
unsigned int clrBackground;
|
||||||
int clrTitleBackground;
|
unsigned int clrTitleBackground;
|
||||||
int clrTitleText;
|
unsigned int clrTitleText;
|
||||||
int clrActiveText;
|
unsigned int clrActiveText;
|
||||||
int clrInactiveText;
|
unsigned int clrInactiveText;
|
||||||
int clrRed;
|
unsigned int clrRed;
|
||||||
int clrYellow;
|
unsigned int clrYellow;
|
||||||
int clrGreen;
|
unsigned int clrGreen;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const cFemonTheme femonTheme[eFemonThemeMaxNumber];
|
extern const cFemonTheme femonTheme[eFemonThemeMaxNumber];
|
||||||
|
|||||||
@@ -8,14 +8,14 @@
|
|||||||
#include "femontools.h"
|
#include "femontools.h"
|
||||||
#include "femonlatm.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, 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
|
||||||
{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
|
22050, 24000, 16000, -1
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ class cFemonLATM {
|
|||||||
private:
|
private:
|
||||||
cFemonAudioIf *m_AudioHandler;
|
cFemonAudioIf *m_AudioHandler;
|
||||||
|
|
||||||
static unsigned int s_Bitrates[3][16];
|
static int s_Bitrates[3][16];
|
||||||
static unsigned int s_Samplerates[4];
|
static int s_Samplerates[4];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cFemonLATM(cFemonAudioIf *audiohandler);
|
cFemonLATM(cFemonAudioIf *audiohandler);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#define IS_EXTENSION_START(buf) (((buf)[0] == 0x00) && ((buf)[1] == 0x00) && ((buf)[2] == 0x01) && ((buf)[3] == 0xB5))
|
#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
|
{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
|
{22050, 24000, 16000, -1}, // MPEG-2
|
||||||
{44100, 48000, 32000, -1} // MPEG-1
|
{44100, 48000, 32000, -1} // MPEG-1
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ private:
|
|||||||
cFemonVideoIf *m_VideoHandler;
|
cFemonVideoIf *m_VideoHandler;
|
||||||
cFemonAudioIf *m_AudioHandler;
|
cFemonAudioIf *m_AudioHandler;
|
||||||
|
|
||||||
static unsigned int s_Bitrates[2][3][16];
|
static int s_Bitrates[2][3][16];
|
||||||
static unsigned int s_Samplerates[2][4];
|
static int s_Samplerates[2][4];
|
||||||
static eAudioCodec s_Formats[2][4];
|
static eAudioCodec s_Formats[2][4];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
28
femonosd.c
28
femonosd.c
@@ -183,6 +183,7 @@ cFemonOsd::cFemonOsd()
|
|||||||
m_BERValid(false),
|
m_BERValid(false),
|
||||||
m_UNC(0),
|
m_UNC(0),
|
||||||
m_UNCValid(false),
|
m_UNCValid(false),
|
||||||
|
m_FrontendName(""),
|
||||||
m_FrontendStatusValid(false),
|
m_FrontendStatusValid(false),
|
||||||
m_DeviceSource(DEVICESOURCE_DVBAPI),
|
m_DeviceSource(DEVICESOURCE_DVBAPI),
|
||||||
m_DisplayMode(femonConfig.displaymode),
|
m_DisplayMode(femonConfig.displaymode),
|
||||||
@@ -200,7 +201,7 @@ cFemonOsd::cFemonOsd()
|
|||||||
memset(&m_FrontendInfo, 0, sizeof(m_FrontendInfo));
|
memset(&m_FrontendInfo, 0, sizeof(m_FrontendInfo));
|
||||||
m_SvdrpConnection.handle = -1;
|
m_SvdrpConnection.handle = -1;
|
||||||
femonSymbols.Refresh();
|
femonSymbols.Refresh();
|
||||||
m_Font = cFont::CreateFont(Setup.FontSml, min(max(Setup.FontSmlSize, MINFONTSIZE), MAXFONTSIZE));
|
m_Font = cFont::CreateFont(Setup.FontSml, constrain(Setup.FontSmlSize, MINFONTSIZE, MAXFONTSIZE));
|
||||||
if (!m_Font || !m_Font->Height()) {
|
if (!m_Font || !m_Font->Height()) {
|
||||||
m_Font = new cFemonDummyFont;
|
m_Font = new cFemonDummyFont;
|
||||||
error("cFemonOsd::cFemonOsd() cannot create required font.");
|
error("cFemonOsd::cFemonOsd() cannot create required font.");
|
||||||
@@ -420,7 +421,7 @@ void cFemonOsd::DrawInfoWindow(void)
|
|||||||
offset += OSDROWHEIGHT;
|
offset += OSDROWHEIGHT;
|
||||||
switch (channel->Source() & cSource::st_Mask) {
|
switch (channel->Source() & cSource::st_Mask) {
|
||||||
case cSource::stSat:
|
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;
|
offset += OSDROWHEIGHT;
|
||||||
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
|
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
|
||||||
OSDDRAWINFORIGHT(trVDR("Source"), *cSource::ToString(channel->Source()));
|
OSDDRAWINFORIGHT(trVDR("Source"), *cSource::ToString(channel->Source()));
|
||||||
@@ -437,7 +438,7 @@ void cFemonOsd::DrawInfoWindow(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case cSource::stCable:
|
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;
|
offset += OSDROWHEIGHT;
|
||||||
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
|
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
|
||||||
OSDDRAWINFORIGHT(trVDR("Source"), *cSource::ToString(channel->Source()));
|
OSDDRAWINFORIGHT(trVDR("Source"), *cSource::ToString(channel->Source()));
|
||||||
@@ -450,7 +451,7 @@ void cFemonOsd::DrawInfoWindow(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case cSource::stTerr:
|
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;
|
offset += OSDROWHEIGHT;
|
||||||
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
|
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
|
||||||
OSDDRAWINFORIGHT(trVDR("Transmission"), *getTransmission(dtp.Transmission()));
|
OSDDRAWINFORIGHT(trVDR("Transmission"), *getTransmission(dtp.Transmission()));
|
||||||
@@ -556,9 +557,10 @@ void cFemonOsd::Action(void)
|
|||||||
m_QualityValid = (m_Quality >= 0);
|
m_QualityValid = (m_Quality >= 0);
|
||||||
m_Strength = cDevice::ActualDevice()->SignalStrength();
|
m_Strength = cDevice::ActualDevice()->SignalStrength();
|
||||||
m_StrengthValid = (m_Strength >= 0);
|
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_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_FrontendStatusValid = m_StrengthValid;
|
||||||
m_Signal = m_Strength * 0xFFFF / 100;
|
m_Signal = uint16_t(m_Strength * 0xFFFF / 100);
|
||||||
m_SignalValid = m_StrengthValid;
|
m_SignalValid = m_StrengthValid;
|
||||||
m_SNR = 0;
|
m_SNR = 0;
|
||||||
m_SNRValid = false;
|
m_SNRValid = false;
|
||||||
@@ -572,11 +574,12 @@ void cFemonOsd::Action(void)
|
|||||||
m_QualityValid = (m_Quality >= 0);
|
m_QualityValid = (m_Quality >= 0);
|
||||||
m_Strength = cDevice::ActualDevice()->SignalStrength();
|
m_Strength = cDevice::ActualDevice()->SignalStrength();
|
||||||
m_StrengthValid = (m_Strength >= 0);
|
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_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_FrontendStatusValid = m_StrengthValid;
|
||||||
m_Signal = m_Strength * 0xFFFF / 100;
|
m_Signal = uint16_t(m_Strength * 0xFFFF / 100);
|
||||||
m_SignalValid = m_StrengthValid;
|
m_SignalValid = m_StrengthValid;
|
||||||
m_SNR = m_Quality * 0xFFFF / 100;
|
m_SNR = uint16_t(m_Quality * 0xFFFF / 100);
|
||||||
m_SNRValid = m_QualityValid;
|
m_SNRValid = m_QualityValid;
|
||||||
m_BER = 0;
|
m_BER = 0;
|
||||||
m_BERValid = false;
|
m_BERValid = false;
|
||||||
@@ -590,6 +593,7 @@ void cFemonOsd::Action(void)
|
|||||||
m_QualityValid = (m_Quality >= 0);
|
m_QualityValid = (m_Quality >= 0);
|
||||||
m_Strength = cDevice::ActualDevice()->SignalStrength();
|
m_Strength = cDevice::ActualDevice()->SignalStrength();
|
||||||
m_StrengthValid = (m_Strength >= 0);
|
m_StrengthValid = (m_Strength >= 0);
|
||||||
|
m_FrontendName = cDevice::ActualDevice()->DeviceName();
|
||||||
m_FrontendStatusValid = (ioctl(m_Frontend, FE_READ_STATUS, &m_FrontendStatus) >= 0);
|
m_FrontendStatusValid = (ioctl(m_Frontend, FE_READ_STATUS, &m_FrontendStatus) >= 0);
|
||||||
m_SignalValid = (ioctl(m_Frontend, FE_READ_SIGNAL_STRENGTH, &m_Signal) >= 0);
|
m_SignalValid = (ioctl(m_Frontend, FE_READ_SIGNAL_STRENGTH, &m_Signal) >= 0);
|
||||||
m_SNRValid = (ioctl(m_Frontend, FE_READ_SNR, &m_SNR) >= 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))
|
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)) {
|
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)) {
|
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);
|
||||||
@@ -725,13 +729,13 @@ void cFemonOsd::Show(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber)
|
void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber, bool liveView)
|
||||||
{
|
{
|
||||||
debug("%s(%d,%d)\n", __PRETTY_FUNCTION__, device->DeviceNumber(), channelNumber);
|
debug("%s(%d,%d)\n", __PRETTY_FUNCTION__, device->DeviceNumber(), channelNumber);
|
||||||
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
|
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
|
||||||
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||||
|
|
||||||
if (!device->IsPrimaryDevice() || !channelNumber || !channel || channel->Number() != channelNumber)
|
if (!liveView || !channelNumber || !channel || channel->Number() != channelNumber)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_DeviceSource = DEVICESOURCE_DVBAPI;
|
m_DeviceSource = DEVICESOURCE_DVBAPI;
|
||||||
@@ -816,13 +820,13 @@ bool cFemonOsd::DeviceSwitch(int direction)
|
|||||||
}
|
}
|
||||||
if (cDevice::GetDevice(device)->ProvidesChannel(channel, 0)) {
|
if (cDevice::GetDevice(device)->ProvidesChannel(channel, 0)) {
|
||||||
debug("%s(%d) device(%d)\n", __PRETTY_FUNCTION__, direction, device);
|
debug("%s(%d) device(%d)\n", __PRETTY_FUNCTION__, direction, device);
|
||||||
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), 0);
|
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), 0, true);
|
||||||
cControl::Shutdown();
|
cControl::Shutdown();
|
||||||
cDevice::GetDevice(device)->SwitchChannel(channel, true);
|
cDevice::GetDevice(device)->SwitchChannel(channel, true);
|
||||||
if (cDevice::GetDevice(device) == cDevice::PrimaryDevice())
|
if (cDevice::GetDevice(device) == cDevice::PrimaryDevice())
|
||||||
cDevice::GetDevice(device)->ForceTransferMode();
|
cDevice::GetDevice(device)->ForceTransferMode();
|
||||||
cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel));
|
cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel));
|
||||||
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number());
|
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number(), true);
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ private:
|
|||||||
bool m_BERValid;
|
bool m_BERValid;
|
||||||
uint32_t m_UNC;
|
uint32_t m_UNC;
|
||||||
bool m_UNCValid;
|
bool m_UNCValid;
|
||||||
|
cString m_FrontendName;
|
||||||
fe_status_t m_FrontendStatus;
|
fe_status_t m_FrontendStatus;
|
||||||
bool m_FrontendStatusValid;
|
bool m_FrontendStatusValid;
|
||||||
dvb_frontend_info m_FrontendInfo;
|
dvb_frontend_info m_FrontendInfo;
|
||||||
@@ -79,7 +80,7 @@ protected:
|
|||||||
cFemonOsd(const cFemonOsd&);
|
cFemonOsd(const cFemonOsd&);
|
||||||
cFemonOsd& operator= (const cFemonOsd&);
|
cFemonOsd& operator= (const cFemonOsd&);
|
||||||
virtual void Action(void);
|
virtual void Action(void);
|
||||||
virtual void ChannelSwitch(const cDevice * device, int channelNumber);
|
virtual void ChannelSwitch(const cDevice *device, int channelNumber, bool liveView);
|
||||||
virtual void SetAudioTrack(int Index, const char * const *Tracks);
|
virtual void SetAudioTrack(int Index, const char * const *Tracks);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ public:
|
|||||||
~cFemonSymbolCache();
|
~cFemonSymbolCache();
|
||||||
void Refresh();
|
void Refresh();
|
||||||
cBitmap& Get(eSymbols symbolP);
|
cBitmap& Get(eSymbols symbolP);
|
||||||
int GetSpacing() { return yFactorM * DEFAULT_SPACING; }
|
int GetSpacing() { return int(yFactorM * DEFAULT_SPACING); }
|
||||||
int GetRounding() { return yFactorM * DEFAULT_ROUNDING; }
|
int GetRounding() { return int(yFactorM * DEFAULT_ROUNDING); }
|
||||||
};
|
};
|
||||||
|
|
||||||
extern cFemonSymbolCache femonSymbols;
|
extern cFemonSymbolCache femonSymbols;
|
||||||
|
|||||||
13
femontools.c
13
femontools.c
@@ -97,7 +97,7 @@ cString getFrontendInfo(cDvbDevice *device)
|
|||||||
info = cString::sprintf("CARD:%d\nSTRG:%d\nQUAL:%d", device->CardIndex(), device->SignalStrength(), device->SignalQuality());
|
info = cString::sprintf("CARD:%d\nSTRG:%d\nQUAL:%d", device->CardIndex(), device->SignalStrength(), device->SignalQuality());
|
||||||
|
|
||||||
if (ioctl(fe, FE_GET_INFO, &value) >= 0)
|
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)
|
if (ioctl(fe, FE_READ_STATUS, &status) >= 0)
|
||||||
info = cString::sprintf("%s\nSTAT:%02X", *info, status);
|
info = cString::sprintf("%s\nSTAT:%02X", *info, status);
|
||||||
if (ioctl(fe, FE_READ_SIGNAL_STRENGTH, &signal) >= 0)
|
if (ioctl(fe, FE_READ_SIGNAL_STRENGTH, &signal) >= 0)
|
||||||
@@ -121,19 +121,10 @@ cString getFrontendInfo(cDvbDevice *device)
|
|||||||
|
|
||||||
cString getFrontendName(cDvbDevice *device)
|
cString getFrontendName(cDvbDevice *device)
|
||||||
{
|
{
|
||||||
struct dvb_frontend_info value;
|
|
||||||
|
|
||||||
if (!device)
|
if (!device)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
int fe = open(*cString::sprintf(FRONTEND_DEVICE, device->Adapter(), device->Frontend()), O_RDONLY | O_NONBLOCK);
|
return (cString::sprintf("%s on device #%d", *device->DeviceName(), device->CardIndex()));
|
||||||
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()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cString getFrontendStatus(cDvbDevice *device)
|
cString getFrontendStatus(cDvbDevice *device)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0200\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0200\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0200\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0200\n"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-femon 1.7.13\n"
|
"Project-Id-Version: vdr-femon 1.7.15\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
"POT-Creation-Date: 2010-10-10 10:10+0300\n"
|
||||||
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
"PO-Revision-Date: 2010-10-10 10:10+0300\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user