mirror of
https://github.com/rofafor/vdr-plugin-femon.git
synced 2023-10-10 13:36:53 +02:00
Updated for vdr-2.3.1.
This commit is contained in:
parent
a2a2a27ef3
commit
c13f98a622
9
HISTORY
9
HISTORY
@ -525,3 +525,12 @@ VDR Plugin 'femon' Revision History
|
||||
- Got rid of FEMON_DEBUG.
|
||||
- Added support for tracing modes.
|
||||
- Removed the 'femonclient' plugin.
|
||||
|
||||
|
||||
===================================
|
||||
VDR Plugin 'femon' Revision History
|
||||
===================================
|
||||
|
||||
2015-XX-XX: Version 2.3.0
|
||||
|
||||
- Updated for vdr-2.3.1.
|
||||
|
9
femon.c
9
femon.c
@ -17,15 +17,15 @@
|
||||
#include "tools.h"
|
||||
#include "setup.h"
|
||||
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 20200
|
||||
#error "VDR-2.2.0 API version or greater is required!"
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 20301
|
||||
#error "VDR-2.3.1 API version or greater is required!"
|
||||
#endif
|
||||
|
||||
#ifndef GITVERSION
|
||||
#define GITVERSION ""
|
||||
#endif
|
||||
|
||||
static const char VERSION[] = "2.2.1" GITVERSION;
|
||||
static const char VERSION[] = "2.3.0" GITVERSION;
|
||||
static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)");
|
||||
static const char MAINMENUENTRY[] = trNOOP("Signal Information");
|
||||
|
||||
@ -120,7 +120,8 @@ cOsdObject *cPluginFemon::MainMenuAction(void)
|
||||
{
|
||||
// Perform the action when selected from the main VDR menu.
|
||||
debug1("%s", __PRETTY_FUNCTION__);
|
||||
if (cControl::Control() || (Channels.Count() <= 0))
|
||||
LOCK_CHANNELS_READ;
|
||||
if (cControl::Control() || (Channels->Count() <= 0))
|
||||
Skins.Message(mtInfo, tr("Femon not available"));
|
||||
else
|
||||
return cFemonOsd::Instance(true);
|
||||
|
39
osd.c
39
osd.c
@ -250,7 +250,8 @@ cFemonOsd::~cFemonOsd(void)
|
||||
void cFemonOsd::DrawStatusWindow(void)
|
||||
{
|
||||
cMutexLock lock(&mutexM);
|
||||
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
|
||||
if (osdM && channel) {
|
||||
cBitmap *bm = NULL;
|
||||
@ -394,7 +395,8 @@ void cFemonOsd::DrawStatusWindow(void)
|
||||
void cFemonOsd::DrawInfoWindow(void)
|
||||
{
|
||||
cMutexLock lock(&mutexM);
|
||||
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
|
||||
if (osdM && channel) {
|
||||
int offset = 0;
|
||||
@ -716,7 +718,8 @@ void cFemonOsd::Show(void)
|
||||
{
|
||||
debug1("%s", __PRETTY_FUNCTION__);
|
||||
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
|
||||
const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
|
||||
deviceSourceM = DEVICESOURCE_DVBAPI;
|
||||
if (channel) {
|
||||
@ -784,7 +787,8 @@ void cFemonOsd::ChannelSwitch(const cDevice * deviceP, int channelNumberP, bool
|
||||
{
|
||||
debug1("%s (%d, %d, %d)", __PRETTY_FUNCTION__, deviceP->DeviceNumber(), channelNumberP, liveViewP);
|
||||
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
|
||||
const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
|
||||
if (!deviceP || !liveViewP)
|
||||
return;
|
||||
@ -852,7 +856,8 @@ void cFemonOsd::SetAudioTrack(int indexP, const char * const *tracksP)
|
||||
DELETENULL(receiverM);
|
||||
}
|
||||
if (FemonConfig.GetAnalyzeStream()) {
|
||||
const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
if (channel) {
|
||||
receiverM = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0);
|
||||
cDevice::ActualDevice()->AttachReceiver(receiverM);
|
||||
@ -866,7 +871,8 @@ bool cFemonOsd::DeviceSwitch(int directionP)
|
||||
int device = cDevice::ActualDevice()->DeviceNumber();
|
||||
int direction = sgn(directionP);
|
||||
if (device >= 0) {
|
||||
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
if (channel) {
|
||||
for (int i = 0; i < cDevice::NumDevices() - 1; i++) {
|
||||
if (direction >= 0) {
|
||||
@ -978,7 +984,8 @@ bool cFemonOsd::SvdrpConnect(void)
|
||||
bool cFemonOsd::SvdrpTune(void)
|
||||
{
|
||||
if (svdrpPluginM && svdrpConnectionM.handle >= 0) {
|
||||
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
if (channel) {
|
||||
SvdrpCommand_v1_0 cmd;
|
||||
cmd.handle = svdrpConnectionM.handle;
|
||||
@ -1038,7 +1045,8 @@ eOSState cFemonOsd::ProcessKey(eKeys keyP)
|
||||
if ((numberM == 0) && (oldNumberM != 0)) {
|
||||
numberM = oldNumberM;
|
||||
oldNumberM = cDevice::CurrentChannel();
|
||||
Channels.SwitchTo(numberM);
|
||||
LOCK_CHANNELS_READ;
|
||||
Channels->SwitchTo(numberM);
|
||||
numberM = 0;
|
||||
return osContinue;
|
||||
}
|
||||
@ -1047,11 +1055,12 @@ eOSState cFemonOsd::ProcessKey(eKeys keyP)
|
||||
numberM = numberM * 10 + keyP - k0;
|
||||
if (numberM > 0) {
|
||||
DrawStatusWindow();
|
||||
cChannel *ch = Channels.GetByNumber(numberM);
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *ch = Channels->GetByNumber(numberM);
|
||||
inputTimeM.Set(0);
|
||||
// Lets see if there can be any useful further input:
|
||||
int n = ch ? numberM * 10 : 0;
|
||||
while (ch && (ch = Channels.Next(ch)) != NULL) {
|
||||
while (ch && (ch = Channels->Next(ch)) != NULL) {
|
||||
if (!ch->GroupSep()) {
|
||||
if (n <= ch->Number() && ch->Number() <= n + 9) {
|
||||
n = 0;
|
||||
@ -1064,7 +1073,7 @@ eOSState cFemonOsd::ProcessKey(eKeys keyP)
|
||||
if (n > 0) {
|
||||
// This channel is the only one that fits the input, so let's take it right away:
|
||||
oldNumberM = cDevice::CurrentChannel();
|
||||
Channels.SwitchTo(numberM);
|
||||
Channels->SwitchTo(numberM);
|
||||
numberM = 0;
|
||||
}
|
||||
}
|
||||
@ -1124,9 +1133,10 @@ eOSState cFemonOsd::ProcessKey(eKeys keyP)
|
||||
break;
|
||||
case kNone:
|
||||
if (numberM && (inputTimeM.Elapsed() > CHANNELINPUT_TIMEOUT)) {
|
||||
if (Channels.GetByNumber(numberM)) {
|
||||
LOCK_CHANNELS_READ;
|
||||
if (Channels->GetByNumber(numberM)) {
|
||||
oldNumberM = cDevice::CurrentChannel();
|
||||
Channels.SwitchTo(numberM);
|
||||
Channels->SwitchTo(numberM);
|
||||
numberM = 0;
|
||||
}
|
||||
else {
|
||||
@ -1138,7 +1148,8 @@ eOSState cFemonOsd::ProcessKey(eKeys keyP)
|
||||
case kOk:
|
||||
{
|
||||
// toggle between display modes
|
||||
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
if (++displayModeM == eFemonModeAC3 && channel && !channel->Dpid(0)) displayModeM++;
|
||||
if (displayModeM >= eFemonModeMaxNumber) displayModeM = 0;
|
||||
DrawInfoWindow();
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -6,7 +6,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Yarema aka Knedlyk <yupadmin@gmail.com>, 2010.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: vdr-femon 2.2.1\n"
|
||||
"Project-Id-Version: vdr-femon 2.3.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
|
||||
"PO-Revision-Date: 2015-04-04 04:04+0300\n"
|
||||
|
@ -101,7 +101,7 @@ void cFemonReceiver::Activate(bool onP)
|
||||
Deactivate();
|
||||
}
|
||||
|
||||
void cFemonReceiver::Receive(uchar *dataP, int lengthP)
|
||||
void cFemonReceiver::Receive(const uchar *dataP, int lengthP)
|
||||
{
|
||||
// TS packet length: TS_SIZE
|
||||
if (Running() && (*dataP == TS_SYNC_BYTE) && (lengthP == TS_SIZE)) {
|
||||
|
@ -59,7 +59,7 @@ private:
|
||||
|
||||
protected:
|
||||
virtual void Activate(bool onP);
|
||||
virtual void Receive(uchar *dataP, int lengthP);
|
||||
virtual void Receive(const uchar *dataP, int lengthP);
|
||||
virtual void Action(void);
|
||||
|
||||
public:
|
||||
|
3
tools.c
3
tools.c
@ -110,7 +110,8 @@ cString getFrontendInfo(cDvbDevice *deviceP)
|
||||
uint16_t snr = 0;
|
||||
uint32_t ber = 0;
|
||||
uint32_t unc = 0;
|
||||
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
|
||||
if (!deviceP)
|
||||
return info;
|
||||
|
Loading…
Reference in New Issue
Block a user