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

Compare commits

..

6 Commits

Author SHA1 Message Date
Rolf Ahrenberg
905b7c0870 Updated for a new release version. 2012-03-10 23:07:03 +02:00
Rolf Ahrenberg
597425a271 Updated for vdr-1.7.26. 2012-03-10 23:05:38 +02:00
Rolf Ahrenberg
86210928b8 Updated for vdr-1.7.25. 2012-03-03 15:19:18 +02:00
Rolf Ahrenberg
c98fe8ca87 Added a GIT tag into the version string. 2012-02-26 22:54:18 +02:00
Rolf Ahrenberg
5598f7cc43 Silenced compilation warnings. 2012-02-19 18:54:19 +02:00
Rolf Ahrenberg
62f1f5f776 Updated Makefile. 2012-02-19 17:48:21 +02:00
17 changed files with 42 additions and 29 deletions

View File

@@ -432,3 +432,7 @@ VDR Plugin 'femon' Revision History
- Added initial support for PVRINPUT devices (Thanks to Winfried Köhler).
- Added initial support for IPTV devices.
2012-03-10: Version 1.7.14
- Updated for vdr-1.7.26.

View File

@@ -19,6 +19,7 @@ PLUGIN = femon
### 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')
GITTAG = $(shell git describe --always 2>/dev/null)
### The C++ compiler and options:
@@ -28,9 +29,9 @@ LDFLAGS ?= -Wl,--as-needed
### The directory environment:
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
VDRDIR ?= ../../..
LIBDIR ?= ../../lib
TMPDIR ?= /tmp
### Make sure that necessary options are included:
@@ -59,6 +60,10 @@ ifdef FEMON_DEBUG
DEFINES += -DDEBUG
endif
ifneq ($(strip $(GITTAG)),)
DEFINES += -DGITVERSION='"-GIT-$(GITTAG)"'
endif
.PHONY: all all-redirect
all-redirect: all

12
femon.c
View File

@@ -14,11 +14,15 @@
#include "femonservice.h"
#include "femontools.h"
#if defined(APIVERSNUM) && APIVERSNUM < 10723
#error "VDR-1.7.23 API version or greater is required!"
#if defined(APIVERSNUM) && APIVERSNUM < 10726
#error "VDR-1.7.26 API version or greater is required!"
#endif
static const char VERSION[] = "1.7.13";
#ifndef GITVERSION
#define GITVERSION ""
#endif
static const char VERSION[] = "1.7.14" GITVERSION;
static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)");
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());
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)
dev = dev2;
}

View File

@@ -200,7 +200,7 @@ cFemonOsd::cFemonOsd()
memset(&m_FrontendInfo, 0, sizeof(m_FrontendInfo));
m_SvdrpConnection.handle = -1;
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()) {
m_Font = new cFemonDummyFont;
error("cFemonOsd::cFemonOsd() cannot create required font.");
@@ -558,7 +558,7 @@ void cFemonOsd::Action(void)
m_StrengthValid = (m_Strength >= 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_Signal = m_Strength * 0xFFFF / 100;
m_Signal = uint16_t(m_Strength * 0xFFFF / 100);
m_SignalValid = m_StrengthValid;
m_SNR = 0;
m_SNRValid = false;
@@ -574,9 +574,9 @@ void cFemonOsd::Action(void)
m_StrengthValid = (m_Strength >= 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_Signal = m_Strength * 0xFFFF / 100;
m_Signal = uint16_t(m_Strength * 0xFFFF / 100);
m_SignalValid = m_StrengthValid;
m_SNR = m_Quality * 0xFFFF / 100;
m_SNR = uint16_t(m_Quality * 0xFFFF / 100);
m_SNRValid = m_QualityValid;
m_BER = 0;
m_BERValid = false;
@@ -725,13 +725,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);
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (!device->IsPrimaryDevice() || !channelNumber || !channel || channel->Number() != channelNumber)
if (!liveView || !device->IsPrimaryDevice() || !channelNumber || !channel || channel->Number() != channelNumber)
return;
m_DeviceSource = DEVICESOURCE_DVBAPI;
@@ -816,13 +816,13 @@ bool cFemonOsd::DeviceSwitch(int direction)
}
if (cDevice::GetDevice(device)->ProvidesChannel(channel, 0)) {
debug("%s(%d) device(%d)\n", __PRETTY_FUNCTION__, direction, device);
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), 0);
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), 0, true);
cControl::Shutdown();
cDevice::GetDevice(device)->SwitchChannel(channel, true);
if (cDevice::GetDevice(device) == cDevice::PrimaryDevice())
cDevice::GetDevice(device)->ForceTransferMode();
cControl::Launch(new cTransferControl(cDevice::GetDevice(device), channel));
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number());
cStatus::MsgChannelSwitch(cDevice::PrimaryDevice(), channel->Number(), true);
return (true);
}
}

View File

@@ -79,7 +79,7 @@ protected:
cFemonOsd(const cFemonOsd&);
cFemonOsd& operator= (const cFemonOsd&);
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);
public:

View File

@@ -77,8 +77,8 @@ public:
~cFemonSymbolCache();
void Refresh();
cBitmap& Get(eSymbols symbolP);
int GetSpacing() { return yFactorM * DEFAULT_SPACING; }
int GetRounding() { return yFactorM * DEFAULT_ROUNDING; }
int GetSpacing() { return int(yFactorM * DEFAULT_SPACING); }
int GetRounding() { return int(yFactorM * DEFAULT_ROUNDING); }
};
extern cFemonSymbolCache femonSymbols;

View File

@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-femon 1.7.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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.13\n"
"Project-Id-Version: vdr-femon 1.7.14\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"