[vdr-plugin-femon] 01/03: Imported Upstream version 2.2.1
Tobias Grimm
tiber-guest at moszumanska.debian.org
Thu Sep 3 16:49:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
tiber-guest pushed a commit to branch master
in repository vdr-plugin-femon.
commit 8f782145c84d08b3cfd195c6eca85aabb44c3643
Author: etobi <git at e-tobi.net>
Date: Thu Sep 3 18:34:08 2015 +0200
Imported Upstream version 2.2.1
---
HISTORY | 6 +
Makefile | 17 +-
femonaac.c => aac.c | 40 +-
aac.h | 26 ++
femonac3.c => ac3.c | 44 +-
ac3.h | 28 ++
femonaudio.h => audio.h | 34 +-
femoncfg.c => config.c | 46 +-
config.h | 136 ++++++
femon.c | 294 +++++--------
femonaac.h | 26 --
femonac3.h | 28 --
femoncfg.h | 81 ----
femonclient/vdr-femonclient-0.0.6.tgz | Bin 9294 -> 0 bytes
femonh264.h | 64 ---
femonlatm.h | 27 --
femonmpeg.h | 31 --
femonosd.h | 100 -----
femonreceiver.c | 250 -----------
femonreceiver.h | 178 --------
femontools.h | 91 ----
femonh264.c => h264.c | 224 +++++-----
h264.h | 64 +++
femonlatm.c => latm.c | 48 +-
latm.h | 27 ++
log.h | 48 ++
femonmpeg.c => mpeg.c | 74 ++--
mpeg.h | 31 ++
femonosd.c => osd.c | 808 +++++++++++++++++-----------------
osd.h | 102 +++++
po/de_DE.po | 192 ++++----
po/es_ES.po | 192 ++++----
po/et_EE.po | 192 ++++----
po/fi_FI.po | 192 ++++----
po/fr_FR.po | 192 ++++----
po/hu_HU.po | 192 ++++----
po/it_IT.po | 192 ++++----
po/lt_LT.po | 192 ++++----
po/ru_RU.po | 192 ++++----
po/sk_SK.po | 192 ++++----
po/uk_UA.po | 192 ++++----
po/zh_CN.po | 192 ++++----
po/zh_TW.po | 192 ++++----
receiver.c | 252 +++++++++++
receiver.h | 178 ++++++++
setup.c | 162 +++++++
setup.h | 41 ++
svdrpservice.h | 8 +-
femonsymbol.c => symbol.c | 16 +-
femonsymbol.h => symbol.h | 8 +-
femontools.c => tools.c | 383 ++++++++--------
tools.h | 83 ++++
femonvideo.h => video.h | 22 +-
53 files changed, 3418 insertions(+), 3204 deletions(-)
diff --git a/HISTORY b/HISTORY
index 4080788..8ad877e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -519,3 +519,9 @@ VDR Plugin 'femon' Revision History
- Updated CA definitions.
- Fixed the SVDRP service IP menu item (Thanks to Toerless Eckert).
- Fixed the detaching of receiver during a channel switch.
+
+2015-04-04: Version 2.2.1
+
+- Got rid of FEMON_DEBUG.
+- Added support for tracing modes.
+- Removed the 'femonclient' plugin.
diff --git a/Makefile b/Makefile
index 88adc63..70e6837 100644
--- a/Makefile
+++ b/Makefile
@@ -2,14 +2,6 @@
# Makefile for Frontend Status Monitor plugin
#
-# Debugging on/off
-
-#FEMON_DEBUG = 1
-
-# Strip debug symbols? Set eg. to /bin/true if not
-
-STRIP = strip
-
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
# By default the main source file also carries this name.
@@ -35,6 +27,7 @@ TMPDIR ?= /tmp
export CFLAGS = $(call PKGCFG,cflags)
export CXXFLAGS = $(call PKGCFG,cxxflags)
+STRIP ?= /bin/true
### The version number of VDR's plugin API:
@@ -59,10 +52,6 @@ INCLUDES +=
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
-ifdef FEMON_DEBUG
-DEFINES += -DDEBUG
-endif
-
ifneq ($(strip $(GITTAG)),)
DEFINES += -DGITVERSION='"-GIT-$(GITTAG)"'
endif
@@ -72,7 +61,7 @@ all-redirect: all
### The object files (add further files here):
-OBJS = $(PLUGIN).o femonosd.o femonreceiver.o femoncfg.o femontools.o femonmpeg.o femonac3.o femonaac.o femonlatm.o femonh264.o femonsymbol.o
+OBJS = $(PLUGIN).o aac.o ac3.o config.o h264.o latm.o mpeg.o osd.o receiver.o setup.o symbol.o tools.o
### The main target:
@@ -122,9 +111,7 @@ install-i18n: $(I18Nmsgs)
$(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
-ifndef FEMON_DEBUG
@$(STRIP) $@
-endif
install-lib: $(SOFILE)
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
diff --git a/femonaac.c b/aac.c
similarity index 64%
rename from femonaac.c
rename to aac.c
index a96b745..9a3eab0 100644
--- a/femonaac.c
+++ b/aac.c
@@ -1,22 +1,22 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * aac.c: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
-#include "femontools.h"
-#include "femonaac.h"
+#include "tools.h"
+#include "aac.h"
#define IS_HEAAC_AUDIO(buf) (((buf)[0] == 0xFF) && (((buf)[1] & 0xF6) == 0xF0))
-int cFemonAAC::s_Samplerates[16] =
+int cFemonAAC::sampleRateS[16] =
{
96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, -1, -1, -1, -1
};
-cFemonAAC::cFemonAAC(cFemonAudioIf *audiohandler)
-: m_AudioHandler(audiohandler)
+cFemonAAC::cFemonAAC(cFemonAudioIf *audioHandlerP)
+: audioHandlerM(audioHandlerP)
{
}
@@ -24,11 +24,11 @@ cFemonAAC::~cFemonAAC()
{
}
-bool cFemonAAC::processAudio(const uint8_t *buf, int len)
+bool cFemonAAC::processAudio(const uint8_t *bufP, int lenP)
{
- cFemonBitStream bs(buf, len * 8);
+ cFemonBitStream bs(bufP, lenP * 8);
- if (!m_AudioHandler)
+ if (!audioHandlerM)
return false;
/* ADTS Fixed Header:
@@ -46,9 +46,9 @@ bool cFemonAAC::processAudio(const uint8_t *buf, int len)
*/
// skip PES header
- if (!PesLongEnough(len))
+ if (!PesLongEnough(lenP))
return false;
- bs.SkipBits(8 * PesPayloadOffset(buf));
+ bs.SkipBits(8 * PesPayloadOffset(bufP));
// HE-AAC audio detection
if (bs.GetBits(12) != 0xFFF) // syncword
@@ -66,38 +66,38 @@ bool cFemonAAC::processAudio(const uint8_t *buf, int len)
bs.SkipBit(); // private pid
int channel_configuration = bs.GetBits(3); // channel_configuration
- m_AudioHandler->SetAudioCodec(AUDIO_CODEC_HEAAC);
- m_AudioHandler->SetAudioBitrate(AUDIO_BITRATE_RESERVED);
+ audioHandlerM->SetAudioCodec(AUDIO_CODEC_HEAAC);
+ audioHandlerM->SetAudioBitrate(AUDIO_BITRATE_RESERVED);
switch (channel_configuration) {
case 0:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_STEREO);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_STEREO);
break;
case 1:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_JOINT_STEREO);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_JOINT_STEREO);
break;
case 2:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_DUAL);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_DUAL);
break;
case 3:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_SINGLE);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_SINGLE);
break;
default:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_INVALID);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_INVALID);
break;
}
switch (sampling_frequency_index) {
case 0xC ... 0xF:
- m_AudioHandler->SetAudioSamplingFrequency(AUDIO_SAMPLING_FREQUENCY_RESERVED);
+ audioHandlerM->SetAudioSamplingFrequency(AUDIO_SAMPLING_FREQUENCY_RESERVED);
break;
default:
- m_AudioHandler->SetAudioSamplingFrequency(s_Samplerates[sampling_frequency_index]);
+ audioHandlerM->SetAudioSamplingFrequency(sampleRateS[sampling_frequency_index]);
break;
}
diff --git a/aac.h b/aac.h
new file mode 100644
index 0000000..35cf24b
--- /dev/null
+++ b/aac.h
@@ -0,0 +1,26 @@
+/*
+ * aac.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_AAC_H
+#define __FEMON_AAC_H
+
+#include "audio.h"
+
+class cFemonAAC {
+private:
+ cFemonAudioIf *audioHandlerM;
+
+ static int sampleRateS[16];
+
+public:
+ cFemonAAC(cFemonAudioIf *audioHandlerP);
+ virtual ~cFemonAAC();
+
+ bool processAudio(const uint8_t *bufP, int lenP);
+ };
+
+#endif //__FEMON_AAC_H
diff --git a/femonac3.c b/ac3.c
similarity index 64%
rename from femonac3.c
rename to ac3.c
index 087e071..211fae7 100644
--- a/femonac3.c
+++ b/ac3.c
@@ -1,33 +1,33 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * ac3.c: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
* AC3 Audio Header: http://www.atsc.org/standards/a_52a.pdf
*/
-#include "femontools.h"
-#include "femonac3.h"
+#include "tools.h"
+#include "ac3.h"
-int cFemonAC3::s_Bitrates[32] =
+int cFemonAC3::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
};
-int cFemonAC3::s_Frequencies[4] =
+int cFemonAC3::frequencieS[4] =
{
480, 441, 320, 0
};
-int cFemonAC3::s_Frames[3][32] =
+int cFemonAC3::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},
{96, 120, 144, 168, 192, 240, 288, 336, 384, 480, 576, 672, 768, 960, 1152, 1344, 1536, 1728, 1920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
};
-cFemonAC3::cFemonAC3(cFemonAC3If *audiohandler)
-: m_AudioHandler(audiohandler)
+cFemonAC3::cFemonAC3(cFemonAC3If *audioHandlerP)
+: audioHandlerM(audioHandlerP)
{
}
@@ -35,21 +35,21 @@ cFemonAC3::~cFemonAC3()
{
}
-bool cFemonAC3::processAudio(const uint8_t *buf, int len)
+bool cFemonAC3::processAudio(const uint8_t *bufP, int lenP)
{
int fscod, frmsizcod, bsmod, acmod;
int centermixlevel = AUDIO_CENTER_MIX_LEVEL_INVALID;
int surroundmixlevel = AUDIO_SURROUND_MIX_LEVEL_INVALID;
int dolbysurroundmode = AUDIO_DOLBY_SURROUND_MODE_INVALID;
- cFemonBitStream bs(buf, len * 8);
+ cFemonBitStream bs(bufP, lenP * 8);
- if (!m_AudioHandler)
+ if (!audioHandlerM)
return false;
// skip PES header
- if (!PesLongEnough(len))
+ if (!PesLongEnough(lenP))
return false;
- bs.SkipBits(8 * PesPayloadOffset(buf));
+ bs.SkipBits(8 * PesPayloadOffset(bufP));
// http://rmworkshop.com/dvd_info/related_info/ac3hdr.htm
@@ -78,16 +78,16 @@ bool cFemonAC3::processAudio(const uint8_t *buf, int len)
if (acmod == 0x02)
dolbysurroundmode = bs.GetBits(2);
- m_AudioHandler->SetAC3Bitrate(1000 * s_Bitrates[frmsizcod >> 1]);
- m_AudioHandler->SetAC3SamplingFrequency(100 * s_Frequencies[fscod]);
- m_AudioHandler->SetAC3Bitstream(bsmod);
- m_AudioHandler->SetAC3AudioCoding(acmod);
- m_AudioHandler->SetAC3CenterMix(centermixlevel);
- m_AudioHandler->SetAC3SurroundMix(surroundmixlevel);
- m_AudioHandler->SetAC3DolbySurround(dolbysurroundmode);
+ audioHandlerM->SetAC3Bitrate(1000 * bitrateS[frmsizcod >> 1]);
+ audioHandlerM->SetAC3SamplingFrequency(100 * frequencieS[fscod]);
+ audioHandlerM->SetAC3Bitstream(bsmod);
+ audioHandlerM->SetAC3AudioCoding(acmod);
+ audioHandlerM->SetAC3CenterMix(centermixlevel);
+ audioHandlerM->SetAC3SurroundMix(surroundmixlevel);
+ audioHandlerM->SetAC3DolbySurround(dolbysurroundmode);
- m_AudioHandler->SetAC3LFE(bs.GetBit()); // low frequency effects on
- m_AudioHandler->SetAC3Dialog(bs.GetBits(5)); // dialog normalization
+ audioHandlerM->SetAC3LFE(bs.GetBit()); // low frequency effects on
+ audioHandlerM->SetAC3Dialog(bs.GetBits(5)); // dialog normalization
return true;
}
diff --git a/ac3.h b/ac3.h
new file mode 100644
index 0000000..9006541
--- /dev/null
+++ b/ac3.h
@@ -0,0 +1,28 @@
+/*
+ * ac3.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_AC3_H
+#define __FEMON_AC3_H
+
+#include "audio.h"
+
+class cFemonAC3 {
+private:
+ cFemonAC3If *audioHandlerM;
+
+ static int bitrateS[32];
+ static int frequencieS[4];
+ static int frameS[3][32];
+
+public:
+ cFemonAC3(cFemonAC3If *audioHandlerP);
+ virtual ~cFemonAC3();
+
+ bool processAudio(const uint8_t *bufP, int lenP);
+ };
+
+#endif //__FEMON_AC3_H
diff --git a/femonaudio.h b/audio.h
similarity index 80%
rename from femonaudio.h
rename to audio.h
index 1257df1..e86c3b2 100644
--- a/femonaudio.h
+++ b/audio.h
@@ -1,12 +1,12 @@
/*
- * Frontend Status Monitor plugin for the AUDIO Disk Recorder
+ * audio.h: Frontend Status Monitor plugin for the AUDIO Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
-#ifndef __FEMONAUDIO_H
-#define __FEMONAUDIO_H
+#ifndef __FEMON_AUDIO_H
+#define __FEMON_AUDIO_H
enum eAudioCodec {
AUDIO_CODEC_INVALID = -1,
@@ -113,13 +113,13 @@ public:
virtual ~cFemonAudioIf() {}
// enum
- virtual void SetAudioCodec(eAudioCodec codec) = 0;
+ virtual void SetAudioCodec(eAudioCodec codecP) = 0;
// kbit/s or eAudioBitrate
- virtual void SetAudioBitrate(double bitrate) = 0;
+ virtual void SetAudioBitrate(double bitRateP) = 0;
// Hz or eAudioSamplingFrequency
- virtual void SetAudioSamplingFrequency(int sampling) = 0;
+ virtual void SetAudioSamplingFrequency(int samplingP) = 0;
// eAudioChannelMode
- virtual void SetAudioChannel(eAudioChannelMode mode) = 0;
+ virtual void SetAudioChannel(eAudioChannelMode modeP) = 0;
};
class cFemonAC3If {
@@ -128,23 +128,23 @@ public:
virtual ~cFemonAC3If() {}
// bit/s or eAudioBitrate
- virtual void SetAC3Bitrate(int bitrate) = 0;
+ virtual void SetAC3Bitrate(int bitRateP) = 0;
// Hz or eAudioSamplingFrequency
- virtual void SetAC3SamplingFrequency(int sampling) = 0;
+ virtual void SetAC3SamplingFrequency(int samplingP) = 0;
// 0..7 or eAudioBitstreamMode
- virtual void SetAC3Bitstream(int mode) = 0;
+ virtual void SetAC3Bitstream(int modeP) = 0;
// 0..7 or eAudioCodingMode
- virtual void SetAC3AudioCoding(int mode) = 0;
+ virtual void SetAC3AudioCoding(int modeP) = 0;
// eAudioDolbySurroundMode
- virtual void SetAC3DolbySurround(int mode) = 0;
+ virtual void SetAC3DolbySurround(int modeP) = 0;
// eAudioCenterMixLevel
- virtual void SetAC3CenterMix(int level) = 0;
+ virtual void SetAC3CenterMix(int levelP) = 0;
// eAudioSurroundMixLevel
- virtual void SetAC3SurroundMix(int level) = 0;
+ virtual void SetAC3SurroundMix(int levelP) = 0;
// -dB
- virtual void SetAC3Dialog(int level) = 0;
+ virtual void SetAC3Dialog(int levelP) = 0;
// boolean
- virtual void SetAC3LFE(bool onoff) = 0;
+ virtual void SetAC3LFE(bool onoffP) = 0;
};
-#endif //__FEMONAUDIO_H
+#endif //__FEMON_AUDIO_H
diff --git a/femoncfg.c b/config.c
similarity index 84%
rename from femoncfg.c
rename to config.c
index 9eedaef..6093999 100644
--- a/femoncfg.c
+++ b/config.c
@@ -1,34 +1,42 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * config.c: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
#include <string.h>
-#include "femoncfg.h"
-cFemonConfig femonConfig;
+#include "tools.h"
+#include "config.h"
-cFemonConfig::cFemonConfig(void)
+cFemonConfig FemonConfig;
+
+cFemonConfig::cFemonConfig()
+: traceModeM(eTraceModeNormal),
+ hideMenuM(0),
+ displayModeM(0),
+ skinM(0),
+ themeM(0),
+ positionM(1),
+ downscaleM(0),
+ redLimitM(33),
+ greenLimitM(66),
+ updateIntervalM(5),
+ analyzeStreamM(1),
+ calcIntervalM(20),
+ useSvdrpM(0),
+ svdrpPortM(6419)
+{
+ SetSvdrpIp("0.0.0.0");
+}
+
+void cFemonConfig::SetSvdrpIp(const char *strP)
{
- hidemenu = 0;
- displaymode = 0;
- skin = 0;
- theme = 0;
- position = 1;
- downscale = 0;
- redlimit = 33;
- greenlimit = 66;
- updateinterval = 5;
- analyzestream = 1;
- calcinterval = 20;
- usesvdrp = 0;
- svdrpport = 6419;
- strncpy(svdrpip, "0.0.0.0", sizeof(svdrpip));
+ strn0cpy(svdrpIpM, strP, sizeof(svdrpIpM));
}
-const cFemonTheme femonTheme[eFemonThemeMaxNumber] =
+const cFemonTheme FemonTheme[eFemonThemeMaxNumber] =
{
{
// eFemonThemeClassic
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..9bddfc6
--- /dev/null
+++ b/config.h
@@ -0,0 +1,136 @@
+/*
+ * config.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_CONFIG_H
+#define __FEMON_CONFIG_H
+
+#define MaxSvdrpIp 15 // xxx.xxx.xxx.xxx
+
+enum eFemonModes
+{
+ eFemonModeBasic,
+ eFemonModeTransponder,
+ eFemonModeStream,
+ eFemonModeAC3,
+ eFemonModeMaxNumber
+};
+
+class cFemonConfig
+{
+private:
+ unsigned int traceModeM;
+ int hideMenuM;
+ int displayModeM;
+ int skinM;
+ int themeM;
+ int positionM;
+ int downscaleM;
+ int redLimitM;
+ int greenLimitM;
+ int updateIntervalM;
+ int analyzeStreamM;
+ int calcIntervalM;
+ int useSvdrpM;
+ int svdrpPortM;
+ char svdrpIpM[MaxSvdrpIp + 1]; // must end with additional null
+
+public:
+ enum eTraceMode {
+ eTraceModeNormal = 0x0000,
+ eTraceModeDebug1 = 0x0001,
+ eTraceModeDebug2 = 0x0002,
+ eTraceModeDebug3 = 0x0004,
+ eTraceModeDebug4 = 0x0008,
+ eTraceModeDebug5 = 0x0010,
+ eTraceModeDebug6 = 0x0020,
+ eTraceModeDebug7 = 0x0040,
+ eTraceModeDebug8 = 0x0080,
+ eTraceModeDebug9 = 0x0100,
+ eTraceModeDebug10 = 0x0200,
+ eTraceModeDebug11 = 0x0400,
+ eTraceModeDebug12 = 0x0800,
+ eTraceModeDebug13 = 0x1000,
+ eTraceModeDebug14 = 0x2000,
+ eTraceModeDebug15 = 0x4000,
+ eTraceModeDebug16 = 0x8000,
+ eTraceModeMask = 0xFFFF
+ };
+ cFemonConfig();
+ unsigned int GetTraceMode(void) const { return traceModeM; }
+ bool IsTraceMode(eTraceMode modeP) const { return (traceModeM & modeP); }
+ int GetHideMenu(void) const { return hideMenuM; }
+ int GetDisplayMode(void) const { return displayModeM; }
+ int GetSkin(void) const { return skinM; }
+ int GetTheme(void) const { return themeM; }
+ int GetPosition(void) const { return positionM; }
+ int GetDownscale(void) const { return downscaleM; }
+ int GetRedLimit(void) const { return redLimitM; }
+ int GetGreenLimit(void) const { return greenLimitM; }
+ int GetUpdateInterval(void) const { return updateIntervalM; }
+ int GetAnalyzeStream(void) const { return analyzeStreamM; }
+ int GetCalcInterval(void) const { return calcIntervalM; }
+ int GetUseSvdrp(void) const { return useSvdrpM; }
+ int GetSvdrpPort(void) const { return svdrpPortM; }
+ const char *GetSvdrpIp(void) const { return svdrpIpM; }
+
+ void SetTraceMode(unsigned int modeP) { traceModeM = (modeP & eTraceModeMask); }
+ void SetHideMenu(int hideMenuP) { hideMenuM = hideMenuP; }
+ void SetDisplayMode(int displayModeP) { if (displayModeM < 0 || displayModeM >= eFemonModeMaxNumber) displayModeM = 0; else displayModeM = displayModeP; }
+ void SetSkin(int skinP) { skinM = skinP; }
+ void SetTheme(int themeP) { themeM = themeP; }
+ void SetPosition(int positionP) { positionM = positionP; }
+ void SetDownscale(int downscaleP) { downscaleM = downscaleP; }
+ void SetRedLimit(int redLimitP) { redLimitM = redLimitP; }
+ void SetGreenLimit(int greenLimitP) { greenLimitM = greenLimitP; }
+ void SetUpdateInterval(int updateIntervalP) { updateIntervalM = updateIntervalP; }
+ void SetAnalyzeStream(int analyzeStreamP) { analyzeStreamM = analyzeStreamP; }
+ void SetCalcInterval(int calcIntervalP) { calcIntervalM = calcIntervalP; }
+ void SetUseSvdrp(int useSvdrpP) { useSvdrpM = useSvdrpP; }
+ void SetSvdrpPort(int svdrpPortP) { svdrpPortM = svdrpPortP; }
+ void SetSvdrpIp(const char *strP);
+};
+
+extern cFemonConfig FemonConfig;
+
+enum eFemonSkins
+{
+ eFemonSkinClassic,
+ eFemonSkinElchi,
+ eFemonSkinMaxNumber
+};
+
+enum eFemonThemes
+{
+ eFemonThemeClassic,
+ eFemonThemeElchi,
+ eFemonThemeSTTNG,
+ eFemonThemeDeepBlue,
+ eFemonThemeMoronimo,
+ eFemonThemeEnigma,
+ eFemonThemeEgalsTry,
+ eFemonThemeDuotone,
+ eFemonThemeSilverGreen,
+ eFemonThemePearlHD,
+ eFemonThemeMaxNumber
+};
+
+struct cFemonTheme
+{
+ int bpp;
+ 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];
+
+#endif // __FEMON_CONFIG_H
diff --git a/femon.c b/femon.c
index f173af9..91b4846 100644
--- a/femon.c
+++ b/femon.c
@@ -1,18 +1,21 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * femon.c: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
+#include <getopt.h>
#include <vdr/menu.h>
#include <vdr/remote.h>
#include <vdr/player.h>
-#include "femoncfg.h"
-#include "femonreceiver.h"
-#include "femonosd.h"
+
+#include "config.h"
#include "femonservice.h"
-#include "femontools.h"
+#include "log.h"
+#include "osd.h"
+#include "tools.h"
+#include "setup.h"
#if defined(APIVERSNUM) && APIVERSNUM < 20200
#error "VDR-2.2.0 API version or greater is required!"
@@ -22,7 +25,7 @@
#define GITVERSION ""
#endif
-static const char VERSION[] = "2.2.0" GITVERSION;
+static const char VERSION[] = "2.2.1" GITVERSION;
static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)");
static const char MAINMENUENTRY[] = trNOOP("Signal Information");
@@ -40,13 +43,13 @@ public:
virtual void Housekeeping(void);
virtual void MainThreadHook(void) {}
virtual cString Active(void) { return NULL; }
- virtual const char *MainMenuEntry(void) { return (femonConfig.hidemenu ? NULL : tr(MAINMENUENTRY)); }
+ virtual const char *MainMenuEntry(void) { return (FemonConfig.GetHideMenu() ? NULL : tr(MAINMENUENTRY)); }
virtual cOsdObject *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void);
- virtual bool SetupParse(const char *Name, const char *Value);
- virtual bool Service(const char *Id, void *Data);
+ virtual bool SetupParse(const char *nameP, const char *valueP);
+ virtual bool Service(const char *idP, void *dataP);
virtual const char **SVDRPHelpPages(void);
- virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
+ virtual cString SVDRPCommand(const char *commandP, const char *optionP, int &replyCodeP);
};
cPluginFemon::cPluginFemon()
@@ -54,24 +57,40 @@ cPluginFemon::cPluginFemon()
// Initialize any member variables here.
// DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
// VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s", __PRETTY_FUNCTION__);
}
cPluginFemon::~cPluginFemon()
{
// Clean up after yourself!
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s", __PRETTY_FUNCTION__);
}
const char *cPluginFemon::CommandLineHelp(void)
{
// Return a string that describes all known command line options.
- return NULL;
+ return " -t <mode>, --trace=<mode> set the tracing mode\n";
}
bool cPluginFemon::ProcessArgs(int argc, char *argv[])
{
// Implement command line argument processing here if applicable.
+ static const struct option long_options[] = {
+ { "trace", required_argument, NULL, 't' },
+ { NULL, no_argument, NULL, 0 }
+ };
+
+ cString server;
+ int c;
+ while ((c = getopt_long(argc, argv, "t:", long_options, NULL)) != -1) {
+ switch (c) {
+ case 't':
+ FemonConfig.SetTraceMode(strtol(optarg, NULL, 0));
+ break;
+ default:
+ return false;
+ }
+ }
return true;
}
@@ -100,7 +119,7 @@ void cPluginFemon::Housekeeping(void)
cOsdObject *cPluginFemon::MainMenuAction(void)
{
// Perform the action when selected from the main VDR menu.
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s", __PRETTY_FUNCTION__);
if (cControl::Control() || (Channels.Count() <= 0))
Skins.Message(mtInfo, tr("Femon not available"));
else
@@ -108,35 +127,54 @@ cOsdObject *cPluginFemon::MainMenuAction(void)
return NULL;
}
-bool cPluginFemon::SetupParse(const char *Name, const char *Value)
+cMenuSetupPage *cPluginFemon::SetupMenu(void)
+{
+ // Return a setup menu in case the plugin supports one.
+ return new cMenuFemonSetup;
+}
+
+bool cPluginFemon::SetupParse(const char *nameP, const char *valueP)
{
// Parse your own setup parameters and store their values.
- if (!strcasecmp(Name, "HideMenu")) femonConfig.hidemenu = atoi(Value);
- else if (!strcasecmp(Name, "DisplayMode")) femonConfig.displaymode = atoi(Value);
- else if (!strcasecmp(Name, "Position")) femonConfig.position = atoi(Value);
- else if (!strcasecmp(Name, "Skin")) femonConfig.skin = atoi(Value);
- else if (!strcasecmp(Name, "Theme")) femonConfig.theme = atoi(Value);
- else if (!strcasecmp(Name, "Downscale")) femonConfig.downscale = atoi(Value);
- else if (!strcasecmp(Name, "RedLimit")) femonConfig.redlimit = atoi(Value);
- else if (!strcasecmp(Name, "GreenLimit")) femonConfig.greenlimit = atoi(Value);
- else if (!strcasecmp(Name, "UpdateInterval")) femonConfig.updateinterval = atoi(Value);
- else if (!strcasecmp(Name, "AnalStream")) femonConfig.analyzestream = atoi(Value);
- else if (!strcasecmp(Name, "CalcInterval")) femonConfig.calcinterval = atoi(Value);
- else if (!strcasecmp(Name, "UseSvdrp")) femonConfig.usesvdrp = atoi(Value);
- else if (!strcasecmp(Name, "ServerPort")) femonConfig.svdrpport = atoi(Value);
- else if (!strcasecmp(Name, "ServerIp")) strn0cpy(femonConfig.svdrpip, Value, sizeof(femonConfig.svdrpip));
+ if (!strcasecmp(nameP, "HideMenu"))
+ FemonConfig.SetHideMenu(atoi(valueP));
+ else if (!strcasecmp(nameP, "DisplayMode"))
+ FemonConfig.SetDisplayMode(atoi(valueP));
+ else if (!strcasecmp(nameP, "Position"))
+ FemonConfig.SetPosition(atoi(valueP));
+ else if (!strcasecmp(nameP, "Skin"))
+ FemonConfig.SetSkin(atoi(valueP));
+ else if (!strcasecmp(nameP, "Theme"))
+ FemonConfig.SetTheme(atoi(valueP));
+ else if (!strcasecmp(nameP, "Downscale"))
+ FemonConfig.SetDownscale(atoi(valueP));
+ else if (!strcasecmp(nameP, "RedLimit"))
+ FemonConfig.SetRedLimit(atoi(valueP));
+ else if (!strcasecmp(nameP, "GreenLimit"))
+ FemonConfig.SetGreenLimit(atoi(valueP));
+ else if (!strcasecmp(nameP, "UpdateInterval"))
+ FemonConfig.SetUpdateInterval(atoi(valueP));
+ else if (!strcasecmp(nameP, "AnalStream"))
+ FemonConfig.SetAnalyzeStream(atoi(valueP));
+ else if (!strcasecmp(nameP, "CalcInterval"))
+ FemonConfig.SetCalcInterval(atoi(valueP));
+ else if (!strcasecmp(nameP, "UseSvdrp"))
+ FemonConfig.SetUseSvdrp(atoi(valueP));
+ else if (!strcasecmp(nameP, "ServerPort"))
+ FemonConfig.SetSvdrpPort(atoi(valueP));
+ else if (!strcasecmp(nameP, "ServerIp"))
+ FemonConfig.SetSvdrpIp(valueP);
else
return false;
- if (femonConfig.displaymode < 0 || femonConfig.displaymode >= eFemonModeMaxNumber) femonConfig.displaymode = 0;
return true;
}
-bool cPluginFemon::Service(const char *Id, void *Data)
+bool cPluginFemon::Service(const char *idP, void *dataP)
{
- if (strcmp(Id,"FemonService-v1.0") == 0) {
- if (Data) {
- FemonService_v1_0 *data = reinterpret_cast<FemonService_v1_0*>(Data);
+ if (strcmp(idP, "FemonService-v1.0") == 0) {
+ if (dataP) {
+ FemonService_v1_0 *data = reinterpret_cast<FemonService_v1_0*>(dataP);
if (!cDevice::ActualDevice())
return false;
cDvbDevice *dev = getDvbDevice(cDevice::ActualDevice());
@@ -191,87 +229,94 @@ const char **cPluginFemon::SVDRPHelpPages(void)
" Print the current audio bitrate [kbit/s].",
"DDBR\n"
" Print the current dolby bitrate [kbit/s].",
+ "TRAC [ <mode> ]\n"
+ " Gets and/or sets used tracing mode.\n",
NULL
};
return HelpPages;
}
-cString cPluginFemon::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode)
+cString cPluginFemon::SVDRPCommand(const char *commandP, const char *optionP, int &replyCodeP)
{
cDvbDevice *dev = getDvbDevice(cDevice::ActualDevice());
- if (*Option && isnumber(Option)) {
- cDvbDevice *dev2 = dynamic_cast<cDvbDevice*>(cDevice::GetDevice(int(strtol(Option, NULL, 10))));
+ if (strcasecmp(commandP, "TRAC") == 0) {
+ if (optionP && *optionP)
+ FemonConfig.SetTraceMode(strtol(optionP, NULL, 0));
+ return cString::sprintf("Tracing mode: 0x%04X\n", FemonConfig.GetTraceMode());
+ }
+ if (*optionP && isnumber(optionP)) {
+ cDvbDevice *dev2 = dynamic_cast<cDvbDevice*>(cDevice::GetDevice(int(strtol(optionP, NULL, 10))));
if (dev2)
dev = dev2;
}
if (cReplayControl::NowReplaying() || !dev) {
- ReplyCode = 550; // Requested action not taken
+ replyCodeP = 550; // Requested action not taken
return cString("Cannot open femon plugin while replaying");
}
- if (strcasecmp(Command, "OPEN") == 0) {
+ if (strcasecmp(commandP, "OPEN") == 0) {
if (!cFemonOsd::Instance())
cRemote::CallPlugin(Name());
return cString("Opening femon plugin");
}
- else if (strcasecmp(Command, "QUIT") == 0) {
+ else if (strcasecmp(commandP, "QUIT") == 0) {
if (cFemonOsd::Instance())
cRemote::Put(kBack);
return cString("Closing femon plugin");
}
- else if (strcasecmp(Command, "NEXT") == 0) {
+ else if (strcasecmp(commandP, "NEXT") == 0) {
if (cFemonOsd::Instance())
return cString::sprintf("Switching to next device: %s", cFemonOsd::Instance()->DeviceSwitch(1) ? "ok" : "failed");
else
return cString("Cannot switch device");
}
- else if (strcasecmp(Command, "PREV") == 0) {
+ else if (strcasecmp(commandP, "PREV") == 0) {
if (cFemonOsd::Instance())
return cString::sprintf("Switching to previous device: %s", cFemonOsd::Instance()->DeviceSwitch(-1) ? "ok" : "failed");
else
return cString("Cannot switch device");
}
- else if (strcasecmp(Command, "INFO") == 0) {
+ else if (strcasecmp(commandP, "INFO") == 0) {
return getFrontendInfo(dev);
}
- else if (strcasecmp(Command, "NAME") == 0) {
+ else if (strcasecmp(commandP, "NAME") == 0) {
return getFrontendName(dev);
}
- else if (strcasecmp(Command, "STAT") == 0) {
+ else if (strcasecmp(commandP, "STAT") == 0) {
return getFrontendStatus(dev);
}
- else if (strcasecmp(Command, "STRG") == 0) {
+ else if (strcasecmp(commandP, "STRG") == 0) {
return cString::sprintf("%d on device #%d", dev->SignalStrength(), dev->CardIndex());
}
- else if (strcasecmp(Command, "QUAL") == 0) {
+ else if (strcasecmp(commandP, "QUAL") == 0) {
return cString::sprintf("%d on device #%d", dev->SignalQuality(), dev->CardIndex());
}
- else if (strcasecmp(Command, "SGNL") == 0) {
+ else if (strcasecmp(commandP, "SGNL") == 0) {
int value = getSignal(dev);
return cString::sprintf("%04X (%02d%%) on device #%d", value, value / 655, dev->CardIndex());
}
- else if (strcasecmp(Command, "SNRA") == 0) {
+ else if (strcasecmp(commandP, "SNRA") == 0) {
int value = getSNR(dev);
return cString::sprintf("%04X (%02d%%) on device #%d", value, value / 655, dev->CardIndex());
}
- else if (strcasecmp(Command, "BERA") == 0) {
+ else if (strcasecmp(commandP, "BERA") == 0) {
return cString::sprintf("%08X on device #%d", getBER(dev), dev->CardIndex());
}
- else if (strcasecmp(Command, "UNCB") == 0) {
+ else if (strcasecmp(commandP, "UNCB") == 0) {
return cString::sprintf("%08X on device #%d", getUNC(dev), dev->CardIndex());
}
- else if (strcasecmp(Command, "VIBR") == 0) {
+ else if (strcasecmp(commandP, "VIBR") == 0) {
if (cFemonOsd::Instance())
return cString::sprintf("%s on device #%d", *getBitrateMbits(cFemonOsd::Instance()->GetVideoBitrate()), cDevice::ActualDevice()->CardIndex());
else
return cString::sprintf("--- Mbit/s on device #%d", cDevice::ActualDevice()->CardIndex());
}
- else if (strcasecmp(Command, "AUBR") == 0) {
+ else if (strcasecmp(commandP, "AUBR") == 0) {
if (cFemonOsd::Instance())
return cString::sprintf("%s on device #%d", *getBitrateKbits(cFemonOsd::Instance()->GetAudioBitrate()), cDevice::ActualDevice()->CardIndex());
else
return cString::sprintf("--- kbit/s on device #%d", cDevice::ActualDevice()->CardIndex());
}
- else if (strcasecmp(Command, "DDBR") == 0) {
+ else if (strcasecmp(commandP, "DDBR") == 0) {
if (cFemonOsd::Instance())
return cString::sprintf("%s on device #%d", *getBitrateKbits(cFemonOsd::Instance()->GetDolbyBitrate()), cDevice::ActualDevice()->CardIndex());
else
@@ -280,145 +325,4 @@ cString cPluginFemon::SVDRPCommand(const char *Command, const char *Option, int
return NULL;
}
-class cMenuFemonSetup : public cMenuSetupPage {
-private:
- const char *dispmodes[eFemonModeMaxNumber];
- const char *skins[eFemonSkinMaxNumber];
- const char *themes[eFemonThemeMaxNumber];
- cFemonConfig data;
- cVector<const char*> help;
- void Setup(void);
-protected:
- virtual eOSState ProcessKey(eKeys Key);
- virtual void Store(void);
-public:
- cMenuFemonSetup(void);
- };
-
-cMenuFemonSetup::cMenuFemonSetup(void)
-{
- debug("%s()\n", __PRETTY_FUNCTION__);
- dispmodes[eFemonModeBasic] = tr("basic");
- dispmodes[eFemonModeTransponder] = tr("transponder");
- dispmodes[eFemonModeStream] = tr("stream");
- dispmodes[eFemonModeAC3] = tr("AC-3");
-
- skins[eFemonSkinClassic] = tr("Classic");
- skins[eFemonSkinElchi] = tr("Elchi");
-
- themes[eFemonThemeClassic] = tr("Classic");
- themes[eFemonThemeElchi] = tr("Elchi");
- themes[eFemonThemeSTTNG] = tr("ST:TNG");
- themes[eFemonThemeDeepBlue] = tr("DeepBlue");
- themes[eFemonThemeMoronimo] = tr("Moronimo");
- themes[eFemonThemeEnigma] = tr("Enigma");
- themes[eFemonThemeEgalsTry] = tr("EgalsTry");
- themes[eFemonThemeDuotone] = tr("Duotone");
- themes[eFemonThemeSilverGreen] = tr("SilverGreen");
- themes[eFemonThemePearlHD] = tr("PearlHD");
-
- data = femonConfig;
- SetMenuCategory(mcSetupPlugins);
- Setup();
-}
-
-void cMenuFemonSetup::Setup(void)
-{
- int current = Current();
-
- Clear();
- help.Clear();
-
- Add(new cMenuEditBoolItem(tr("Hide main menu entry"), &data.hidemenu));
- help.Append(tr("Define whether the main menu entry is hidden."));
-
- Add(new cMenuEditStraItem(tr("Default display mode"), &data.displaymode, eFemonModeMaxNumber, dispmodes));
- help.Append(tr("Define the default display mode at startup."));
-
- Add(new cMenuEditStraItem(trVDR("Setup.OSD$Skin"), &data.skin, eFemonSkinMaxNumber, skins));
- help.Append(tr("Define the used OSD skin."));
-
- Add(new cMenuEditStraItem(trVDR("Setup.OSD$Theme"), &data.theme, eFemonThemeMaxNumber,themes));
- help.Append(tr("Define the used OSD theme."));
-
- Add(new cMenuEditBoolItem(tr("Position"), &data.position, trVDR("bottom"), trVDR("top")));
- help.Append(tr("Define the position of OSD."));
-
- Add(new cMenuEditIntItem(tr("Downscale OSD size [%]"), &data.downscale, 0, 20));
- help.Append(tr("Define the downscale ratio for OSD size."));
-
- Add(new cMenuEditIntItem(tr("Red limit [%]"), &data.redlimit, 1, 50));
- help.Append(tr("Define a limit for red bar, which is used to indicate a bad signal."));
-
- Add(new cMenuEditIntItem(tr("Green limit [%]"), &data.greenlimit, 51, 100));
- help.Append(tr("Define a limit for green bar, which is used to indicate a good signal."));
-
- Add(new cMenuEditIntItem(tr("OSD update interval [0.1s]"), &data.updateinterval, 1, 100));
- help.Append(tr("Define an interval for OSD updates. The smaller interval generates higher CPU load."));
-
- Add(new cMenuEditBoolItem(tr("Analyze stream"), &data.analyzestream));
- help.Append(tr("Define whether the DVB stream is analyzed and bitrates calculated."));
-
- if (femonConfig.analyzestream) {
- Add(new cMenuEditIntItem(tr("Calculation interval [0.1s]"), &data.calcinterval, 1, 100));
- help.Append(tr("Define an interval for calculation. The bigger interval generates more stable values."));
- }
-
- Add(new cMenuEditBoolItem(tr("Use SVDRP service"), &data.usesvdrp));
- help.Append(tr("Define whether the SVDRP service is used in client/server setups."));
-
- if (data.usesvdrp) {
- Add(new cMenuEditIntItem(tr("SVDRP service port"), &data.svdrpport, 1, 65535));
- help.Append(tr("Define the port number of SVDRP service."));
-
- Add(new cMenuEditStrItem(tr("SVDRP service IP"), data.svdrpip, sizeof(data.svdrpip), ".1234567890"));
- help.Append(tr("Define the IP address of SVDRP service."));
- }
-
- SetCurrent(Get(current));
- Display();
-}
-
-void cMenuFemonSetup::Store(void)
-{
- debug("%s()\n", __PRETTY_FUNCTION__);
- femonConfig = data;
- SetupStore("HideMenu", femonConfig.hidemenu);
- SetupStore("DisplayMode", femonConfig.displaymode);
- SetupStore("Skin", femonConfig.skin);
- SetupStore("Theme", femonConfig.theme);
- SetupStore("Position", femonConfig.position);
- SetupStore("Downscale", femonConfig.downscale);
- SetupStore("RedLimit", femonConfig.redlimit);
- SetupStore("GreenLimit", femonConfig.greenlimit);
- SetupStore("UpdateInterval", femonConfig.updateinterval);
- SetupStore("AnalStream", femonConfig.analyzestream);
- SetupStore("CalcInterval", femonConfig.calcinterval);
- SetupStore("UseSvdrp", femonConfig.usesvdrp);
- SetupStore("ServerPort", femonConfig.svdrpport);
- SetupStore("ServerIp", femonConfig.svdrpip);
-}
-
-eOSState cMenuFemonSetup::ProcessKey(eKeys Key)
-{
- int oldUsesvdrp = data.usesvdrp;
- int oldAnalyzestream = data.analyzestream;
-
- eOSState state = cMenuSetupPage::ProcessKey(Key);
-
- if (Key != kNone && (data.analyzestream != oldAnalyzestream || data.usesvdrp != oldUsesvdrp))
- Setup();
-
- if ((Key == kInfo) && (state == osUnknown) && (Current() < help.Size()))
- return AddSubMenu(new cMenuText(cString::sprintf("%s - %s '%s'", tr("Help"), trVDR("Plugin"), PLUGIN_NAME_I18N), help[Current()]));
-
- return state;
-}
-
-cMenuSetupPage *cPluginFemon::SetupMenu(void)
-{
- // Return a setup menu in case the plugin supports one.
- return new cMenuFemonSetup;
-}
-
VDRPLUGINCREATOR(cPluginFemon); // Don't touch this!
diff --git a/femonaac.h b/femonaac.h
deleted file mode 100644
index f517f1d..0000000
--- a/femonaac.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
- *
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#ifndef __FEMONAAC_H
-#define __FEMONAAC_H
-
-#include "femonaudio.h"
-
-class cFemonAAC {
-private:
- cFemonAudioIf *m_AudioHandler;
-
- static int s_Samplerates[16];
-
-public:
- cFemonAAC(cFemonAudioIf *audiohandler);
- virtual ~cFemonAAC();
-
- bool processAudio(const uint8_t *buf, int len);
- };
-
-#endif //__FEMONAAC_H
diff --git a/femonac3.h b/femonac3.h
deleted file mode 100644
index 22f2fbc..0000000
--- a/femonac3.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
- *
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#ifndef __FEMONAC3_H
-#define __FEMONAC3_H
-
-#include "femonaudio.h"
-
-class cFemonAC3 {
-private:
- cFemonAC3If *m_AudioHandler;
-
- static int s_Bitrates[32];
- static int s_Frequencies[4];
- static int s_Frames[3][32];
-
-public:
- cFemonAC3(cFemonAC3If *audiohandler);
- virtual ~cFemonAC3();
-
- bool processAudio(const uint8_t *buf, int len);
- };
-
-#endif //__FEMONAC3_H
diff --git a/femoncfg.h b/femoncfg.h
deleted file mode 100644
index cded40a..0000000
--- a/femoncfg.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
- *
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#ifndef __FEMONCFG_H
-#define __FEMONCFG_H
-
-#define MaxSvdrpIp 15 // xxx.xxx.xxx.xxx
-
-enum eFemonModes
-{
- eFemonModeBasic,
- eFemonModeTransponder,
- eFemonModeStream,
- eFemonModeAC3,
- eFemonModeMaxNumber
-};
-
-struct cFemonConfig
-{
-public:
- cFemonConfig(void);
- int hidemenu;
- int displaymode;
- int skin;
- int theme;
- int position;
- int downscale;
- int redlimit;
- int greenlimit;
- int updateinterval;
- int analyzestream;
- int calcinterval;
- int usesvdrp;
- int svdrpport;
- char svdrpip[MaxSvdrpIp + 1]; // must end with additional null
-};
-
-extern cFemonConfig femonConfig;
-
-enum eFemonSkins
-{
- eFemonSkinClassic,
- eFemonSkinElchi,
- eFemonSkinMaxNumber
-};
-
-enum eFemonThemes
-{
- eFemonThemeClassic,
- eFemonThemeElchi,
- eFemonThemeSTTNG,
- eFemonThemeDeepBlue,
- eFemonThemeMoronimo,
- eFemonThemeEnigma,
- eFemonThemeEgalsTry,
- eFemonThemeDuotone,
- eFemonThemeSilverGreen,
- eFemonThemePearlHD,
- eFemonThemeMaxNumber
-};
-
-struct cFemonTheme
-{
- int bpp;
- 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];
-
-#endif // __FEMONCFG_H
diff --git a/femonclient/vdr-femonclient-0.0.6.tgz b/femonclient/vdr-femonclient-0.0.6.tgz
deleted file mode 100644
index 9181fe0..0000000
Binary files a/femonclient/vdr-femonclient-0.0.6.tgz and /dev/null differ
diff --git a/femonh264.h b/femonh264.h
deleted file mode 100644
index cd7351e..0000000
--- a/femonh264.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
- *
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#ifndef __FEMONH264_H
-#define __FEMONH264_H
-
-#include "femonvideo.h"
-
-class cFemonH264 {
-private:
- enum {
- NAL_SEI = 0x06, // Supplemental Enhancement Information
- NAL_SPS = 0x07, // Sequence Parameter Set
- NAL_AUD = 0x09, // Access Unit Delimiter
- NAL_END_SEQ = 0x0A // End of Sequence
- };
-
- typedef struct DAR {
- eVideoAspectRatio dar;
- int ratio;
- } t_DAR;
-
- typedef struct SAR {
- int w;
- int h;
- } t_SAR;
-
- cFemonVideoIf *m_VideoHandler;
- uint32_t m_Width;
- uint32_t m_Height;
- eVideoAspectRatio m_AspectRatio;
- eVideoFormat m_Format;
- double m_FrameRate;
- double m_BitRate;
- eVideoScan m_Scan;
- bool m_CpbDpbDelaysPresentFlag;
- bool m_PicStructPresentFlag;
- bool m_FrameMbsOnlyFlag;
- bool m_MbAdaptiveFrameFieldFlag;
- uint32_t m_TimeOffsetLength;
-
- void reset();
- const uint8_t *nextStartCode(const uint8_t *start, const uint8_t *end);
- int nalUnescape(uint8_t *dst, const uint8_t *src, int len);
- int parseSPS(const uint8_t *buf, int len);
- int parseSEI(const uint8_t *buf, int len);
-
- static const t_SAR s_SAR[];
- static const t_DAR s_DAR[];
- static const eVideoFormat s_VideoFormats[];
- static const uint8_t s_SeiNumClockTsTable[9];
-
-public:
- cFemonH264(cFemonVideoIf *videohandler);
- virtual ~cFemonH264();
-
- bool processVideo(const uint8_t *buf, int len);
- };
-
-#endif //__FEMONH264_H
diff --git a/femonlatm.h b/femonlatm.h
deleted file mode 100644
index 731f69c..0000000
--- a/femonlatm.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
- *
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#ifndef __FEMONLATM_H
-#define __FEMONLATM_H
-
-#include "femonaudio.h"
-
-class cFemonLATM {
-private:
- cFemonAudioIf *m_AudioHandler;
-
- static int s_Bitrates[3][16];
- static int s_Samplerates[4];
-
-public:
- cFemonLATM(cFemonAudioIf *audiohandler);
- virtual ~cFemonLATM();
-
- bool processAudio(const uint8_t *buf, int len);
- };
-
-#endif //__FEMONLATM_H
diff --git a/femonmpeg.h b/femonmpeg.h
deleted file mode 100644
index b602d3b..0000000
--- a/femonmpeg.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
- *
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#ifndef __FEMONMPEG_H
-#define __FEMONMPEG_H
-
-#include "femonvideo.h"
-#include "femonaudio.h"
-
-class cFemonMPEG {
-private:
- cFemonVideoIf *m_VideoHandler;
- cFemonAudioIf *m_AudioHandler;
-
- 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);
- virtual ~cFemonMPEG();
-
- bool processVideo(const uint8_t *buf, int len);
- bool processAudio(const uint8_t *buf, int len);
- };
-
-#endif //__FEMONMPEG_H
diff --git a/femonosd.h b/femonosd.h
deleted file mode 100644
index e26e7aa..0000000
--- a/femonosd.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
- *
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#ifndef __FEMONOSD_H
-#define __FEMONOSD_H
-
-#include <linux/dvb/frontend.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <vdr/osd.h>
-#include <vdr/thread.h>
-#include <vdr/status.h>
-#include <vdr/plugin.h>
-#include <vdr/channels.h>
-#include <vdr/transfer.h>
-#include <vdr/tools.h>
-#include "svdrpservice.h"
-
-#define MAX_BM_NUMBER 8
-
-class cFemonOsd : public cOsdObject, public cThread, public cStatus {
-private:
- enum eDeviceSourceType {
- DEVICESOURCE_DVBAPI = 0,
- DEVICESOURCE_IPTV,
- DEVICESOURCE_PVRINPUT,
- DEVICESOURCE_COUNT
- };
-
- static cFemonOsd *pInstance;
-
- cOsd *m_Osd;
- cFemonReceiver *m_Receiver;
- int m_Frontend;
- int m_SvdrpFrontend;
- double m_SvdrpVideoBitrate;
- double m_SvdrpAudioBitrate;
- SvdrpConnection_v1_0 m_SvdrpConnection;
- cPlugin *m_SvdrpPlugin;
- int m_Number;
- int m_OldNumber;
- int m_Quality;
- bool m_QualityValid;
- int m_Strength;
- bool m_StrengthValid;
- uint16_t m_SNR;
- bool m_SNRValid;
- uint16_t m_Signal;
- bool m_SignalValid;
- uint32_t m_BER;
- 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;
- eDeviceSourceType m_DeviceSource;
- int m_DisplayMode;
- int m_OsdWidth;
- int m_OsdHeight;
- int m_OsdLeft;
- int m_OsdTop;
- cFont *m_Font;
- cTimeMs m_InputTime;
- cCondWait m_Sleep;
- cMutex m_Mutex;
-
- void DrawStatusWindow(void);
- void DrawInfoWindow(void);
- bool SvdrpConnect(void);
- bool SvdrpTune(void);
-
-protected:
- cFemonOsd();
- cFemonOsd(const cFemonOsd&);
- cFemonOsd& operator= (const cFemonOsd&);
- virtual void Action(void);
- virtual void ChannelSwitch(const cDevice *device, int channelNumber, bool liveView);
- virtual void SetAudioTrack(int Index, const char * const *Tracks);
-
-public:
- static cFemonOsd *Instance(bool create = false);
- ~cFemonOsd();
-
- virtual void Show(void);
- virtual eOSState ProcessKey(eKeys Key);
-
- bool DeviceSwitch(int direction);
- double GetVideoBitrate(void);
- double GetAudioBitrate(void);
- double GetDolbyBitrate(void);
-};
-
-#endif //__FEMONOSD_H
-
diff --git a/femonreceiver.c b/femonreceiver.c
deleted file mode 100644
index 98377e8..0000000
--- a/femonreceiver.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
- *
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#include <unistd.h>
-#include "femontools.h"
-#include "femoncfg.h"
-#include "femonreceiver.h"
-
-cFemonReceiver::cFemonReceiver(const cChannel *Channel, int ATrack, int DTrack)
-: cReceiver(Channel),
- cThread("femon receiver"),
- m_Mutex(),
- m_Sleep(),
- m_Active(false),
- m_DetectH264(this),
- m_DetectMPEG(this, this),
- m_DetectAAC(this),
- m_DetectLATM(this),
- m_DetectAC3(this),
- m_VideoBuffer(KILOBYTE(512), TS_SIZE, false, "Femon video"),
- m_VideoType(Channel ? Channel->Vtype(): 0),
- m_VideoPid(Channel ? Channel->Vpid() : 0),
- m_VideoPacketCount(0),
- m_VideoBitrate(0.0),
- m_VideoValid(false),
- m_AudioBuffer(KILOBYTE(256), TS_SIZE, false, "Femon audio"),
- m_AudioPid(Channel ? Channel->Apid(ATrack) : 0),
- m_AudioPacketCount(0),
- m_AudioBitrate(0.0),
- m_AudioValid(false),
- m_AC3Buffer(KILOBYTE(256), TS_SIZE, false, "Femon AC3"),
- m_AC3Pid(Channel ? Channel->Dpid(DTrack) : 0),
- m_AC3PacketCount(0),
- m_AC3Bitrate(0),
- m_AC3Valid(false)
-{
- debug("%s()\n", __PRETTY_FUNCTION__);
-
- SetPids(NULL);
- AddPid(m_VideoPid);
- AddPid(m_AudioPid);
- AddPid(m_AC3Pid);
-
- m_VideoBuffer.SetTimeouts(0, 100);
- m_AudioBuffer.SetTimeouts(0, 100);
- m_AC3Buffer.SetTimeouts(0, 100);
-
- m_VideoInfo.codec = VIDEO_CODEC_INVALID;
- m_VideoInfo.format = VIDEO_FORMAT_INVALID;
- m_VideoInfo.scan = VIDEO_SCAN_INVALID;
- m_VideoInfo.aspectRatio = VIDEO_ASPECT_RATIO_INVALID;
- m_VideoInfo.width = 0;
- m_VideoInfo.height = 0;
- m_VideoInfo.frameRate = 0;
- m_VideoInfo.bitrate = AUDIO_BITRATE_INVALID;
- m_AudioInfo.codec = AUDIO_CODEC_UNKNOWN;
- m_AudioInfo.bitrate = AUDIO_BITRATE_INVALID;
- m_AudioInfo.samplingFrequency = AUDIO_SAMPLING_FREQUENCY_INVALID;
- m_AudioInfo.channelMode = AUDIO_CHANNEL_MODE_INVALID;
- m_AC3Info.bitrate = AUDIO_BITRATE_INVALID;
- m_AC3Info.samplingFrequency = AUDIO_SAMPLING_FREQUENCY_INVALID;
- m_AC3Info.bitstreamMode = AUDIO_BITSTREAM_MODE_INVALID;
- m_AC3Info.audioCodingMode = AUDIO_CODING_MODE_INVALID;
- m_AC3Info.dolbySurroundMode = AUDIO_DOLBY_SURROUND_MODE_INVALID;
- m_AC3Info.centerMixLevel = AUDIO_CENTER_MIX_LEVEL_INVALID;
- m_AC3Info.surroundMixLevel = AUDIO_SURROUND_MIX_LEVEL_INVALID;
- m_AC3Info.dialogLevel = 0;
- m_AC3Info.lfe = false;
-}
-
-cFemonReceiver::~cFemonReceiver(void)
-{
- debug("%s()\n", __PRETTY_FUNCTION__);
- Deactivate();
-}
-
-void cFemonReceiver::Deactivate(void)
-{
- debug("%s()\n", __PRETTY_FUNCTION__);
- Detach();
- if (m_Active) {
- m_Active = false;
- m_Sleep.Signal();
- if (Running())
- Cancel(3);
- }
-}
-
-void cFemonReceiver::Activate(bool On)
-{
- debug("%s(%d)\n", __PRETTY_FUNCTION__, On);
- if (On)
- Start();
- else
- Deactivate();
-}
-
-void cFemonReceiver::Receive(uchar *Data, int Length)
-{
- // TS packet length: TS_SIZE
- if (Running() && (*Data == TS_SYNC_BYTE) && (Length == TS_SIZE)) {
- int len, pid = TsPid(Data);
- if (pid == m_VideoPid) {
- ++m_VideoPacketCount;
- len = m_VideoBuffer.Put(Data, Length);
- if (len != Length) {
- m_VideoBuffer.ReportOverflow(Length - len);
- m_VideoBuffer.Clear();
- }
- }
- else if (pid == m_AudioPid) {
- ++m_AudioPacketCount;
- len = m_AudioBuffer.Put(Data, Length);
- if (len != Length) {
- m_AudioBuffer.ReportOverflow(Length - len);
- m_AudioBuffer.Clear();
- }
- }
- else if (pid == m_AC3Pid) {
- ++m_AC3PacketCount;
- len = m_AC3Buffer.Put(Data, Length);
- if (len != Length) {
- m_AC3Buffer.ReportOverflow(Length - len);
- m_AC3Buffer.Clear();
- }
- }
- }
-}
-
-void cFemonReceiver::Action(void)
-{
- debug("%s()\n", __PRETTY_FUNCTION__);
- cTimeMs calcPeriod(0);
- m_Active = true;
-
- while (Running() && m_Active) {
- uint8_t *Data;
- double timeout;
- int len, Length;
- bool processed = false;
-
- // process available video data
- while ((Data = m_VideoBuffer.Get(Length))) {
- if (!m_Active || (Length < TS_SIZE))
- break;
- Length = TS_SIZE;
- if (*Data != TS_SYNC_BYTE) {
- for (int i = 1; i < Length; ++i) {
- if (Data[i] == TS_SYNC_BYTE) {
- Length = i;
- break;
- }
- }
- m_VideoBuffer.Del(Length);
- continue;
- }
- processed = true;
- if (TsPayloadStart(Data)) {
- while (const uint8_t *p = m_VideoAssembler.GetPes(len)) {
- if (m_VideoType == 0x1B) { // MPEG4
- if (m_DetectH264.processVideo(p, len)) {
- m_VideoValid = true;
- break;
- }
- }
- else {
- if (m_DetectMPEG.processVideo(p, len)) {
- m_VideoValid = true;
- break;
- }
- }
- }
- m_VideoAssembler.Reset();
- }
- m_VideoAssembler.PutTs(Data, Length);
- m_VideoBuffer.Del(Length);
- }
-
- // process available audio data
- while ((Data = m_AudioBuffer.Get(Length))) {
- if (!m_Active || (Length < TS_SIZE))
- break;
- Length = TS_SIZE;
- if (*Data != TS_SYNC_BYTE) {
- for (int i = 1; i < Length; ++i) {
- if (Data[i] == TS_SYNC_BYTE) {
- Length = i;
- break;
- }
- }
- m_AudioBuffer.Del(Length);
- continue;
- }
- processed = true;
- if (const uint8_t *p = m_AudioAssembler.GetPes(len)) {
- if (m_DetectAAC.processAudio(p, len) || m_DetectLATM.processAudio(p, len) || m_DetectMPEG.processAudio(p, len))
- m_AudioValid = true;
- m_AudioAssembler.Reset();
- }
- m_AudioAssembler.PutTs(Data, Length);
- m_AudioBuffer.Del(Length);
- }
-
- // process available dolby data
- while ((Data = m_AC3Buffer.Get(Length))) {
- if (!m_Active || (Length < TS_SIZE))
- break;
- Length = TS_SIZE;
- if (*Data != TS_SYNC_BYTE) {
- for (int i = 1; i < Length; ++i) {
- if (Data[i] == TS_SYNC_BYTE) {
- Length = i;
- break;
- }
- }
- m_AC3Buffer.Del(Length);
- continue;
- }
- processed = true;
- if (const uint8_t *p = m_AC3Assembler.GetPes(len)) {
- if (m_DetectAC3.processAudio(p, len))
- m_AC3Valid = true;
- m_AC3Assembler.Reset();
- }
- m_AC3Assembler.PutTs(Data, Length);
- m_AC3Buffer.Del(Length);
- }
-
- // calculate bitrates
- timeout = double(calcPeriod.Elapsed());
- if (m_Active && (timeout >= (100.0 * femonConfig.calcinterval))) {
- // TS packet 188 bytes - 4 byte header; MPEG standard defines 1Mbit = 1000000bit
- // PES headers should be compensated!
- m_VideoBitrate = (1000.0 * 8.0 * 184.0 * m_VideoPacketCount) / timeout;
- m_VideoPacketCount = 0;
- m_AudioBitrate = (1000.0 * 8.0 * 184.0 * m_AudioPacketCount) / timeout;
- m_AudioPacketCount = 0;
- m_AC3Bitrate = (1000.0 * 8.0 * 184.0 * m_AC3PacketCount) / timeout;
- m_AC3PacketCount = 0;
- calcPeriod.Set(0);
- }
-
- if (!processed)
- m_Sleep.Wait(10); // to avoid busy loop and reduce cpu load
- }
-}
diff --git a/femonreceiver.h b/femonreceiver.h
deleted file mode 100644
index 12d9c0b..0000000
--- a/femonreceiver.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
- *
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#ifndef __FEMONRECEIVER_H
-#define __FEMONRECEIVER_H
-
-#include <vdr/thread.h>
-#include <vdr/receiver.h>
-
-#include "femonh264.h"
-#include "femonmpeg.h"
-#include "femonaac.h"
-#include "femonlatm.h"
-#include "femonac3.h"
-#include "femonaudio.h"
-#include "femonvideo.h"
-#include "femontools.h"
-
-class cFemonReceiver : public cReceiver, public cThread, public cFemonVideoIf, public cFemonAudioIf, public cFemonAC3If {
-private:
- cMutex m_Mutex;
- cCondWait m_Sleep;
- bool m_Active;
-
- cFemonH264 m_DetectH264;
- cFemonMPEG m_DetectMPEG;
- cFemonAAC m_DetectAAC;
- cFemonLATM m_DetectLATM;
- cFemonAC3 m_DetectAC3;
-
- cRingBufferLinear m_VideoBuffer;
- cTsToPes m_VideoAssembler;
- int m_VideoType;
- int m_VideoPid;
- int m_VideoPacketCount;
- double m_VideoBitrate;
- bool m_VideoValid;
- video_info_t m_VideoInfo;
-
- cRingBufferLinear m_AudioBuffer;
- cTsToPes m_AudioAssembler;
- int m_AudioPid;
- int m_AudioPacketCount;
- double m_AudioBitrate;
- bool m_AudioValid;
- audio_info_t m_AudioInfo;
-
- cRingBufferLinear m_AC3Buffer;
- cTsToPes m_AC3Assembler;
- int m_AC3Pid;
- int m_AC3PacketCount;
- double m_AC3Bitrate;
- bool m_AC3Valid;
- ac3_info_t m_AC3Info;
-
-protected:
- virtual void Activate(bool On);
- virtual void Receive(uchar *Data, int Length);
- virtual void Action(void);
-
-public:
- virtual void SetVideoCodec(eVideoCodec codec) { cMutexLock MutexLock(&m_Mutex);
- m_VideoInfo.codec = codec; }
- virtual void SetVideoFormat(eVideoFormat format) { cMutexLock MutexLock(&m_Mutex);
- m_VideoInfo.format = format; }
- virtual void SetVideoScan(eVideoScan scan) { cMutexLock MutexLock(&m_Mutex);
- m_VideoInfo.scan = scan; }
- virtual void SetVideoAspectRatio(eVideoAspectRatio aspectratio) { cMutexLock MutexLock(&m_Mutex);
- m_VideoInfo.aspectRatio = aspectratio; }
- virtual void SetVideoSize(int width, int height) { cMutexLock MutexLock(&m_Mutex);
- m_VideoInfo.width = width;
- m_VideoInfo.height = height; }
- virtual void SetVideoFramerate(double framerate) { cMutexLock MutexLock(&m_Mutex);
- m_VideoInfo.frameRate = framerate; }
- virtual void SetVideoBitrate(double bitrate) { cMutexLock MutexLock(&m_Mutex);
- m_VideoInfo.bitrate = bitrate; }
-
- virtual void SetAudioCodec(eAudioCodec codec) { cMutexLock MutexLock(&m_Mutex);
- m_AudioInfo.codec = codec; }
- virtual void SetAudioBitrate(double bitrate) { cMutexLock MutexLock(&m_Mutex);
- m_AudioInfo.bitrate = bitrate; }
- virtual void SetAudioSamplingFrequency(int sampling) { cMutexLock MutexLock(&m_Mutex);
- m_AudioInfo.samplingFrequency = sampling; }
- virtual void SetAudioChannel(eAudioChannelMode mode) { cMutexLock MutexLock(&m_Mutex);
- m_AudioInfo.channelMode = mode; }
-
- virtual void SetAC3Bitrate(int bitrate) { cMutexLock MutexLock(&m_Mutex);
- m_AC3Info.bitrate = bitrate; }
- virtual void SetAC3SamplingFrequency(int sampling) { cMutexLock MutexLock(&m_Mutex);
- m_AC3Info.samplingFrequency = sampling; }
- virtual void SetAC3Bitstream(int mode) { cMutexLock MutexLock(&m_Mutex);
- m_AC3Info.bitstreamMode = mode; }
- virtual void SetAC3AudioCoding(int mode) { cMutexLock MutexLock(&m_Mutex);
- m_AC3Info.audioCodingMode = mode; }
- virtual void SetAC3DolbySurround(int mode) { cMutexLock MutexLock(&m_Mutex);
- m_AC3Info.dolbySurroundMode = mode; }
- virtual void SetAC3CenterMix(int level) { cMutexLock MutexLock(&m_Mutex);
- m_AC3Info.centerMixLevel = level; }
- virtual void SetAC3SurroundMix(int level) { cMutexLock MutexLock(&m_Mutex);
- m_AC3Info.surroundMixLevel = level; }
- virtual void SetAC3Dialog(int level) { cMutexLock MutexLock(&m_Mutex);
- m_AC3Info.dialogLevel = level; }
- virtual void SetAC3LFE(bool onoff) { cMutexLock MutexLock(&m_Mutex);
- m_AC3Info.lfe = onoff; }
-
-public:
- cFemonReceiver(const cChannel* Channel, int ATrack, int DTrack);
- virtual ~cFemonReceiver();
- void Deactivate(void);
-
- bool VideoValid(void) { cMutexLock MutexLock(&m_Mutex);
- return m_VideoValid; }; // boolean
- double VideoBitrate(void) { cMutexLock MutexLock(&m_Mutex);
- return m_VideoBitrate; }; // bit/s
- int VideoCodec(void) { cMutexLock MutexLock(&m_Mutex);
- return m_VideoInfo.codec; }; // eVideoCodec
- int VideoFormat(void) { cMutexLock MutexLock(&m_Mutex);
- return m_VideoInfo.format; }; // eVideoFormat
- int VideoScan(void) { cMutexLock MutexLock(&m_Mutex);
- return m_VideoInfo.scan; }; // eVideoScan
- int VideoAspectRatio(void) { cMutexLock MutexLock(&m_Mutex);
- return m_VideoInfo.aspectRatio; }; // eVideoAspectRatio
- int VideoHorizontalSize(void) { cMutexLock MutexLock(&m_Mutex);
- return m_VideoInfo.width; }; // pixels
- int VideoVerticalSize(void) { cMutexLock MutexLock(&m_Mutex);
- return m_VideoInfo.height; }; // pixels
- double VideoFrameRate(void) { cMutexLock MutexLock(&m_Mutex);
- return m_VideoInfo.frameRate; }; // Hz
- double VideoStreamBitrate(void) { cMutexLock MutexLock(&m_Mutex);
- return m_VideoInfo.bitrate; }; // bit/s
-
- bool AudioValid(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AudioValid; }; // boolean
- double AudioBitrate(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AudioBitrate; }; // bit/s
- int AudioCodec(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AudioInfo.codec; }; // eAudioCodec
- int AudioChannelMode(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AudioInfo.channelMode; }; // eAudioChannelMode
- double AudioStreamBitrate(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AudioInfo.bitrate; }; // bit/s or eAudioBitrate
- int AudioSamplingFreq(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AudioInfo.samplingFrequency; }; // Hz or eAudioSamplingFrequency
-
- bool AC3Valid(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Valid; }; // boolean
- double AC3Bitrate(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Bitrate; }; // bit/s
- double AC3StreamBitrate(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Info.bitrate; }; // bit/s or eAudioBitrate
- int AC3SamplingFreq(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Info.samplingFrequency; }; // Hz or eAudioSamplingFrequency
- int AC3BitStreamMode(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Info.bitstreamMode; }; // 0..7 or eAudioBitstreamMode
- int AC3AudioCodingMode(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Info.audioCodingMode; }; // 0..7 or eAudioCodingMode
- bool AC3_2_0(void) { cMutexLock MutexLock(&m_Mutex);
- return (m_AC3Info.audioCodingMode == AUDIO_CODING_MODE_2_0); }; // boolean
- bool AC3_5_1(void) { cMutexLock MutexLock(&m_Mutex);
- return (m_AC3Info.audioCodingMode == AUDIO_CODING_MODE_3_2); }; // boolean
- int AC3DolbySurroundMode(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Info.dolbySurroundMode; }; // eAudioDolbySurroundMode
- int AC3CenterMixLevel(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Info.centerMixLevel; }; // eAudioCenterMixLevel
- int AC3SurroundMixLevel(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Info.surroundMixLevel; }; // eAudioSurroundMixLevel
- int AC3DialogLevel(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Info.dialogLevel; }; // -dB
- bool AC3Lfe(void) { cMutexLock MutexLock(&m_Mutex);
- return m_AC3Info.lfe; }; // boolean
- };
-
-#endif //__FEMONRECEIVER_H
-
diff --git a/femontools.h b/femontools.h
deleted file mode 100644
index abf1a6a..0000000
--- a/femontools.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
- *
- * See the README file for copyright information and how to reach the author.
- *
- */
-
-#ifndef __FEMONTOOLS_H
-#define __FEMONTOOLS_H
-
-#include <stdint.h>
-#include <vdr/channels.h>
-#include <vdr/dvbdevice.h>
-#include <vdr/remux.h>
-#include <vdr/tools.h>
-
-#ifdef DEBUG
-#define debug(x...) dsyslog("FEMON: " x);
-#define error(x...) esyslog("ERROR: " x);
-#else
-#define debug(x...) ;
-#define error(x...) esyslog("ERROR: " x);
-#endif
-
-#define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
-
-#define FRONTEND_DEVICE "/dev/dvb/adapter%d/frontend%d"
-
-#define SATIP_DEVICE "SAT>IP"
-
-cDvbDevice *getDvbDevice(cDevice* device);
-
-cString getFrontendInfo(cDvbDevice *device);
-cString getFrontendName(cDvbDevice *device);
-cString getFrontendStatus(cDvbDevice *device);
-
-uint16_t getSNR(cDvbDevice *device);
-uint16_t getSignal(cDvbDevice *device);
-
-uint32_t getBER(cDvbDevice *device);
-uint32_t getUNC(cDvbDevice *device);
-
-cString getApids(const cChannel *channel);
-cString getDpids(const cChannel *channel);
-cString getSpids(const cChannel *channel);
-cString getCAids(const cChannel *channel);
-cString getVideoStream(int value);
-cString getVideoCodec(int value);
-cString getAudioStream(int value, const cChannel *channel);
-cString getAudioCodec(int value);
-cString getAudioChannelMode(int value);
-cString getCoderate(int value);
-cString getTransmission(int value);
-cString getBandwidth(int value);
-cString getInversion(int value);
-cString getHierarchy(int value);
-cString getGuard(int value);
-cString getModulation(int value);
-cString getTerrestrialSystem(int value);
-cString getSatelliteSystem(int value);
-cString getRollOff(int value);
-cString getPilot(int value);
-cString getResolution(int width, int height, int scan);
-cString getAspectRatio(int value);
-cString getVideoFormat(int value);
-cString getFrameRate(double value);
-cString getAC3Stream(int value, const cChannel *channel);
-cString getAC3BitStreamMode(int value, int coding);
-cString getAC3AudioCodingMode(int value, int stream);
-cString getAC3CenterMixLevel(int value);
-cString getAC3SurroundMixLevel(int value);
-cString getAC3DolbySurroundMode(int value);
-cString getAC3DialogLevel(int value);
-cString getFrequencyMHz(int value);
-cString getAudioSamplingFreq(int value);
-cString getAudioBitrate(double value, double stream);
-cString getVideoBitrate(double value, double stream);
-cString getBitrateMbits(double value);
-cString getBitrateKbits(double value);
-
-class cFemonBitStream : public cBitStream {
-public:
- cFemonBitStream(const uint8_t *Data, const int Length) : cBitStream(Data, Length) {}
- uint32_t GetUeGolomb();
- int32_t GetSeGolomb();
- void SkipGolomb();
- void SkipUeGolomb() { SkipGolomb(); }
- void SkipSeGolomb() { SkipGolomb(); }
- };
-
-#endif // __FEMONTOOLS_H
diff --git a/femonh264.c b/h264.c
similarity index 81%
rename from femonh264.c
rename to h264.c
index 693976f..0ed474d 100644
--- a/femonh264.c
+++ b/h264.c
@@ -1,14 +1,15 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * h264.c: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
-#include "femontools.h"
-#include "femonh264.h"
+#include "log.h"
+#include "tools.h"
+#include "h264.h"
-const cFemonH264::t_DAR cFemonH264::s_DAR[] =
+const cFemonH264::t_DAR cFemonH264::darS[] =
{
{ VIDEO_ASPECT_RATIO_1_1, 100 },
{ VIDEO_ASPECT_RATIO_4_3, 133 },
@@ -30,7 +31,7 @@ const cFemonH264::t_DAR cFemonH264::s_DAR[] =
{ VIDEO_ASPECT_RATIO_2_1, 200 }
};
-const cFemonH264::t_SAR cFemonH264::s_SAR[] =
+const cFemonH264::t_SAR cFemonH264::sarS[] =
{
{ 0, 0 }, // VIDEO_ASPECT_RATIO_INVALID
{ 1, 1 }, // VIDEO_ASPECT_RATIO_1_1
@@ -51,7 +52,7 @@ const cFemonH264::t_SAR cFemonH264::s_SAR[] =
{ 2, 1 } // VIDEO_ASPECT_RATIO_2_1
};
-const eVideoFormat cFemonH264::s_VideoFormats[] =
+const eVideoFormat cFemonH264::videoFormatS[] =
{
VIDEO_FORMAT_COMPONENT,
VIDEO_FORMAT_PAL,
@@ -62,25 +63,25 @@ const eVideoFormat cFemonH264::s_VideoFormats[] =
VIDEO_FORMAT_RESERVED
};
-const uint8_t cFemonH264::s_SeiNumClockTsTable[9] =
+const uint8_t cFemonH264::seiNumClockTsTableS[9] =
{
1, 1, 1, 2, 2, 3, 3, 2, 3
};
-cFemonH264::cFemonH264(cFemonVideoIf *videohandler)
-: m_VideoHandler(videohandler),
- m_Width(0),
- m_Height(0),
- m_AspectRatio(VIDEO_ASPECT_RATIO_INVALID),
- m_Format(VIDEO_FORMAT_INVALID),
- m_FrameRate(0),
- m_BitRate(0),
- m_Scan(VIDEO_SCAN_INVALID),
- m_CpbDpbDelaysPresentFlag(false),
- m_PicStructPresentFlag(false),
- m_FrameMbsOnlyFlag(false),
- m_MbAdaptiveFrameFieldFlag(false),
- m_TimeOffsetLength(0)
+cFemonH264::cFemonH264(cFemonVideoIf *videoHandlerP)
+: videoHandlerM(videoHandlerP),
+ widthM(0),
+ heightM(0),
+ aspectRatioM(VIDEO_ASPECT_RATIO_INVALID),
+ formatM(VIDEO_FORMAT_INVALID),
+ frameRateM(0),
+ bitRateM(0),
+ scanM(VIDEO_SCAN_INVALID),
+ cpbDpbDelaysPresentFlagM(false),
+ picStructPresentFlagM(false),
+ frameMbsOnlyFlagM(false),
+ mbAdaptiveFrameFieldFlagM(false),
+ timeOffsetLengthM(0)
{
reset();
}
@@ -89,18 +90,19 @@ cFemonH264::~cFemonH264()
{
}
-bool cFemonH264::processVideo(const uint8_t *buf, int len)
+bool cFemonH264::processVideo(const uint8_t *bufP, int lenP)
{
- uint8_t nal_data[len];
+ uint8_t nal_data[lenP];
bool aud_found = false, sps_found = false, sei_found = true; // SEI temporarily disabled!
+ const uint8_t *buf = bufP;
const uint8_t *start = buf;
- const uint8_t *end = start + len;
+ const uint8_t *end = start + lenP;
- if (!m_VideoHandler)
+ if (!videoHandlerM)
return false;
// skip PES header
- if (!PesLongEnough(len))
+ if (!PesLongEnough(lenP))
return false;
buf += PesPayloadOffset(buf);
start = buf;
@@ -119,7 +121,7 @@ bool cFemonH264::processVideo(const uint8_t *buf, int len)
if (!aud_found) {
switch (buf[4] >> 5) {
case 0: case 3: case 5: // I_FRAME
- //debug("H.264: Found NAL AUD at offset %d/%d\n", int(buf - start), len);
+ debug2("%s Found NAL AUD at offset %d/%d", __PRETTY_FUNCTION__, int(buf - start), lenP);
aud_found = true;
break;
case 1: case 4: case 6: // P_FRAME;
@@ -132,7 +134,7 @@ bool cFemonH264::processVideo(const uint8_t *buf, int len)
case NAL_SPS:
if (!sps_found) {
- //debug("H.264: Found NAL SPS at offset %d/%d\n", int(buf - start), len);
+ debug2("%s Found NAL SPS at offset %d/%d", __PRETTY_FUNCTION__, int(buf - start), lenP);
int nal_len = nalUnescape(nal_data, buf + 4, int(end - buf - 4));
consumed = parseSPS(nal_data, nal_len);
if (consumed > 0)
@@ -142,7 +144,7 @@ bool cFemonH264::processVideo(const uint8_t *buf, int len)
case NAL_SEI:
if (!sei_found) {
- //debug("H.264: Found NAL SEI at offset %d/%d\n", int(buf - start), len);
+ debug2("%s Found NAL SEI at offset %d/%d", __PRETTY_FUNCTION__, int(buf - start), lenP);
int nal_len = nalUnescape(nal_data, buf + 4, int(end - buf - 4));
consumed = parseSEI(nal_data, nal_len);
if (consumed > 0)
@@ -161,18 +163,18 @@ bool cFemonH264::processVideo(const uint8_t *buf, int len)
}
if (aud_found) {
- m_VideoHandler->SetVideoCodec(VIDEO_CODEC_H264);
+ videoHandlerM->SetVideoCodec(VIDEO_CODEC_H264);
if (sps_found) {
- //debug("H.264: size %dx%d, aspect %d format %d bitrate %.0f\n", m_Width, m_Height, m_AspectRatio, m_Format, m_BitRate);
- m_VideoHandler->SetVideoFormat(m_Format);
- m_VideoHandler->SetVideoSize(m_Width, m_Height);
- m_VideoHandler->SetVideoAspectRatio(m_AspectRatio);
- m_VideoHandler->SetVideoBitrate(m_BitRate);
+ debug2("%s width=%d height=%d, aspect=%d format=%d bitrate=%.0f", __PRETTY_FUNCTION__, widthM, heightM, aspectRatioM, formatM, bitRateM);
+ videoHandlerM->SetVideoFormat(formatM);
+ videoHandlerM->SetVideoSize(widthM, heightM);
+ videoHandlerM->SetVideoAspectRatio(aspectRatioM);
+ videoHandlerM->SetVideoBitrate(bitRateM);
}
if (sps_found || sei_found) {
- //debug("H.264: scan %d framerate %.2f\n", m_Scan, (m_Scan == VIDEO_SCAN_PROGRESSIVE) ? (m_FrameRate / 2) : m_FrameRate);
- m_VideoHandler->SetVideoScan(m_Scan);
- m_VideoHandler->SetVideoFramerate((m_Scan == VIDEO_SCAN_PROGRESSIVE) ? (m_FrameRate / 2) : m_FrameRate);
+ debug2("%s scan=%d framerate=%.2f", __PRETTY_FUNCTION__, scanM, (scanM == VIDEO_SCAN_PROGRESSIVE) ? (frameRateM / 2) : frameRateM);
+ videoHandlerM->SetVideoScan(scanM);
+ videoHandlerM->SetVideoFramerate((scanM == VIDEO_SCAN_PROGRESSIVE) ? (frameRateM / 2) : frameRateM);
}
}
@@ -181,60 +183,60 @@ bool cFemonH264::processVideo(const uint8_t *buf, int len)
void cFemonH264::reset()
{
- m_CpbDpbDelaysPresentFlag = false;
- m_PicStructPresentFlag = false;
- m_FrameMbsOnlyFlag = false;
- m_MbAdaptiveFrameFieldFlag = false;
- m_TimeOffsetLength = 0;
+ cpbDpbDelaysPresentFlagM = false;
+ picStructPresentFlagM = false;
+ frameMbsOnlyFlagM = false;
+ mbAdaptiveFrameFieldFlagM = false;
+ timeOffsetLengthM = 0;
}
-const uint8_t *cFemonH264::nextStartCode(const uint8_t *start, const uint8_t *end)
+const uint8_t *cFemonH264::nextStartCode(const uint8_t *startP, const uint8_t *endP)
{
- for (end -= 3; start < end; ++start) {
- if ((start[0] == 0x00) && (start[1] == 0x00) && (start[2] == 0x01))
- return start;
+ for (endP -= 3; startP < endP; ++startP) {
+ if ((startP[0] == 0x00) && (startP[1] == 0x00) && (startP[2] == 0x01))
+ return startP;
}
- return (end + 3);
+ return (endP + 3);
}
-int cFemonH264::nalUnescape(uint8_t *dst, const uint8_t *src, int len)
+int cFemonH264::nalUnescape(uint8_t *dstP, const uint8_t *srcP, int lenP)
{
int s = 0, d = 0;
- while (s < len) {
- if (!src[s] && !src[s + 1]) {
+ while (s < lenP) {
+ if (!srcP[s] && !srcP[s + 1]) {
// hit 00 00 xx
- dst[d] = dst[d + 1] = 0;
+ dstP[d] = dstP[d + 1] = 0;
s += 2;
d += 2;
- if (src[s] == 3) {
+ if (srcP[s] == 3) {
s++; // 00 00 03 xx --> 00 00 xx
- if (s >= len)
+ if (s >= lenP)
return d;
}
}
- dst[d++] = src[s++];
+ dstP[d++] = srcP[s++];
}
return d;
}
-int cFemonH264::parseSPS(const uint8_t *buf, int len)
+int cFemonH264::parseSPS(const uint8_t *bufP, int lenP)
{
int profile_idc, level_idc, constraint_set3_flag, pic_order_cnt_type, i, j;
- cFemonBitStream bs(buf, len);
-
- uint32_t width = m_Width;
- uint32_t height = m_Height;
- eVideoAspectRatio aspect_ratio = m_AspectRatio;
- eVideoFormat format = m_Format;
- double frame_rate = m_FrameRate;
- double bit_rate = m_BitRate;
- bool cpb_dpb_delays_present_flag = m_CpbDpbDelaysPresentFlag;
- bool pic_struct_present_flag = m_PicStructPresentFlag;
- bool frame_mbs_only_flag = m_FrameMbsOnlyFlag;
- bool mb_adaptive_frame_field_flag = m_MbAdaptiveFrameFieldFlag;
- uint32_t time_offset_length = m_TimeOffsetLength;
+ cFemonBitStream bs(bufP, lenP);
+
+ uint32_t width = widthM;
+ uint32_t height = heightM;
+ eVideoAspectRatio aspect_ratio = aspectRatioM;
+ eVideoFormat format = formatM;
+ double frame_rate = frameRateM;
+ double bit_rate = bitRateM;
+ bool cpb_dpb_delays_present_flag = cpbDpbDelaysPresentFlagM;
+ bool pic_struct_present_flag = picStructPresentFlagM;
+ bool frame_mbs_only_flag = frameMbsOnlyFlagM;
+ bool mb_adaptive_frame_field_flag = mbAdaptiveFrameFieldFlagM;
+ uint32_t time_offset_length = timeOffsetLengthM;
profile_idc = bs.GetBits(8); // profile_idc
bs.SkipBit(); // constraint_set0_flag
@@ -244,7 +246,7 @@ int cFemonH264::parseSPS(const uint8_t *buf, int len)
bs.SkipBits(4); // reserved_zero_4bits
level_idc = bs.GetBits(8); // level_idc
bs.SkipUeGolomb(); // seq_parameter_set_id
- //debug("H.264 SPS: profile_idc %d level_idc %d\n", profile_idc, level_idc);
+ debug2("%s profile_idc=%d level_idc=%d", __PRETTY_FUNCTION__, profile_idc, level_idc);
switch (profile_idc) {
case 66: // baseline profile
case 77: // main profile
@@ -492,9 +494,9 @@ int cFemonH264::parseSPS(const uint8_t *buf, int len)
width = bs.GetUeGolomb() + 1; // pic_width_in_mbs_minus1
height = bs.GetUeGolomb() + 1; // pic_height_in_mbs_minus1
frame_mbs_only_flag = bs.GetBit(); // frame_mbs_only_flag
- //debug("H.264 SPS: pic_width: %u mbs\n", width);
- //debug("H.264 SPS: pic_height: %u mbs\n", height);
- //debug("H.264 SPS: frame only flag: %d\n", frame_mbs_only_flag);
+ debug2("%s pic_width=%u", __PRETTY_FUNCTION__, width);
+ debug2("%s pic_height=%u", __PRETTY_FUNCTION__, height);
+ debug2("%s frame_mbs_only_flag=%d", __PRETTY_FUNCTION__, frame_mbs_only_flag);
width *= 16;
height *= 16 * (frame_mbs_only_flag ? 1 : 2);
if (!frame_mbs_only_flag)
@@ -506,7 +508,7 @@ int cFemonH264::parseSPS(const uint8_t *buf, int len)
crop_right = bs.GetUeGolomb(); // frame_crop_rigth_offset
crop_top = bs.GetUeGolomb(); // frame_crop_top_offset
crop_bottom = bs.GetUeGolomb(); // frame_crop_bottom_offset
- //debug("H.264 SPS: cropping %d %d %d %d\n", crop_left, crop_top, crop_right, crop_bottom);
+ debug2("%s crop_left=%d crop_top=%d crop_right=%d crop_bottom=%d", __PRETTY_FUNCTION__, crop_left, crop_top, crop_right, crop_bottom);
width -= 2 * (crop_left + crop_right);
if (frame_mbs_only_flag)
height -= 2 * (crop_top + crop_bottom);
@@ -518,19 +520,19 @@ int cFemonH264::parseSPS(const uint8_t *buf, int len)
if (bs.GetBit()) { // aspect_ratio_info_present
uint32_t aspect_ratio_idc, sar_width = 0, sar_height = 0;
aspect_ratio_idc = bs.GetBits(8); // aspect_ratio_idc
- //debug("H.264 SPS: aspect_ratio_idc %d\n", aspect_ratio_idc);
+ debug2("%s aspect_ratio_idc=%d", __PRETTY_FUNCTION__, aspect_ratio_idc);
if (aspect_ratio_idc == 255) { // extended sar
sar_width = bs.GetBits(16); // sar_width
sar_height = bs.GetBits(16); // sar_height
}
- else if (aspect_ratio_idc < ELEMENTS(s_SAR)) {
- sar_width = s_SAR[aspect_ratio_idc].w;
- sar_height = s_SAR[aspect_ratio_idc].h;
+ else if (aspect_ratio_idc < ELEMENTS(sarS)) {
+ sar_width = sarS[aspect_ratio_idc].w;
+ sar_height = sarS[aspect_ratio_idc].h;
}
if (sar_width && sar_height) {
int index = -1, ratio = int(100.0L * sar_width * width / sar_height / height);
- for (unsigned int i = 0; i < ELEMENTS(s_DAR); ++i) {
- if (s_DAR[i].ratio == ratio) {
+ for (unsigned int i = 0; i < ELEMENTS(darS); ++i) {
+ if (darS[i].ratio == ratio) {
index = i;
break;
}
@@ -542,8 +544,8 @@ int cFemonH264::parseSPS(const uint8_t *buf, int len)
aspect_ratio = VIDEO_ASPECT_RATIO_INVALID;
}
else
- aspect_ratio = s_DAR[index].dar;
- //debug("H.264 SPS: DAR %dx%d (%d)\n", sar_width, sar_height, aspect_ratio);
+ aspect_ratio = darS[index].dar;
+ debug2("%s sar_width=%d sar_height=%d aspect_ratio=%d", __PRETTY_FUNCTION__, sar_width, sar_height, aspect_ratio);
}
}
if (bs.GetBit()) // overscan_info_present_flag
@@ -551,9 +553,9 @@ int cFemonH264::parseSPS(const uint8_t *buf, int len)
if (bs.GetBit()) { // video_signal_type_present_flag
uint32_t video_format;
video_format = bs.GetBits(3); // video_format
- if (video_format < sizeof(s_VideoFormats) / sizeof(s_VideoFormats[0])) {
- format = s_VideoFormats[video_format];
- //debug("H.264 SPS: video format %d\n", format);
+ if (video_format < sizeof(videoFormatS) / sizeof(videoFormatS[0])) {
+ format = videoFormatS[video_format];
+ debug2("%s video_format=%d", __PRETTY_FUNCTION__, format);
}
bs.SkipBit(); // video_full_range_flag
if (bs.GetBit()) { // colour_description_present_flag
@@ -621,30 +623,30 @@ int cFemonH264::parseSPS(const uint8_t *buf, int len)
}
}
- m_Width = width;
- m_Height = height;
- m_AspectRatio = aspect_ratio;
- m_Format = format;
- m_Scan = frame_mbs_only_flag ? VIDEO_SCAN_PROGRESSIVE : VIDEO_SCAN_INTERLACED;
- m_FrameRate = frame_rate;
- m_BitRate = bit_rate;
- m_CpbDpbDelaysPresentFlag = cpb_dpb_delays_present_flag;
- m_PicStructPresentFlag = pic_struct_present_flag;
- m_FrameMbsOnlyFlag = frame_mbs_only_flag;
- m_MbAdaptiveFrameFieldFlag = mb_adaptive_frame_field_flag;
- m_TimeOffsetLength = time_offset_length;
+ widthM = width;
+ heightM = height;
+ aspectRatioM = aspect_ratio;
+ formatM = format;
+ scanM = frame_mbs_only_flag ? VIDEO_SCAN_PROGRESSIVE : VIDEO_SCAN_INTERLACED;
+ frameRateM = frame_rate;
+ bitRateM = bit_rate;
+ cpbDpbDelaysPresentFlagM = cpb_dpb_delays_present_flag;
+ picStructPresentFlagM = pic_struct_present_flag;
+ frameMbsOnlyFlagM = frame_mbs_only_flag;
+ mbAdaptiveFrameFieldFlagM = mb_adaptive_frame_field_flag;
+ timeOffsetLengthM = time_offset_length;
return (bs.Index() / 8);
}
-int cFemonH264::parseSEI(const uint8_t *buf, int len)
+int cFemonH264::parseSEI(const uint8_t *bufP, int lenP)
{
int num_referenced_subseqs, i;
- cFemonBitStream bs(buf, len);
+ cFemonBitStream bs(bufP, lenP);
- eVideoScan scan = m_Scan;
+ eVideoScan scan = scanM;
- while ((bs.Index() * 8 + 16) < len) { // sei_message
+ while ((bs.Index() * 8 + 16) < lenP) { // sei_message
int lastByte, payloadSize = 0, payloadType = 0;
do {
@@ -659,16 +661,16 @@ int cFemonH264::parseSEI(const uint8_t *buf, int len)
switch (payloadType) { // sei_payload
case 1: // pic_timing
- if (m_CpbDpbDelaysPresentFlag) { // cpb_dpb_delays_present_flag
+ if (cpbDpbDelaysPresentFlagM) { // cpb_dpb_delays_present_flag
bs.SkipUeGolomb(); // cpb_removal_delay
bs.SkipUeGolomb(); // dpb_output_delay
}
- if (m_PicStructPresentFlag) { // pic_struct_present_flag
+ if (picStructPresentFlagM) { // pic_struct_present_flag
uint32_t pic_struct, ct_type = 0, i = 0;
pic_struct = bs.GetBits(4); // pic_struct
- if (pic_struct >= (sizeof(s_SeiNumClockTsTable)) / sizeof(s_SeiNumClockTsTable[0]))
+ if (pic_struct >= (sizeof(seiNumClockTsTableS)) / sizeof(seiNumClockTsTableS[0]))
return 0;
- if (m_FrameMbsOnlyFlag && !m_MbAdaptiveFrameFieldFlag)
+ if (frameMbsOnlyFlagM && !mbAdaptiveFrameFieldFlagM)
scan = VIDEO_SCAN_PROGRESSIVE;
else {
switch (pic_struct) {
@@ -690,12 +692,12 @@ int cFemonH264::parseSEI(const uint8_t *buf, int len)
break;
}
}
- //debug("H.264 SEI: pic struct %d scan type %d\n", pic_struct, scan);
- for (i = 0; i < s_SeiNumClockTsTable[pic_struct]; ++i) {
+ debug2("%s pic_struct=%d scan_type=%d", __PRETTY_FUNCTION__, pic_struct, scan);
+ for (i = 0; i < seiNumClockTsTableS[pic_struct]; ++i) {
if (bs.GetBit()) { // clock_timestamp_flag[i]
int full_timestamp_flag;
ct_type |= (1 << bs.GetBits(2)); // ct_type
- //debug("H.264 SEI: ct type %04X\n", ct_type);
+ debug2("%s ct_type=%04X", __PRETTY_FUNCTION__, ct_type);
bs.SkipBit(); // nuit_field_based_flag
bs.SkipBits(5); // counting_type
full_timestamp_flag = bs.GetBit(); // full_timestamp_flag
@@ -717,8 +719,8 @@ int cFemonH264::parseSEI(const uint8_t *buf, int len)
}
}
}
- if (m_TimeOffsetLength > 0)
- bs.SkipBits(m_TimeOffsetLength); // time_offset
+ if (timeOffsetLengthM > 0)
+ bs.SkipBits(timeOffsetLengthM); // time_offset
}
}
if (i > 0)
@@ -753,7 +755,7 @@ int cFemonH264::parseSEI(const uint8_t *buf, int len)
bs.ByteAlign();
}
- m_Scan = scan;
+ scanM = scan;
return (bs.Index() / 8);
}
diff --git a/h264.h b/h264.h
new file mode 100644
index 0000000..3e7589f
--- /dev/null
+++ b/h264.h
@@ -0,0 +1,64 @@
+/*
+ * h264.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_H264_H
+#define __FEMON_H264_H
+
+#include "video.h"
+
+class cFemonH264 {
+private:
+ enum {
+ NAL_SEI = 0x06, // Supplemental Enhancement Information
+ NAL_SPS = 0x07, // Sequence Parameter Set
+ NAL_AUD = 0x09, // Access Unit Delimiter
+ NAL_END_SEQ = 0x0A // End of Sequence
+ };
+
+ typedef struct DAR {
+ eVideoAspectRatio dar;
+ int ratio;
+ } t_DAR;
+
+ typedef struct SAR {
+ int w;
+ int h;
+ } t_SAR;
+
+ cFemonVideoIf *videoHandlerM;
+ uint32_t widthM;
+ uint32_t heightM;
+ eVideoAspectRatio aspectRatioM;
+ eVideoFormat formatM;
+ double frameRateM;
+ double bitRateM;
+ eVideoScan scanM;
+ bool cpbDpbDelaysPresentFlagM;
+ bool picStructPresentFlagM;
+ bool frameMbsOnlyFlagM;
+ bool mbAdaptiveFrameFieldFlagM;
+ uint32_t timeOffsetLengthM;
+
+ void reset();
+ const uint8_t *nextStartCode(const uint8_t *start, const uint8_t *end);
+ int nalUnescape(uint8_t *dst, const uint8_t *src, int len);
+ int parseSPS(const uint8_t *buf, int len);
+ int parseSEI(const uint8_t *buf, int len);
+
+ static const t_SAR sarS[];
+ static const t_DAR darS[];
+ static const eVideoFormat videoFormatS[];
+ static const uint8_t seiNumClockTsTableS[9];
+
+public:
+ cFemonH264(cFemonVideoIf *videoHandlerP);
+ virtual ~cFemonH264();
+
+ bool processVideo(const uint8_t *bufP, int lenP);
+ };
+
+#endif //__FEMON_H264_H
diff --git a/femonlatm.c b/latm.c
similarity index 57%
rename from femonlatm.c
rename to latm.c
index 7edb6c3..b2037c6 100644
--- a/femonlatm.c
+++ b/latm.c
@@ -1,27 +1,27 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * latm.c: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
-#include "femontools.h"
-#include "femonlatm.h"
+#include "tools.h"
+#include "latm.h"
-int cFemonLATM::s_Bitrates[3][16] =
+int cFemonLATM::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
};
-int cFemonLATM::s_Samplerates[4] =
+int cFemonLATM::sampleRateS[4] =
{
22050, 24000, 16000, -1
};
-cFemonLATM::cFemonLATM(cFemonAudioIf *audiohandler)
-: m_AudioHandler(audiohandler)
+cFemonLATM::cFemonLATM(cFemonAudioIf *audioHandlerP)
+: audioHandlerM(audioHandlerP)
{
}
@@ -29,23 +29,23 @@ cFemonLATM::~cFemonLATM()
{
}
-bool cFemonLATM::processAudio(const uint8_t *buf, int len)
+bool cFemonLATM::processAudio(const uint8_t *bufP, int lenP)
{
- cFemonBitStream bs(buf, len * 8);
+ cFemonBitStream bs(bufP, lenP * 8);
- if (!m_AudioHandler)
+ if (!audioHandlerM)
return false;
// skip PES header
- if (!PesLongEnough(len))
+ if (!PesLongEnough(lenP))
return false;
- bs.SkipBits(8 * PesPayloadOffset(buf));
+ bs.SkipBits(8 * PesPayloadOffset(bufP));
// MPEG audio detection
if (bs.GetBits(12) != 0x56E) // syncword
return false;
- m_AudioHandler->SetAudioCodec(AUDIO_CODEC_LATM);
+ audioHandlerM->SetAudioCodec(AUDIO_CODEC_LATM);
if (bs.GetBit() == 0) // id: MPEG-1=1, extension to lower sampling frequencies=0
return true; // @todo: lower sampling frequencies support
@@ -59,52 +59,52 @@ bool cFemonLATM::processAudio(const uint8_t *buf, int len)
switch (mode) {
case 0:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_STEREO);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_STEREO);
break;
case 1:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_JOINT_STEREO);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_JOINT_STEREO);
break;
case 2:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_DUAL);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_DUAL);
break;
case 3:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_SINGLE);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_SINGLE);
break;
default:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_INVALID);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_INVALID);
break;
}
if (layer == 3) {
- m_AudioHandler->SetAudioBitrate(AUDIO_BITRATE_FREE);
+ audioHandlerM->SetAudioBitrate(AUDIO_BITRATE_FREE);
}
else {
switch (bit_rate_index) {
case 0:
- m_AudioHandler->SetAudioBitrate(AUDIO_BITRATE_FREE);
+ audioHandlerM->SetAudioBitrate(AUDIO_BITRATE_FREE);
break;
case 0xF:
- m_AudioHandler->SetAudioBitrate(AUDIO_BITRATE_RESERVED);
+ audioHandlerM->SetAudioBitrate(AUDIO_BITRATE_RESERVED);
break;
default:
- m_AudioHandler->SetAudioBitrate(1000 * s_Bitrates[layer][bit_rate_index]);
+ audioHandlerM->SetAudioBitrate(1000 * bitrateS[layer][bit_rate_index]);
break;
}
}
switch (sampling_frequency) {
case 3:
- m_AudioHandler->SetAudioSamplingFrequency(AUDIO_SAMPLING_FREQUENCY_RESERVED);
+ audioHandlerM->SetAudioSamplingFrequency(AUDIO_SAMPLING_FREQUENCY_RESERVED);
break;
default:
- m_AudioHandler->SetAudioSamplingFrequency(s_Samplerates[sampling_frequency]);
+ audioHandlerM->SetAudioSamplingFrequency(sampleRateS[sampling_frequency]);
break;
}
diff --git a/latm.h b/latm.h
new file mode 100644
index 0000000..7909264
--- /dev/null
+++ b/latm.h
@@ -0,0 +1,27 @@
+/*
+ * latm.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_LATM_H
+#define __FEMON_LATM_H
+
+#include "audio.h"
+
+class cFemonLATM {
+private:
+ cFemonAudioIf *audioHandlerM;
+
+ static int bitrateS[3][16];
+ static int sampleRateS[4];
+
+public:
+ cFemonLATM(cFemonAudioIf *audioHandlerP);
+ virtual ~cFemonLATM();
+
+ bool processAudio(const uint8_t *bufP, int lenP);
+ };
+
+#endif //__FEMON_LATM_H
diff --git a/log.h b/log.h
new file mode 100644
index 0000000..b954575
--- /dev/null
+++ b/log.h
@@ -0,0 +1,48 @@
+/*
+ * log.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_LOG_H
+#define __FEMON_LOG_H
+
+#include "config.h"
+
+#define error(x...) esyslog("FEMON-ERROR: " x)
+#define info(x...) isyslog("FEMON: " x)
+// 0x0001: Generic call stack
+#define debug1(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug1) ? dsyslog("FEMON1: " x) : void() )
+// 0x0002: H.264
+#define debug2(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug2) ? dsyslog("FEMON2: " x) : void() )
+// 0x0004: TBD
+#define debug3(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug3) ? dsyslog("FEMON3: " x) : void() )
+// 0x0008: TBD
+#define debug4(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug4) ? dsyslog("FEMON4: " x) : void() )
+// 0x0010: TBD
+#define debug5(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug5) ? dsyslog("FEMON5: " x) : void() )
+// 0x0020: TBD
+#define debug6(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug6) ? dsyslog("FEMON6: " x) : void() )
+// 0x0040: TBD
+#define debug7(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug7) ? dsyslog("FEMON7: " x) : void() )
+// 0x0080: TBD
+#define debug8(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug8) ? dsyslog("FEMON8: " x) : void() )
+// 0x0100: TBD
+#define debug9(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug9) ? dsyslog("FEMON9: " x) : void() )
+// 0x0200: TBD
+#define debug10(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug10) ? dsyslog("FEMON10: " x) : void() )
+// 0x0400: TBD
+#define debug11(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug11) ? dsyslog("FEMON11: " x) : void() )
+// 0x0800: TBD
+#define debug12(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug12) ? dsyslog("FEMON12: " x) : void() )
+// 0x1000: TBD
+#define debug13(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug13) ? dsyslog("FEMON13: " x) : void() )
+// 0x2000: TBD
+#define debug14(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug14) ? dsyslog("FEMON14: " x) : void() )
+// 0x4000: TBD
+#define debug15(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug15) ? dsyslog("FEMON15: " x) : void() )
+// 0x8000; Extra call stack
+#define debug16(x...) void( FemonConfig.IsTraceMode(cFemonConfig::eTraceModeDebug16) ? dsyslog("FEMON16: " x) : void() )
+
+#endif // __FEMON_LOG_H
diff --git a/femonmpeg.c b/mpeg.c
similarity index 77%
rename from femonmpeg.c
rename to mpeg.c
index e0f0564..787ee36 100644
--- a/femonmpeg.c
+++ b/mpeg.c
@@ -1,16 +1,16 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * mpeg.c: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
-#include "femontools.h"
-#include "femonmpeg.h"
+#include "tools.h"
+#include "mpeg.h"
#define IS_EXTENSION_START(buf) (((buf)[0] == 0x00) && ((buf)[1] == 0x00) && ((buf)[2] == 0x01) && ((buf)[3] == 0xB5))
-int cFemonMPEG::s_Bitrates[2][3][16] =
+int cFemonMPEG::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,21 +24,21 @@ int cFemonMPEG::s_Bitrates[2][3][16] =
}
};
-int cFemonMPEG::s_Samplerates[2][4] =
+int cFemonMPEG::sampleRateS[2][4] =
{
{22050, 24000, 16000, -1}, // MPEG-2
{44100, 48000, 32000, -1} // MPEG-1
};
-eAudioCodec cFemonMPEG::s_Formats[2][4] =
+eAudioCodec cFemonMPEG::formatS[2][4] =
{
{AUDIO_CODEC_MPEG2_I, AUDIO_CODEC_MPEG2_II, AUDIO_CODEC_MPEG2_III, AUDIO_CODEC_UNKNOWN}, // MPEG-2
{AUDIO_CODEC_MPEG1_I, AUDIO_CODEC_MPEG1_II, AUDIO_CODEC_MPEG1_III, AUDIO_CODEC_UNKNOWN} // MPEG-1
};
-cFemonMPEG::cFemonMPEG(cFemonVideoIf *videohandler, cFemonAudioIf *audiohandler)
-: m_VideoHandler(videohandler),
- m_AudioHandler(audiohandler)
+cFemonMPEG::cFemonMPEG(cFemonVideoIf *videoHandlerP, cFemonAudioIf *audioHandlerP)
+: videoHandlerM(videoHandlerP),
+ audioHandlerM(audioHandlerP)
{
}
@@ -46,17 +46,17 @@ cFemonMPEG::~cFemonMPEG()
{
}
-bool cFemonMPEG::processAudio(const uint8_t *buf, int len)
+bool cFemonMPEG::processAudio(const uint8_t *bufP, int lenP)
{
- cFemonBitStream bs(buf, len * 8);
+ cFemonBitStream bs(bufP, lenP * 8);
- if (!m_AudioHandler)
+ if (!audioHandlerM)
return false;
// skip PES header
- if (!PesLongEnough(len))
+ if (!PesLongEnough(lenP))
return false;
- bs.SkipBits(8 * PesPayloadOffset(buf));
+ bs.SkipBits(8 * PesPayloadOffset(bufP));
// MPEG audio detection
if (bs.GetBits(12) != 0xFFF) // syncword
@@ -71,68 +71,68 @@ bool cFemonMPEG::processAudio(const uint8_t *buf, int len)
bs.SkipBit(); // private pid
int mode = bs.GetBits(2); // mode
- m_AudioHandler->SetAudioCodec(s_Formats[id][layer]);
+ audioHandlerM->SetAudioCodec(formatS[id][layer]);
switch (mode) {
case 0:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_STEREO);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_STEREO);
break;
case 1:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_JOINT_STEREO);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_JOINT_STEREO);
break;
case 2:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_DUAL);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_DUAL);
break;
case 3:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_SINGLE);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_SINGLE);
break;
default:
- m_AudioHandler->SetAudioChannel(AUDIO_CHANNEL_MODE_INVALID);
+ audioHandlerM->SetAudioChannel(AUDIO_CHANNEL_MODE_INVALID);
break;
}
switch (bit_rate_index) {
case 0:
- m_AudioHandler->SetAudioBitrate(AUDIO_BITRATE_FREE);
+ audioHandlerM->SetAudioBitrate(AUDIO_BITRATE_FREE);
break;
case 0xF:
- m_AudioHandler->SetAudioBitrate(AUDIO_BITRATE_RESERVED);
+ audioHandlerM->SetAudioBitrate(AUDIO_BITRATE_RESERVED);
break;
default:
- m_AudioHandler->SetAudioBitrate(1000 * s_Bitrates[id][layer][bit_rate_index]);
+ audioHandlerM->SetAudioBitrate(1000 * bitrateS[id][layer][bit_rate_index]);
break;
}
switch (sampling_frequency) {
case 3:
- m_AudioHandler->SetAudioSamplingFrequency(AUDIO_SAMPLING_FREQUENCY_RESERVED);
+ audioHandlerM->SetAudioSamplingFrequency(AUDIO_SAMPLING_FREQUENCY_RESERVED);
break;
default:
- m_AudioHandler->SetAudioSamplingFrequency(s_Samplerates[id][sampling_frequency]);
+ audioHandlerM->SetAudioSamplingFrequency(sampleRateS[id][sampling_frequency]);
break;
}
return true;
}
-bool cFemonMPEG::processVideo(const uint8_t *buf, int len)
+bool cFemonMPEG::processVideo(const uint8_t *bufP, int lenP)
{
- cFemonBitStream bs(buf, len * 8);
+ cFemonBitStream bs(bufP, lenP * 8);
- if (!m_VideoHandler)
+ if (!videoHandlerM)
return false;
// skip PES header
- if (!PesLongEnough(len))
+ if (!PesLongEnough(lenP))
return false;
- bs.SkipBits(8 * PesPayloadOffset(buf));
+ bs.SkipBits(8 * PesPayloadOffset(bufP));
// MPEG-2 video detection, search for start code
if (bs.GetBits(32) != 0x000001B3) // sequence header
@@ -274,13 +274,13 @@ bool cFemonMPEG::processVideo(const uint8_t *buf, int len)
}
}
- m_VideoHandler->SetVideoCodec(VIDEO_CODEC_MPEG2);
- m_VideoHandler->SetVideoSize(horizontal_size, vertical_size);
- m_VideoHandler->SetVideoBitrate(400.0 * (double)(bit_rate));
- m_VideoHandler->SetVideoFramerate(frame_rate);
- m_VideoHandler->SetVideoScan(eVideoScan(scan));
- m_VideoHandler->SetVideoAspectRatio(eVideoAspectRatio(aspect));
- m_VideoHandler->SetVideoFormat(eVideoFormat(format));
+ videoHandlerM->SetVideoCodec(VIDEO_CODEC_MPEG2);
+ videoHandlerM->SetVideoSize(horizontal_size, vertical_size);
+ videoHandlerM->SetVideoBitrate(400.0 * (double)(bit_rate));
+ videoHandlerM->SetVideoFramerate(frame_rate);
+ videoHandlerM->SetVideoScan(eVideoScan(scan));
+ videoHandlerM->SetVideoAspectRatio(eVideoAspectRatio(aspect));
+ videoHandlerM->SetVideoFormat(eVideoFormat(format));
return true;
}
diff --git a/mpeg.h b/mpeg.h
new file mode 100644
index 0000000..3b0d8d1
--- /dev/null
+++ b/mpeg.h
@@ -0,0 +1,31 @@
+/*
+ * mpeg.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_MPEG_H
+#define __FEMON_MPEG_H
+
+#include "video.h"
+#include "audio.h"
+
+class cFemonMPEG {
+private:
+ cFemonVideoIf *videoHandlerM;
+ cFemonAudioIf *audioHandlerM;
+
+ static int bitrateS[2][3][16];
+ static int sampleRateS[2][4];
+ static eAudioCodec formatS[2][4];
+
+public:
+ cFemonMPEG(cFemonVideoIf *videoHandlerP, cFemonAudioIf *audioHandlerP);
+ virtual ~cFemonMPEG();
+
+ bool processVideo(const uint8_t *bufP, int lenP);
+ bool processAudio(const uint8_t *bufP, int lenP);
+ };
+
+#endif //__FEMON_MPEG_H
diff --git a/femonosd.c b/osd.c
similarity index 53%
rename from femonosd.c
rename to osd.c
index 0544d3f..7158642 100644
--- a/femonosd.c
+++ b/osd.c
@@ -1,5 +1,5 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * osd.c: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
@@ -11,32 +11,34 @@
#include <ctype.h>
#include <math.h>
+
+#include "config.h"
#include "iptvservice.h"
-#include "femoncfg.h"
-#include "femonreceiver.h"
-#include "femontools.h"
-#include "femonsymbol.h"
-#include "femonosd.h"
+#include "log.h"
+#include "receiver.h"
+#include "symbol.h"
+#include "tools.h"
+#include "osd.h"
#define CHANNELINPUT_TIMEOUT 1000
#define SVDRPPLUGIN "svdrpservice"
-#define OSDWIDTH m_OsdWidth // in pixels
-#define OSDHEIGHT m_OsdHeight // in pixels
-#define OSDROWHEIGHT m_Font->Height() // in pixels
+#define OSDWIDTH osdWidthM // in pixels
+#define OSDHEIGHT osdHeightM // in pixels
+#define OSDROWHEIGHT fontM->Height() // in pixels
#define OSDINFOHEIGHT (OSDROWHEIGHT * 14) // in pixels (14 rows)
#define OSDSTATUSHEIGHT (OSDROWHEIGHT * 6) // in pixels (6 rows)
#define OSDSYMBOL(id) femonSymbols.Get(id)
#define OSDSPACING femonSymbols.GetSpacing()
#define OSDROUNDING femonSymbols.GetRounding()
-#define IS_OSDROUNDING (femonConfig.skin == eFemonSkinElchi)
+#define IS_OSDROUNDING (FemonConfig.GetSkin() == eFemonSkinElchi)
#define IS_OSDRESOLUTION(r1, r2) (abs(r1 - r2) < 20)
-#define OSDINFOWIN_Y(offset) (femonConfig.position ? (OSDHEIGHT - OSDINFOHEIGHT + offset) : offset)
+#define OSDINFOWIN_Y(offset) (FemonConfig.GetPosition() ? (OSDHEIGHT - OSDINFOHEIGHT + offset) : offset)
#define OSDINFOWIN_X(col) ((col == 4) ? int(round(OSDWIDTH * 0.76)) : \
(col == 3) ? int(round(OSDWIDTH * 0.51)) : \
(col == 2) ? int(round(OSDWIDTH * 0.26)) : \
int(round(OSDWIDTH * 0.025)))
-#define OSDSTATUSWIN_Y(offset) (femonConfig.position ? offset : (OSDHEIGHT - OSDSTATUSHEIGHT + offset))
+#define OSDSTATUSWIN_Y(offset) (FemonConfig.GetPosition() ? offset : (OSDHEIGHT - OSDSTATUSHEIGHT + offset))
#define OSDSTATUSWIN_X(col) ((col == 7) ? int(round(OSDWIDTH * 0.79)) : \
(col == 6) ? int(round(OSDWIDTH * 0.68)) : \
(col == 5) ? int(round(OSDWIDTH * 0.46)) : \
@@ -52,85 +54,85 @@
x -= bm->Width() + spacing; \
y = (OSDROWHEIGHT - bm->Height()) / 2; \
if (y < 0) y = 0; \
- m_Osd->DrawBitmap(x, OSDSTATUSWIN_Y(offset) + y, *bm, femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground); \
+ osdM->DrawBitmap(x, OSDSTATUSWIN_Y(offset) + y, *bm, FemonTheme[FemonConfig.GetTheme()].clrTitleText, FemonTheme[FemonConfig.GetTheme()].clrTitleBackground); \
}
#define OSDDRAWSTATUSFRONTEND(column, bitmap, status) \
- m_Osd->DrawBitmap(OSDSTATUSWIN_XSYMBOL(column, x), OSDSTATUSWIN_Y(offset) + y, bitmap, (m_FrontendStatus & status) ? femonTheme[femonConfig.theme].clrActiveText : femonTheme[femonConfig.theme].clrRed, femonTheme[femonConfig.theme].clrBackground)
+ osdM->DrawBitmap(OSDSTATUSWIN_XSYMBOL(column, x), OSDSTATUSWIN_Y(offset) + y, bitmap, (frontendStatusM & status) ? FemonTheme[FemonConfig.GetTheme()].clrActiveText : FemonTheme[FemonConfig.GetTheme()].clrRed, FemonTheme[FemonConfig.GetTheme()].clrBackground)
#define OSDDRAWSTATUSVALUES(label1, label2, label3, label4, label5, label6, label7) \
- m_Osd->DrawText(OSDSTATUSWIN_X(1), OSDSTATUSWIN_Y(offset), label1, femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); \
- m_Osd->DrawText(OSDSTATUSWIN_X(2), OSDSTATUSWIN_Y(offset), label2, femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); \
- m_Osd->DrawText(OSDSTATUSWIN_X(3), OSDSTATUSWIN_Y(offset), label3, femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); \
- m_Osd->DrawText(OSDSTATUSWIN_X(4), OSDSTATUSWIN_Y(offset), label4, femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); \
- m_Osd->DrawText(OSDSTATUSWIN_X(5), OSDSTATUSWIN_Y(offset), label5, femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); \
- m_Osd->DrawText(OSDSTATUSWIN_X(6), OSDSTATUSWIN_Y(offset), label6, femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); \
- m_Osd->DrawText(OSDSTATUSWIN_X(7), OSDSTATUSWIN_Y(offset), label7, femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font)
+ osdM->DrawText(OSDSTATUSWIN_X(1), OSDSTATUSWIN_Y(offset), label1, FemonTheme[FemonConfig.GetTheme()].clrInactiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM); \
+ osdM->DrawText(OSDSTATUSWIN_X(2), OSDSTATUSWIN_Y(offset), label2, FemonTheme[FemonConfig.GetTheme()].clrInactiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM); \
+ osdM->DrawText(OSDSTATUSWIN_X(3), OSDSTATUSWIN_Y(offset), label3, FemonTheme[FemonConfig.GetTheme()].clrInactiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM); \
+ osdM->DrawText(OSDSTATUSWIN_X(4), OSDSTATUSWIN_Y(offset), label4, FemonTheme[FemonConfig.GetTheme()].clrInactiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM); \
+ osdM->DrawText(OSDSTATUSWIN_X(5), OSDSTATUSWIN_Y(offset), label5, FemonTheme[FemonConfig.GetTheme()].clrInactiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM); \
+ osdM->DrawText(OSDSTATUSWIN_X(6), OSDSTATUSWIN_Y(offset), label6, FemonTheme[FemonConfig.GetTheme()].clrInactiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM); \
+ osdM->DrawText(OSDSTATUSWIN_X(7), OSDSTATUSWIN_Y(offset), label7, FemonTheme[FemonConfig.GetTheme()].clrInactiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM)
#define OSDDRAWSTATUSBAR(value) \
if (value > 0) { \
int barvalue = OSDBARWIDTH(value); \
- m_Osd->DrawRectangle(0, OSDSTATUSWIN_Y(offset) + 3, min(OSDBARWIDTH(femonConfig.redlimit), barvalue), OSDSTATUSWIN_Y(offset) + OSDROWHEIGHT - 3, femonTheme[femonConfig.theme].clrRed); \
- if (barvalue > OSDBARWIDTH(femonConfig.redlimit)) \
- m_Osd->DrawRectangle(OSDBARWIDTH(femonConfig.redlimit), OSDSTATUSWIN_Y(offset) + 3, min((OSDWIDTH * femonConfig.greenlimit / 100), barvalue), OSDSTATUSWIN_Y(offset) + OSDROWHEIGHT - 3, femonTheme[femonConfig.theme].clrYellow); \
- if (barvalue > OSDBARWIDTH(femonConfig.greenlimit)) \
- m_Osd->DrawRectangle(OSDBARWIDTH(femonConfig.greenlimit), OSDSTATUSWIN_Y(offset) + 3, barvalue, OSDSTATUSWIN_Y(offset) + OSDROWHEIGHT - 3, femonTheme[femonConfig.theme].clrGreen); \
+ osdM->DrawRectangle(0, OSDSTATUSWIN_Y(offset) + 3, min(OSDBARWIDTH(FemonConfig.GetRedLimit()), barvalue), OSDSTATUSWIN_Y(offset) + OSDROWHEIGHT - 3, FemonTheme[FemonConfig.GetTheme()].clrRed); \
+ if (barvalue > OSDBARWIDTH(FemonConfig.GetRedLimit())) \
+ osdM->DrawRectangle(OSDBARWIDTH(FemonConfig.GetRedLimit()), OSDSTATUSWIN_Y(offset) + 3, min((OSDWIDTH * FemonConfig.GetGreenLimit() / 100), barvalue), OSDSTATUSWIN_Y(offset) + OSDROWHEIGHT - 3, FemonTheme[FemonConfig.GetTheme()].clrYellow); \
+ if (barvalue > OSDBARWIDTH(FemonConfig.GetGreenLimit())) \
+ osdM->DrawRectangle(OSDBARWIDTH(FemonConfig.GetGreenLimit()), OSDSTATUSWIN_Y(offset) + 3, barvalue, OSDSTATUSWIN_Y(offset) + OSDROWHEIGHT - 3, FemonTheme[FemonConfig.GetTheme()].clrGreen); \
}
#define OSDDRAWSTATUSTITLEBAR(title) \
- m_Osd->DrawRectangle(0, OSDSTATUSWIN_Y(offset), OSDWIDTH, OSDSTATUSWIN_Y(offset) + OSDROWHEIGHT - 1, femonTheme[femonConfig.theme].clrTitleBackground); \
- m_Osd->DrawText(OSDSTATUSWIN_X(1), OSDSTATUSWIN_Y(offset), title, femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font); \
+ osdM->DrawRectangle(0, OSDSTATUSWIN_Y(offset), OSDWIDTH, OSDSTATUSWIN_Y(offset) + OSDROWHEIGHT - 1, FemonTheme[FemonConfig.GetTheme()].clrTitleBackground); \
+ osdM->DrawText(OSDSTATUSWIN_X(1), OSDSTATUSWIN_Y(offset), title, FemonTheme[FemonConfig.GetTheme()].clrTitleText, FemonTheme[FemonConfig.GetTheme()].clrTitleBackground, fontM); \
if (IS_OSDROUNDING) { \
- m_Osd->DrawEllipse(0, OSDSTATUSWIN_Y(0), OSDROUNDING, OSDSTATUSWIN_Y(OSDROUNDING), clrTransparent, -2); \
- m_Osd->DrawEllipse(OSDWIDTH - OSDROUNDING, OSDSTATUSWIN_Y(0), OSDWIDTH, OSDSTATUSWIN_Y(OSDROUNDING), clrTransparent, -1); \
+ osdM->DrawEllipse(0, OSDSTATUSWIN_Y(0), OSDROUNDING, OSDSTATUSWIN_Y(OSDROUNDING), clrTransparent, -2); \
+ osdM->DrawEllipse(OSDWIDTH - OSDROUNDING, OSDSTATUSWIN_Y(0), OSDWIDTH, OSDSTATUSWIN_Y(OSDROUNDING), clrTransparent, -1); \
} \
- m_Osd->DrawRectangle(0, OSDSTATUSWIN_Y(offset) + OSDROWHEIGHT, OSDWIDTH, OSDSTATUSWIN_Y(offset) + OSDSTATUSHEIGHT - 1, femonTheme[femonConfig.theme].clrBackground)
+ osdM->DrawRectangle(0, OSDSTATUSWIN_Y(offset) + OSDROWHEIGHT, OSDWIDTH, OSDSTATUSWIN_Y(offset) + OSDSTATUSHEIGHT - 1, FemonTheme[FemonConfig.GetTheme()].clrBackground)
#define OSDDRAWSTATUSBOTTOMBAR() \
if (IS_OSDROUNDING) { \
- m_Osd->DrawEllipse(0, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT) - OSDROUNDING, OSDROUNDING, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT), clrTransparent, -3); \
- m_Osd->DrawEllipse(OSDWIDTH - OSDROUNDING, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT) - OSDROUNDING, OSDWIDTH, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT), clrTransparent, -4); \
+ osdM->DrawEllipse(0, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT) - OSDROUNDING, OSDROUNDING, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT), clrTransparent, -3); \
+ osdM->DrawEllipse(OSDWIDTH - OSDROUNDING, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT) - OSDROUNDING, OSDWIDTH, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT), clrTransparent, -4); \
}
#define OSDCLEARSTATUS() \
- m_Osd->DrawRectangle(0, OSDSTATUSWIN_Y(0), OSDWIDTH, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT) - 1, clrTransparent)
+ osdM->DrawRectangle(0, OSDSTATUSWIN_Y(0), OSDWIDTH, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT) - 1, clrTransparent)
#define OSDDRAWINFOLEFT(label, value) \
- m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), label, femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); \
- m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), value, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font)
+ osdM->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), label, FemonTheme[FemonConfig.GetTheme()].clrInactiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM); \
+ osdM->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), value, FemonTheme[FemonConfig.GetTheme()].clrActiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM)
#define OSDDRAWINFORIGHT(label, value) \
- m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), label, femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); \
- m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), value, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font)
+ osdM->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), label, FemonTheme[FemonConfig.GetTheme()].clrInactiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM); \
+ osdM->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), value, FemonTheme[FemonConfig.GetTheme()].clrActiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM)
#define OSDDRAWINFOACTIVE(label, value) \
- m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), label, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); \
- m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), value, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font)
+ osdM->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), label, FemonTheme[FemonConfig.GetTheme()].clrActiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM); \
+ osdM->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), value, FemonTheme[FemonConfig.GetTheme()].clrActiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM)
#define OSDDRAWINFOINACTIVE(label, value) \
- m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), label, femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); \
- m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), value, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font)
+ osdM->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), label, FemonTheme[FemonConfig.GetTheme()].clrInactiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM); \
+ osdM->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), value, FemonTheme[FemonConfig.GetTheme()].clrActiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM)
#define OSDDRAWINFOLINE(label) \
- m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), label, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font)
+ osdM->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), label, FemonTheme[FemonConfig.GetTheme()].clrActiveText, FemonTheme[FemonConfig.GetTheme()].clrBackground, fontM)
#define OSDDRAWINFOTITLEBAR(title) \
- m_Osd->DrawRectangle(0, OSDINFOWIN_Y(offset), OSDWIDTH, OSDINFOWIN_Y(offset) + OSDROWHEIGHT - 1, femonTheme[femonConfig.theme].clrTitleBackground); \
- m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), title, femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font); \
+ osdM->DrawRectangle(0, OSDINFOWIN_Y(offset), OSDWIDTH, OSDINFOWIN_Y(offset) + OSDROWHEIGHT - 1, FemonTheme[FemonConfig.GetTheme()].clrTitleBackground); \
+ osdM->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), title, FemonTheme[FemonConfig.GetTheme()].clrTitleText, FemonTheme[FemonConfig.GetTheme()].clrTitleBackground, fontM); \
if (IS_OSDROUNDING) { \
- m_Osd->DrawEllipse(0, OSDINFOWIN_Y(0), OSDROUNDING, OSDINFOWIN_Y(OSDROUNDING), clrTransparent, -2); \
- m_Osd->DrawEllipse(OSDWIDTH - OSDROUNDING, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDROUNDING), clrTransparent, -1); \
+ osdM->DrawEllipse(0, OSDINFOWIN_Y(0), OSDROUNDING, OSDINFOWIN_Y(OSDROUNDING), clrTransparent, -2); \
+ osdM->DrawEllipse(OSDWIDTH - OSDROUNDING, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDROUNDING), clrTransparent, -1); \
} \
- m_Osd->DrawRectangle(0, OSDINFOWIN_Y(offset) + OSDROWHEIGHT, OSDWIDTH, OSDINFOWIN_Y(offset) + OSDINFOHEIGHT - 1, femonTheme[femonConfig.theme].clrBackground)
+ osdM->DrawRectangle(0, OSDINFOWIN_Y(offset) + OSDROWHEIGHT, OSDWIDTH, OSDINFOWIN_Y(offset) + OSDINFOHEIGHT - 1, FemonTheme[FemonConfig.GetTheme()].clrBackground)
#define OSDDRAWINFOBOTTOMBAR() \
if (IS_OSDROUNDING) { \
- m_Osd->DrawEllipse(0, OSDINFOWIN_Y(OSDINFOHEIGHT) - OSDROUNDING, OSDROUNDING, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -3); \
- m_Osd->DrawEllipse((OSDWIDTH - OSDROUNDING), OSDINFOWIN_Y(OSDINFOHEIGHT) - OSDROUNDING, OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -4); \
+ osdM->DrawEllipse(0, OSDINFOWIN_Y(OSDINFOHEIGHT) - OSDROUNDING, OSDROUNDING, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -3); \
+ osdM->DrawEllipse((OSDWIDTH - OSDROUNDING), OSDINFOWIN_Y(OSDINFOHEIGHT) - OSDROUNDING, OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -4); \
}
#define OSDCLEARINFO() \
- m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT) - 1, clrTransparent)
+ osdM->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT) - 1, clrTransparent)
#ifndef MINFONTSIZE
#define MINFONTSIZE 10
@@ -142,123 +144,123 @@
class cFemonDummyFont : public cFont {
public:
- virtual int Width(uint c) const { return 10; }
- virtual int Width(const char *s) const { return 50; }
+ virtual int Width(uint cP) const { return 10; }
+ virtual int Width(const char *sP) const { return 50; }
virtual int Height(void) const { return 20; }
- virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const {}
- virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const {}
+ virtual void DrawText(cBitmap *bitmapP, int xP, int yP, const char *sP, tColor colorFgP, tColor colorBgP, int widthP) const {}
+ virtual void DrawText(cPixmap *pixmapP, int xP, int yP, const char *sP, tColor colorFgP, tColor colorBgP, int widthP) const {}
};
-cFemonOsd *cFemonOsd::pInstance = NULL;
+cFemonOsd *cFemonOsd::pInstanceS = NULL;
-cFemonOsd *cFemonOsd::Instance(bool create)
+cFemonOsd *cFemonOsd::Instance(bool createP)
{
- debug("%s()\n", __PRETTY_FUNCTION__);
- if ((pInstance == NULL) && create)
+ debug1("%s (%d)", __PRETTY_FUNCTION__, createP);
+ if ((pInstanceS == NULL) && createP)
{
- pInstance = new cFemonOsd();
+ pInstanceS = new cFemonOsd();
}
- return (pInstance);
+ return (pInstanceS);
}
cFemonOsd::cFemonOsd()
: cOsdObject(true), cThread("femon osd"),
- m_Osd(NULL),
- m_Receiver(NULL),
- m_Frontend(-1),
- m_SvdrpFrontend(-1),
- m_SvdrpVideoBitrate(-1),
- m_SvdrpAudioBitrate(-1),
- m_SvdrpPlugin(NULL),
- m_Number(0),
- m_OldNumber(0),
- m_Quality(0),
- m_QualityValid(false),
- m_Strength(0),
- m_StrengthValid(false),
- m_SNR(0),
- m_SNRValid(false),
- m_Signal(0),
- m_SignalValid(false),
- m_BER(0),
- m_BERValid(false),
- m_UNC(0),
- m_UNCValid(false),
- m_FrontendName(""),
- m_FrontendStatusValid(false),
- m_DeviceSource(DEVICESOURCE_DVBAPI),
- m_DisplayMode(femonConfig.displaymode),
- m_OsdWidth(cOsd::OsdWidth() * (100 - femonConfig.downscale) / 100),
- m_OsdHeight(cOsd::OsdHeight() * (100 - femonConfig.downscale) / 100),
- m_OsdLeft(cOsd::OsdLeft() + (cOsd::OsdWidth() * femonConfig.downscale / 200)),
- m_OsdTop(cOsd::OsdTop() + (cOsd::OsdHeight() * femonConfig.downscale / 200)),
- m_InputTime(0),
- m_Sleep(),
- m_Mutex()
+ osdM(NULL),
+ receiverM(NULL),
+ frontendM(-1),
+ svdrpFrontendM(-1),
+ svdrpVideoBitRateM(-1),
+ svdrpAudioBitRateM(-1),
+ svdrpPluginM(NULL),
+ numberM(0),
+ oldNumberM(0),
+ qualityM(0),
+ qualityValidM(false),
+ strengthM(0),
+ strengthValidM(false),
+ snrM(0),
+ snrValidM(false),
+ signalM(0),
+ signalValidM(false),
+ berM(0),
+ berValidM(false),
+ uncM(0),
+ uncValidM(false),
+ frontendNameM(""),
+ frontendStatusValidM(false),
+ deviceSourceM(DEVICESOURCE_DVBAPI),
+ displayModeM(FemonConfig.GetDisplayMode()),
+ osdWidthM(cOsd::OsdWidth() * (100 - FemonConfig.GetDownscale()) / 100),
+ osdHeightM(cOsd::OsdHeight() * (100 - FemonConfig.GetDownscale()) / 100),
+ osdLeftM(cOsd::OsdLeft() + (cOsd::OsdWidth() * FemonConfig.GetDownscale() / 200)),
+ osdTopM(cOsd::OsdTop() + (cOsd::OsdHeight() * FemonConfig.GetDownscale() / 200)),
+ inputTimeM(0),
+ sleepM(),
+ mutexM()
{
int tmp;
- debug("%s()\n", __PRETTY_FUNCTION__);
- memset(&m_FrontendStatus, 0, sizeof(m_FrontendStatus));
- memset(&m_FrontendInfo, 0, sizeof(m_FrontendInfo));
- m_SvdrpConnection.handle = -1;
+ debug1("%s", __PRETTY_FUNCTION__);
+ memset(&frontendStatusM, 0, sizeof(frontendStatusM));
+ memset(&frontendInfoM, 0, sizeof(frontendInfoM));
+ svdrpConnectionM.handle = -1;
femonSymbols.Refresh();
- 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.");
+ fontM = cFont::CreateFont(Setup.FontSml, constrain(Setup.FontSmlSize, MINFONTSIZE, MAXFONTSIZE));
+ if (!fontM || !fontM->Height()) {
+ fontM = new cFemonDummyFont;
+ error("%s Cannot create required font", __PRETTY_FUNCTION__);
}
tmp = 5 * OSDSYMBOL(SYMBOL_LOCK).Width() + 6 * OSDSPACING;
if (OSDWIDTH < tmp) {
- error("cFemonOsd::cFemonOsd() OSD width (%d) smaller than required (%d).", OSDWIDTH, tmp);
+ error("%s OSD width (%d) smaller than required (%d).", __PRETTY_FUNCTION__, OSDWIDTH, tmp);
OSDWIDTH = tmp;
}
tmp = OSDINFOHEIGHT + OSDROWHEIGHT + OSDSTATUSHEIGHT;
if (OSDHEIGHT < tmp) {
- error("cFemonOsd::cFemonOsd() OSD height (%d) smaller than required (%d).", OSDHEIGHT, tmp);
+ error("%s OSD height (%d) smaller than required (%d).", __PRETTY_FUNCTION__, OSDHEIGHT, tmp);
OSDHEIGHT = tmp;
}
}
cFemonOsd::~cFemonOsd(void)
{
- debug("%s()\n", __PRETTY_FUNCTION__);
- m_Sleep.Signal();
+ debug1("%s", __PRETTY_FUNCTION__);
+ sleepM.Signal();
if (Running())
Cancel(3);
- if (m_SvdrpConnection.handle >= 0) {
- m_SvdrpPlugin = cPluginManager::GetPlugin(SVDRPPLUGIN);
- if (m_SvdrpPlugin)
- m_SvdrpPlugin->Service("SvdrpConnection-v1.0", &m_SvdrpConnection);
+ if (svdrpConnectionM.handle >= 0) {
+ svdrpPluginM = cPluginManager::GetPlugin(SVDRPPLUGIN);
+ if (svdrpPluginM)
+ svdrpPluginM->Service("SvdrpConnection-v1.0", &svdrpConnectionM);
}
- if (m_Receiver) {
- m_Receiver->Deactivate();
- DELETENULL(m_Receiver);
+ if (receiverM) {
+ receiverM->Deactivate();
+ DELETENULL(receiverM);
}
- if (m_Osd)
- DELETENULL(m_Osd);
- if (m_Font)
- DELETENULL(m_Font);
- if (m_Frontend >= 0) {
- close(m_Frontend);
- m_Frontend = -1;
+ if (osdM)
+ DELETENULL(osdM);
+ if (fontM)
+ DELETENULL(fontM);
+ if (frontendM >= 0) {
+ close(frontendM);
+ frontendM = -1;
}
- pInstance = NULL;
+ pInstanceS = NULL;
}
void cFemonOsd::DrawStatusWindow(void)
{
- cMutexLock lock(&m_Mutex);
+ cMutexLock lock(&mutexM);
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
- if (m_Osd && channel) {
+ if (osdM && channel) {
cBitmap *bm = NULL;
int offset = 0;
int x = OSDWIDTH - OSDROUNDING;
int y = 0;
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
- OSDDRAWSTATUSTITLEBAR(*cString::sprintf("%d%s %s", m_Number ? m_Number : channel->Number(), m_Number ? "-" : "", channel->ShortName(true)));
- if (m_SvdrpFrontend >= 0) {
+ OSDDRAWSTATUSTITLEBAR(*cString::sprintf("%d%s %s", numberM ? numberM : channel->Number(), numberM ? "-" : "", channel->ShortName(true)));
+ if (svdrpFrontendM >= 0) {
bm = &OSDSYMBOL(SYMBOL_SVDRP);
OSDDRAWSTATUSBM(OSDSPACING);
}
@@ -296,36 +298,36 @@ void cFemonOsd::DrawStatusWindow(void)
}
OSDDRAWSTATUSBM(0);
}
- else if (m_Receiver && m_Receiver->AC3Valid() && IS_DOLBY_TRACK(track)) {
- if (m_Receiver->AC3_5_1()) bm = &OSDSYMBOL(SYMBOL_DD51);
- else if (m_Receiver->AC3_2_0()) bm = &OSDSYMBOL(SYMBOL_DD20);
+ else if (receiverM && receiverM->AC3Valid() && IS_DOLBY_TRACK(track)) {
+ if (receiverM->AC3_5_1()) bm = &OSDSYMBOL(SYMBOL_DD51);
+ else if (receiverM->AC3_2_0()) bm = &OSDSYMBOL(SYMBOL_DD20);
else bm = &OSDSYMBOL(SYMBOL_DD);
OSDDRAWSTATUSBM(OSDSPACING);
}
- if (m_Receiver) {
- if (IS_OSDRESOLUTION(m_Receiver->VideoVerticalSize(), 1080)) {
- switch (m_Receiver->VideoScan()) {
+ if (receiverM) {
+ if (IS_OSDRESOLUTION(receiverM->VideoVerticalSize(), 1080)) {
+ switch (receiverM->VideoScan()) {
case VIDEO_SCAN_INTERLACED: bm = &OSDSYMBOL(SYMBOL_FORMAT_1080i); break;
case VIDEO_SCAN_PROGRESSIVE: bm = &OSDSYMBOL(SYMBOL_FORMAT_1080p); break;
default: bm = &OSDSYMBOL(SYMBOL_FORMAT_1080); break;
}
}
- else if (IS_OSDRESOLUTION(m_Receiver->VideoVerticalSize(), 720)) {
- switch (m_Receiver->VideoScan()) {
+ else if (IS_OSDRESOLUTION(receiverM->VideoVerticalSize(), 720)) {
+ switch (receiverM->VideoScan()) {
case VIDEO_SCAN_INTERLACED: bm = &OSDSYMBOL(SYMBOL_FORMAT_720i); break;
case VIDEO_SCAN_PROGRESSIVE: bm = &OSDSYMBOL(SYMBOL_FORMAT_720p); break;
default: bm = &OSDSYMBOL(SYMBOL_FORMAT_720); break;
}
}
- else if (IS_OSDRESOLUTION(m_Receiver->VideoVerticalSize(), 576)) {
- switch (m_Receiver->VideoScan()) {
+ else if (IS_OSDRESOLUTION(receiverM->VideoVerticalSize(), 576)) {
+ switch (receiverM->VideoScan()) {
case VIDEO_SCAN_INTERLACED: bm = &OSDSYMBOL(SYMBOL_FORMAT_576i); break;
case VIDEO_SCAN_PROGRESSIVE: bm = &OSDSYMBOL(SYMBOL_FORMAT_576p); break;
default: bm = &OSDSYMBOL(SYMBOL_FORMAT_576); break;
}
}
- else if (IS_OSDRESOLUTION(m_Receiver->VideoVerticalSize(), 480)) {
- switch (m_Receiver->VideoScan()) {
+ else if (IS_OSDRESOLUTION(receiverM->VideoVerticalSize(), 480)) {
+ switch (receiverM->VideoScan()) {
case VIDEO_SCAN_INTERLACED: bm = &OSDSYMBOL(SYMBOL_FORMAT_480i); break;
case VIDEO_SCAN_PROGRESSIVE: bm = &OSDSYMBOL(SYMBOL_FORMAT_480p); break;
default: bm = &OSDSYMBOL(SYMBOL_FORMAT_480); break;
@@ -334,19 +336,19 @@ void cFemonOsd::DrawStatusWindow(void)
else
bm = NULL;
OSDDRAWSTATUSBM(OSDSPACING);
- switch (m_Receiver->VideoCodec()) {
+ switch (receiverM->VideoCodec()) {
case VIDEO_CODEC_MPEG2: bm = &OSDSYMBOL(SYMBOL_MPEG2); break;
case VIDEO_CODEC_H264: bm = &OSDSYMBOL(SYMBOL_H264); break;
default: bm = NULL; break;
}
OSDDRAWSTATUSBM(OSDSPACING);
- switch (m_Receiver->VideoFormat()) {
+ switch (receiverM->VideoFormat()) {
case VIDEO_FORMAT_PAL: bm = &OSDSYMBOL(SYMBOL_PAL); break;
case VIDEO_FORMAT_NTSC: bm = &OSDSYMBOL(SYMBOL_NTSC); break;
default: bm = NULL; break;
}
OSDDRAWSTATUSBM(OSDSPACING);
- switch (m_Receiver->VideoAspectRatio()) {
+ switch (receiverM->VideoAspectRatio()) {
case VIDEO_ASPECT_RATIO_1_1: bm = &OSDSYMBOL(SYMBOL_AR_1_1); break;
case VIDEO_ASPECT_RATIO_4_3: bm = &OSDSYMBOL(SYMBOL_AR_4_3); break;
case VIDEO_ASPECT_RATIO_16_9: bm = &OSDSYMBOL(SYMBOL_AR_16_9); break;
@@ -360,24 +362,24 @@ void cFemonOsd::DrawStatusWindow(void)
OSDDRAWSTATUSBM(OSDSPACING);
}
offset += OSDROWHEIGHT;
- if (m_StrengthValid)
- OSDDRAWSTATUSBAR(m_Strength);
+ if (strengthValidM)
+ OSDDRAWSTATUSBAR(strengthM);
offset += OSDROWHEIGHT;
- if (m_QualityValid)
- OSDDRAWSTATUSBAR(m_Quality);
+ if (qualityValidM)
+ OSDDRAWSTATUSBAR(qualityM);
offset += OSDROWHEIGHT;
- OSDDRAWSTATUSVALUES("STR:", m_SignalValid ? *cString::sprintf("%04x", m_Signal) : "", m_SignalValid ? *cString::sprintf("(%2d%%)", m_Signal / 655) : "",
- "BER:", m_BERValid ? *cString::sprintf("%08x", m_BER) : "", *cString::sprintf("%s:", tr("Video")),
- *getBitrateMbits(m_Receiver ? m_Receiver->VideoBitrate() : (m_SvdrpFrontend >= 0 ? m_SvdrpVideoBitrate : -1.0)));
+ OSDDRAWSTATUSVALUES("STR:", signalValidM ? *cString::sprintf("%04x", signalM) : "", signalValidM ? *cString::sprintf("(%2d%%)", signalM / 655) : "",
+ "BER:", berValidM ? *cString::sprintf("%08x", berM) : "", *cString::sprintf("%s:", tr("Video")),
+ *getBitrateMbits(receiverM ? receiverM->VideoBitrate() : (svdrpFrontendM >= 0 ? svdrpVideoBitRateM : -1.0)));
offset += OSDROWHEIGHT;
- OSDDRAWSTATUSVALUES("SNR:", m_SNRValid ? *cString::sprintf("%04x", m_SNR) : "", m_SNRValid ? *cString::sprintf("(%2d%%)", m_SNR / 655) : "",
- "UNC:", m_UNCValid ? *cString::sprintf("%08x", m_UNC) : "",
- *cString::sprintf("%s:", (m_Receiver && m_Receiver->AC3Valid() && IS_DOLBY_TRACK(track)) ? tr("AC-3") : tr("Audio")),
- *getBitrateKbits(m_Receiver ? ((m_Receiver->AC3Valid() && IS_DOLBY_TRACK(track)) ? m_Receiver->AC3Bitrate() : m_Receiver->AudioBitrate()) : (m_SvdrpFrontend >= 0 ? m_SvdrpAudioBitrate : -1.0)));
+ OSDDRAWSTATUSVALUES("SNR:", snrValidM ? *cString::sprintf("%04x", snrM) : "", snrValidM ? *cString::sprintf("(%2d%%)", snrM / 655) : "",
+ "UNC:", uncValidM ? *cString::sprintf("%08x", uncM) : "",
+ *cString::sprintf("%s:", (receiverM && receiverM->AC3Valid() && IS_DOLBY_TRACK(track)) ? tr("AC-3") : tr("Audio")),
+ *getBitrateKbits(receiverM ? ((receiverM->AC3Valid() && IS_DOLBY_TRACK(track)) ? receiverM->AC3Bitrate() : receiverM->AudioBitrate()) : (svdrpFrontendM >= 0 ? svdrpAudioBitRateM : -1.0)));
offset += OSDROWHEIGHT;
x = OSDSYMBOL(SYMBOL_LOCK).Width();
y = (OSDROWHEIGHT - OSDSYMBOL(SYMBOL_LOCK).Height()) / 2;
- if (m_FrontendStatusValid) {
+ if (frontendStatusValidM) {
OSDDRAWSTATUSFRONTEND(1, OSDSYMBOL(SYMBOL_LOCK), FE_HAS_LOCK);
OSDDRAWSTATUSFRONTEND(2, OSDSYMBOL(SYMBOL_SIGNAL), FE_HAS_SIGNAL);
OSDDRAWSTATUSFRONTEND(3, OSDSYMBOL(SYMBOL_CARRIER), FE_HAS_CARRIER);
@@ -385,20 +387,20 @@ void cFemonOsd::DrawStatusWindow(void)
OSDDRAWSTATUSFRONTEND(5, OSDSYMBOL(SYMBOL_SYNC), FE_HAS_SYNC);
}
OSDDRAWSTATUSBOTTOMBAR();
- m_Osd->Flush();
+ osdM->Flush();
}
}
void cFemonOsd::DrawInfoWindow(void)
{
- cMutexLock lock(&m_Mutex);
+ cMutexLock lock(&mutexM);
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
- if (m_Osd && channel) {
+ if (osdM && channel) {
int offset = 0;
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
- switch (m_DisplayMode) {
+ switch (displayModeM) {
case eFemonModeTransponder:
OSDDRAWINFOTITLEBAR(tr("Transponder Information"));
offset += OSDROWHEIGHT;
@@ -422,7 +424,7 @@ void cFemonOsd::DrawInfoWindow(void)
switch (channel->Source() & cSource::st_Mask) {
case cSource::stSat: {
cDvbTransponderParameters dtp(channel->Parameters());
- OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getSatelliteSystem(dtp.System()), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), *m_FrontendName));
+ OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getSatelliteSystem(dtp.System()), (svdrpFrontendM >= 0) ? svdrpFrontendM : cDevice::ActualDevice()->CardIndex(), *frontendNameM));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
OSDDRAWINFORIGHT(trVDR("Source"), *cSource::ToString(channel->Source()));
@@ -444,7 +446,7 @@ void cFemonOsd::DrawInfoWindow(void)
case cSource::stCable: {
cDvbTransponderParameters dtp(channel->Parameters());
- OSDDRAWINFOLINE(*cString::sprintf("DVB-C #%d - %s", (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), *m_FrontendName));
+ OSDDRAWINFOLINE(*cString::sprintf("DVB-C #%d - %s", (svdrpFrontendM >= 0) ? svdrpFrontendM : cDevice::ActualDevice()->CardIndex(), *frontendNameM));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
OSDDRAWINFORIGHT(trVDR("Source"), *cSource::ToString(channel->Source()));
@@ -459,7 +461,7 @@ void cFemonOsd::DrawInfoWindow(void)
case cSource::stTerr: {
cDvbTransponderParameters dtp(channel->Parameters());
- OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getTerrestrialSystem(dtp.System()), (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), *m_FrontendName));
+ OSDDRAWINFOLINE(*cString::sprintf("%s #%d - %s", *getTerrestrialSystem(dtp.System()), (svdrpFrontendM >= 0) ? svdrpFrontendM : cDevice::ActualDevice()->CardIndex(), *frontendNameM));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
OSDDRAWINFORIGHT(trVDR("Transmission"), *getTransmission(dtp.Transmission()));
@@ -484,9 +486,9 @@ void cFemonOsd::DrawInfoWindow(void)
break;
case stIptv: {
- OSDDRAWINFOLINE(*cString::sprintf("IPTV #%d - %s", (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), *m_FrontendName));
+ OSDDRAWINFOLINE(*cString::sprintf("IPTV #%d - %s", (svdrpFrontendM >= 0) ? svdrpFrontendM : cDevice::ActualDevice()->CardIndex(), *frontendNameM));
offset += OSDROWHEIGHT;
- if (m_SvdrpFrontend < 0) {
+ if (svdrpFrontendM < 0) {
cPlugin *p;
IptvService_v1_0 data;
data.cardIndex = cDevice::ActualDevice()->CardIndex();
@@ -511,53 +513,53 @@ void cFemonOsd::DrawInfoWindow(void)
offset += OSDROWHEIGHT;
OSDDRAWINFOACTIVE( tr("Video Stream"), *getVideoStream(channel->Vpid()));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Codec"), *getVideoCodec(m_Receiver ? m_Receiver->VideoCodec() : VIDEO_CODEC_INVALID));
+ OSDDRAWINFOINACTIVE(tr("Codec"), *getVideoCodec(receiverM ? receiverM->VideoCodec() : VIDEO_CODEC_INVALID));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Bitrate"), *getVideoBitrate(m_Receiver ? m_Receiver->VideoBitrate() : 0, m_Receiver ? m_Receiver->VideoStreamBitrate() : 0));
+ OSDDRAWINFOINACTIVE(tr("Bitrate"), *getVideoBitrate(receiverM ? receiverM->VideoBitrate() : 0, receiverM ? receiverM->VideoStreamBitrate() : 0));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Aspect Ratio"), *getAspectRatio(m_Receiver ? m_Receiver->VideoAspectRatio() : VIDEO_ASPECT_RATIO_INVALID));
+ OSDDRAWINFOINACTIVE(tr("Aspect Ratio"), *getAspectRatio(receiverM ? receiverM->VideoAspectRatio() : VIDEO_ASPECT_RATIO_INVALID));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Frame Rate"), *getFrameRate(m_Receiver ? m_Receiver->VideoFrameRate() : 0));
+ OSDDRAWINFOINACTIVE(tr("Frame Rate"), *getFrameRate(receiverM ? receiverM->VideoFrameRate() : 0));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Video Format"), *getVideoFormat(m_Receiver ? m_Receiver->VideoFormat() : VIDEO_CODEC_INVALID));
+ OSDDRAWINFOINACTIVE(tr("Video Format"), *getVideoFormat(receiverM ? receiverM->VideoFormat() : VIDEO_CODEC_INVALID));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Resolution"), *getResolution(m_Receiver ? m_Receiver->VideoHorizontalSize() : 0, m_Receiver ? m_Receiver->VideoVerticalSize() : 0, m_Receiver ? m_Receiver->VideoScan() : VIDEO_SCAN_INVALID));
+ OSDDRAWINFOINACTIVE(tr("Resolution"), *getResolution(receiverM ? receiverM->VideoHorizontalSize() : 0, receiverM ? receiverM->VideoVerticalSize() : 0, receiverM ? receiverM->VideoScan() : VIDEO_SCAN_INVALID));
offset += OSDROWHEIGHT;
OSDDRAWINFOACTIVE( tr("Audio Stream"), *getAudioStream(track, channel));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Codec"), *getAudioCodec(m_Receiver ? m_Receiver->AudioCodec() : AUDIO_CODEC_INVALID));
+ OSDDRAWINFOINACTIVE(tr("Codec"), *getAudioCodec(receiverM ? receiverM->AudioCodec() : AUDIO_CODEC_INVALID));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Channel Mode"), *getAudioChannelMode(m_Receiver ? m_Receiver->AudioChannelMode() : AUDIO_CHANNEL_MODE_INVALID));
+ OSDDRAWINFOINACTIVE(tr("Channel Mode"), *getAudioChannelMode(receiverM ? receiverM->AudioChannelMode() : AUDIO_CHANNEL_MODE_INVALID));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Bitrate"), *getAudioBitrate(m_Receiver ? m_Receiver->AudioBitrate() : 0, m_Receiver ? m_Receiver->AudioStreamBitrate() : 0));
+ OSDDRAWINFOINACTIVE(tr("Bitrate"), *getAudioBitrate(receiverM ? receiverM->AudioBitrate() : 0, receiverM ? receiverM->AudioStreamBitrate() : 0));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Sampling Frequency"), *getAudioSamplingFreq(m_Receiver ? m_Receiver->AudioSamplingFreq() : AUDIO_SAMPLING_FREQUENCY_INVALID));
+ OSDDRAWINFOINACTIVE(tr("Sampling Frequency"), *getAudioSamplingFreq(receiverM ? receiverM->AudioSamplingFreq() : AUDIO_SAMPLING_FREQUENCY_INVALID));
OSDDRAWINFOBOTTOMBAR();
break;
case eFemonModeAC3:
OSDDRAWINFOTITLEBAR(tr("Stream Information"));
- if (m_Receiver && m_Receiver->AC3Valid() && IS_DOLBY_TRACK(track)) {
+ if (receiverM && receiverM->AC3Valid() && IS_DOLBY_TRACK(track)) {
offset += OSDROWHEIGHT;
OSDDRAWINFOACTIVE( tr("AC-3 Stream"), *getAC3Stream(track, channel));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Bitrate"), *getAudioBitrate(m_Receiver->AC3Bitrate(), m_Receiver->AC3StreamBitrate()));
+ OSDDRAWINFOINACTIVE(tr("Bitrate"), *getAudioBitrate(receiverM->AC3Bitrate(), receiverM->AC3StreamBitrate()));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Sampling Frequency"), *getAudioSamplingFreq(m_Receiver->AC3SamplingFreq()));
+ OSDDRAWINFOINACTIVE(tr("Sampling Frequency"), *getAudioSamplingFreq(receiverM->AC3SamplingFreq()));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Bit Stream Mode"), *getAC3BitStreamMode(m_Receiver->AC3BitStreamMode(), m_Receiver->AC3AudioCodingMode()));
+ OSDDRAWINFOINACTIVE(tr("Bit Stream Mode"), *getAC3BitStreamMode(receiverM->AC3BitStreamMode(), receiverM->AC3AudioCodingMode()));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Audio Coding Mode"), *getAC3AudioCodingMode(m_Receiver->AC3AudioCodingMode(), m_Receiver->AC3BitStreamMode()));
+ OSDDRAWINFOINACTIVE(tr("Audio Coding Mode"), *getAC3AudioCodingMode(receiverM->AC3AudioCodingMode(), receiverM->AC3BitStreamMode()));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Center Mix Level"), *getAC3CenterMixLevel(m_Receiver->AC3CenterMixLevel()));
+ OSDDRAWINFOINACTIVE(tr("Center Mix Level"), *getAC3CenterMixLevel(receiverM->AC3CenterMixLevel()));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Surround Mix Level"), *getAC3SurroundMixLevel(m_Receiver->AC3SurroundMixLevel()));
+ OSDDRAWINFOINACTIVE(tr("Surround Mix Level"), *getAC3SurroundMixLevel(receiverM->AC3SurroundMixLevel()));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Dolby Surround Mode"), *getAC3DolbySurroundMode(m_Receiver->AC3DolbySurroundMode()));
+ OSDDRAWINFOINACTIVE(tr("Dolby Surround Mode"), *getAC3DolbySurroundMode(receiverM->AC3DolbySurroundMode()));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Low Frequency Effects"), *cString::sprintf("%s", m_Receiver->AC3Lfe() ? trVDR("on") : trVDR("off")));
+ OSDDRAWINFOINACTIVE(tr("Low Frequency Effects"), *cString::sprintf("%s", receiverM->AC3Lfe() ? trVDR("on") : trVDR("off")));
offset += OSDROWHEIGHT;
- OSDDRAWINFOINACTIVE(tr("Dialogue Normalization"), *getAC3DialogLevel(m_Receiver->AC3DialogLevel()));
+ OSDDRAWINFOINACTIVE(tr("Dialogue Normalization"), *getAC3DialogLevel(receiverM->AC3DialogLevel()));
}
OSDDRAWINFOBOTTOMBAR();
break;
@@ -566,139 +568,139 @@ void cFemonOsd::DrawInfoWindow(void)
OSDCLEARINFO();
break;
}
- m_Osd->Flush();
+ osdM->Flush();
}
}
void cFemonOsd::Action(void)
{
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s", __PRETTY_FUNCTION__);
cTimeMs t;
SvdrpCommand_v1_0 cmd;
cmd.command = cString::sprintf("PLUG %s INFO\r\n", PLUGIN_NAME_I18N);
while (Running()) {
t.Set(0);
- m_SvdrpFrontend = -1;
- m_SvdrpVideoBitrate = -1.0;
- m_SvdrpAudioBitrate = -1.0;
- switch (m_DeviceSource) {
+ svdrpFrontendM = -1;
+ svdrpVideoBitRateM = -1.0;
+ svdrpAudioBitRateM = -1.0;
+ switch (deviceSourceM) {
case DEVICESOURCE_PVRINPUT:
- m_Quality = cDevice::ActualDevice()->SignalStrength();
- 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);
- m_SignalValid = m_StrengthValid;
- m_SNR = 0;
- m_SNRValid = false;
- m_BER = 0;
- m_BERValid = false;
- m_UNC = 0;
- m_UNCValid = false;
+ qualityM = cDevice::ActualDevice()->SignalStrength();
+ qualityValidM = (qualityM >= 0);
+ strengthM = cDevice::ActualDevice()->SignalStrength();
+ strengthValidM = (strengthM >= 0);
+ frontendNameM = cDevice::ActualDevice()->DeviceName();
+ frontendStatusM = (fe_status_t)(strengthValidM ? (FE_HAS_LOCK | FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC) : 0);
+ frontendStatusValidM = strengthValidM;
+ signalM = uint16_t(strengthM * 0xFFFF / 100);
+ signalValidM = strengthValidM;
+ snrM = 0;
+ snrValidM = false;
+ berM = 0;
+ berValidM = false;
+ uncM = 0;
+ uncValidM = false;
break;
case DEVICESOURCE_IPTV:
- m_Quality = cDevice::ActualDevice()->SignalQuality();
- 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);
- m_SignalValid = m_StrengthValid;
- m_SNR = uint16_t(m_Quality * 0xFFFF / 100);
- m_SNRValid = m_QualityValid;
- m_BER = 0;
- m_BERValid = false;
- m_UNC = 0;
- m_UNCValid = false;
+ qualityM = cDevice::ActualDevice()->SignalQuality();
+ qualityValidM = (qualityM >= 0);
+ strengthM = cDevice::ActualDevice()->SignalStrength();
+ strengthValidM = (strengthM >= 0);
+ frontendNameM = cDevice::ActualDevice()->DeviceName();
+ frontendStatusM = (fe_status_t)(strengthValidM ? (FE_HAS_LOCK | FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC) : 0);
+ frontendStatusValidM = strengthValidM;
+ signalM = uint16_t(strengthM * 0xFFFF / 100);
+ signalValidM = strengthValidM;
+ snrM = uint16_t(qualityM * 0xFFFF / 100);
+ snrValidM = qualityValidM;
+ berM = 0;
+ berValidM = false;
+ uncM = 0;
+ uncValidM = false;
break;
default:
case DEVICESOURCE_DVBAPI:
- if (m_Frontend != -1) {
- m_Quality = cDevice::ActualDevice()->SignalQuality();
- 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);
- m_BERValid = (ioctl(m_Frontend, FE_READ_BER, &m_BER) >= 0);
- m_UNCValid = (ioctl(m_Frontend, FE_READ_UNCORRECTED_BLOCKS, &m_UNC) >= 0);
+ if (frontendM != -1) {
+ qualityM = cDevice::ActualDevice()->SignalQuality();
+ qualityValidM = (qualityM >= 0);
+ strengthM = cDevice::ActualDevice()->SignalStrength();
+ strengthValidM = (strengthM >= 0);
+ frontendNameM = cDevice::ActualDevice()->DeviceName();
+ frontendStatusValidM = (ioctl(frontendM, FE_READ_STATUS, &frontendStatusM) >= 0);
+ signalValidM = (ioctl(frontendM, FE_READ_SIGNAL_STRENGTH, &signalM) >= 0);
+ snrValidM = (ioctl(frontendM, FE_READ_SNR, &snrM) >= 0);
+ berValidM = (ioctl(frontendM, FE_READ_BER, &berM) >= 0);
+ uncValidM = (ioctl(frontendM, FE_READ_UNCORRECTED_BLOCKS, &uncM) >= 0);
}
else if (strstr(*cDevice::ActualDevice()->DeviceType(), SATIP_DEVICE)) {
- m_Quality = cDevice::ActualDevice()->SignalQuality();
- 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)(cDevice::ActualDevice()->HasLock() ? (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);
- m_SignalValid = m_StrengthValid;
- m_SNR = uint16_t(m_Quality * 0xFFFF / 100);
- m_SNRValid = m_QualityValid;
- m_BER = 0;
- m_BERValid = false;
- m_UNC = 0;
- m_UNCValid = false;
+ qualityM = cDevice::ActualDevice()->SignalQuality();
+ qualityValidM = (qualityM >= 0);
+ strengthM = cDevice::ActualDevice()->SignalStrength();
+ strengthValidM = (strengthM >= 0);
+ frontendNameM = cDevice::ActualDevice()->DeviceName();
+ frontendStatusM = (fe_status_t)(cDevice::ActualDevice()->HasLock() ? (FE_HAS_LOCK | FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC) : 0);
+ frontendStatusValidM = strengthValidM;
+ signalM = uint16_t(strengthM * 0xFFFF / 100);
+ signalValidM = strengthValidM;
+ snrM = uint16_t(qualityM * 0xFFFF / 100);
+ snrValidM = qualityValidM;
+ berM = 0;
+ berValidM = false;
+ uncM = 0;
+ uncValidM = false;
}
- else if (m_SvdrpConnection.handle >= 0) {
- cmd.handle = m_SvdrpConnection.handle;
- m_SvdrpPlugin->Service("SvdrpCommand-v1.0", &cmd);
+ else if (svdrpConnectionM.handle >= 0) {
+ cmd.handle = svdrpConnectionM.handle;
+ svdrpPluginM->Service("SvdrpCommand-v1.0", &cmd);
if (cmd.responseCode == 900) {
- m_StrengthValid = false;
- m_QualityValid = false;
- m_FrontendStatusValid = false;
- m_SignalValid = false;
- m_SNRValid = false;
- m_BERValid = false;
- m_UNCValid = false;
+ strengthValidM = false;
+ qualityValidM = false;
+ frontendStatusValidM = false;
+ signalValidM = false;
+ snrValidM = false;
+ berValidM = false;
+ uncValidM = false;
for (cLine *line = cmd.reply.First(); line; line = cmd.reply.Next(line)) {
const char *s = line->Text();
if (!strncasecmp(s, "CARD:", 5))
- m_SvdrpFrontend = (int)strtol(s + 5, NULL, 10);
+ svdrpFrontendM = (int)strtol(s + 5, NULL, 10);
else if (!strncasecmp(s, "STRG:", 5)) {
- m_Strength = (int)strtol(s + 5, NULL, 10);
- m_StrengthValid = (m_Strength >= 0);
+ strengthM = (int)strtol(s + 5, NULL, 10);
+ strengthValidM = (strengthM >= 0);
}
else if (!strncasecmp(s, "QUAL:", 5)) {
- m_Quality = (int)strtol(s + 5, NULL, 10);
- m_QualityValid = (m_Quality >= 0);
+ qualityM = (int)strtol(s + 5, NULL, 10);
+ qualityValidM = (qualityM >= 0);
}
else if (!strncasecmp(s, "TYPE:", 5))
- m_FrontendInfo.type = (fe_type_t)strtol(s + 5, NULL, 10);
+ frontendInfoM.type = (fe_type_t)strtol(s + 5, NULL, 10);
else if (!strncasecmp(s, "NAME:", 5)) {
- m_FrontendName = s + 5;
+ frontendNameM = s + 5;
}
else if (!strncasecmp(s, "STAT:", 5)) {
- m_FrontendStatus = (fe_status_t)strtol(s + 5, NULL, 16);
- m_FrontendStatusValid = true;
+ frontendStatusM = (fe_status_t)strtol(s + 5, NULL, 16);
+ frontendStatusValidM = true;
}
else if (!strncasecmp(s, "SGNL:", 5)) {
- m_Signal = (uint16_t)strtol(s + 5, NULL, 16);
- m_SignalValid = true;
+ signalM = (uint16_t)strtol(s + 5, NULL, 16);
+ signalValidM = true;
}
else if (!strncasecmp(s, "SNRA:", 5)) {
- m_SNR = (uint16_t)strtol(s + 5, NULL, 16);
- m_SNRValid = true;
+ snrM = (uint16_t)strtol(s + 5, NULL, 16);
+ snrValidM = true;
}
else if (!strncasecmp(s, "BERA:", 5)) {
- m_BER = (uint32_t)strtol(s + 5, NULL, 16);
- m_BERValid = true;
+ berM = (uint32_t)strtol(s + 5, NULL, 16);
+ berValidM = true;
}
else if (!strncasecmp(s, "UNCB:", 5)) {
- m_UNC = (uint32_t)strtol(s + 5, NULL, 16);
- m_UNCValid = true;
+ uncM = (uint32_t)strtol(s + 5, NULL, 16);
+ uncValidM = true;
}
else if (!strncasecmp(s, "VIBR:", 5))
- m_SvdrpVideoBitrate = (double)strtol(s + 5, NULL, 10);
+ svdrpVideoBitRateM = (double)strtol(s + 5, NULL, 10);
else if (!strncasecmp(s, "AUBR:", 5))
- m_SvdrpAudioBitrate = (double)strtol(s + 5, NULL, 10);
+ svdrpAudioBitRateM = (double)strtol(s + 5, NULL, 10);
}
}
}
@@ -706,163 +708,163 @@ void cFemonOsd::Action(void)
}
DrawInfoWindow();
DrawStatusWindow();
- m_Sleep.Wait(max((int)(100 * femonConfig.updateinterval - t.Elapsed()), 3));
+ sleepM.Wait(max((int)(100 * FemonConfig.GetUpdateInterval() - t.Elapsed()), 3));
}
}
void cFemonOsd::Show(void)
{
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s", __PRETTY_FUNCTION__);
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
- m_DeviceSource = DEVICESOURCE_DVBAPI;
+ deviceSourceM = DEVICESOURCE_DVBAPI;
if (channel) {
if (channel->IsSourceType('I'))
- m_DeviceSource = DEVICESOURCE_IPTV;
+ deviceSourceM = DEVICESOURCE_IPTV;
else if (channel->IsSourceType('V'))
- m_DeviceSource = DEVICESOURCE_PVRINPUT;
+ deviceSourceM = DEVICESOURCE_PVRINPUT;
}
- if (m_DeviceSource == DEVICESOURCE_DVBAPI) {
+ if (deviceSourceM == DEVICESOURCE_DVBAPI) {
if (!strstr(*cDevice::ActualDevice()->DeviceType(), SATIP_DEVICE)) {
cDvbDevice *dev = getDvbDevice(cDevice::ActualDevice());
- m_Frontend = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1;
- if (m_Frontend >= 0) {
- if (ioctl(m_Frontend, FE_GET_INFO, &m_FrontendInfo) < 0) {
- if (!femonConfig.usesvdrp)
- error("cFemonOsd::Show() cannot read frontend info.");
- close(m_Frontend);
- m_Frontend = -1;
- memset(&m_FrontendInfo, 0, sizeof(m_FrontendInfo));
+ frontendM = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1;
+ if (frontendM >= 0) {
+ if (ioctl(frontendM, FE_GET_INFO, &frontendInfoM) < 0) {
+ if (!FemonConfig.GetUseSvdrp())
+ error("%s Cannot read frontend info", __PRETTY_FUNCTION__);
+ close(frontendM);
+ frontendM = -1;
+ memset(&frontendInfoM, 0, sizeof(frontendInfoM));
return;
}
}
- else if (femonConfig.usesvdrp) {
+ else if (FemonConfig.GetUseSvdrp()) {
if (!SvdrpConnect() || !SvdrpTune())
return;
}
else {
- error("cFemonOsd::Show() cannot open frontend device.");
+ error("%s Cannot open frontend device", __PRETTY_FUNCTION__);
return;
}
}
}
else
- m_Frontend = -1;
+ frontendM = -1;
- m_Osd = cOsdProvider::NewOsd(m_OsdLeft, m_OsdTop);
- if (m_Osd) {
+ osdM = cOsdProvider::NewOsd(osdLeftM, osdTopM);
+ if (osdM) {
tArea Areas1[] = { { 0, 0, OSDWIDTH - 1, OSDHEIGHT - 1, 8 } };
- if (Setup.AntiAlias && m_Osd->CanHandleAreas(Areas1, sizeof(Areas1) / sizeof(tArea)) == oeOk) {
- m_Osd->SetAreas(Areas1, sizeof(Areas1) / sizeof(tArea));
+ if (Setup.AntiAlias && osdM->CanHandleAreas(Areas1, sizeof(Areas1) / sizeof(tArea)) == oeOk) {
+ osdM->SetAreas(Areas1, sizeof(Areas1) / sizeof(tArea));
}
else {
- tArea Areas2[] = { { 0, OSDSTATUSWIN_Y(0), OSDWIDTH - 1, OSDSTATUSWIN_Y(0) + OSDSTATUSHEIGHT - 1, femonTheme[femonConfig.theme].bpp },
- { 0, OSDINFOWIN_Y(0), OSDWIDTH - 1, OSDINFOWIN_Y(0) + OSDROWHEIGHT - 1, femonTheme[femonConfig.theme].bpp },
+ tArea Areas2[] = { { 0, OSDSTATUSWIN_Y(0), OSDWIDTH - 1, OSDSTATUSWIN_Y(0) + OSDSTATUSHEIGHT - 1, FemonTheme[FemonConfig.GetTheme()].bpp },
+ { 0, OSDINFOWIN_Y(0), OSDWIDTH - 1, OSDINFOWIN_Y(0) + OSDROWHEIGHT - 1, FemonTheme[FemonConfig.GetTheme()].bpp },
{ 0, OSDINFOWIN_Y(OSDROWHEIGHT), OSDWIDTH - 1, OSDINFOWIN_Y(0) + OSDINFOHEIGHT - 1, 2 } };
- m_Osd->SetAreas(Areas2, sizeof(Areas2) / sizeof(tArea));
+ osdM->SetAreas(Areas2, sizeof(Areas2) / sizeof(tArea));
}
OSDCLEARSTATUS();
OSDCLEARINFO();
- m_Osd->Flush();
- if (m_Receiver) {
- m_Receiver->Deactivate();
- DELETENULL(m_Receiver);
+ osdM->Flush();
+ if (receiverM) {
+ receiverM->Deactivate();
+ DELETENULL(receiverM);
}
- if (femonConfig.analyzestream && channel) {
- m_Receiver = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0);
- cDevice::ActualDevice()->AttachReceiver(m_Receiver);
+ if (FemonConfig.GetAnalyzeStream() && 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);
}
Start();
}
}
-void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber, bool liveView)
+void cFemonOsd::ChannelSwitch(const cDevice * deviceP, int channelNumberP, bool liveViewP)
{
- debug("%s(%d,%d)\n", __PRETTY_FUNCTION__, device->DeviceNumber(), channelNumber);
+ debug1("%s (%d, %d, %d)", __PRETTY_FUNCTION__, deviceP->DeviceNumber(), channelNumberP, liveViewP);
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
- if (!device || !liveView)
+ if (!deviceP || !liveViewP)
return;
- if (!channelNumber) {
- if (m_Receiver) {
- m_Receiver->Deactivate();
- DELETENULL(m_Receiver);
+ if (!channelNumberP) {
+ if (receiverM) {
+ receiverM->Deactivate();
+ DELETENULL(receiverM);
}
return;
}
- if (channel && femonConfig.analyzestream) {
- m_DeviceSource = DEVICESOURCE_DVBAPI;
+ if (channel && FemonConfig.GetAnalyzeStream()) {
+ deviceSourceM = DEVICESOURCE_DVBAPI;
if (channel->IsSourceType('I'))
- m_DeviceSource = DEVICESOURCE_IPTV;
+ deviceSourceM = DEVICESOURCE_IPTV;
else if (channel->IsSourceType('V'))
- m_DeviceSource = DEVICESOURCE_PVRINPUT;
+ deviceSourceM = DEVICESOURCE_PVRINPUT;
- if (m_Frontend >= 0) {
- close(m_Frontend);
- m_Frontend = -1;
+ if (frontendM >= 0) {
+ close(frontendM);
+ frontendM = -1;
}
- if (m_DeviceSource == DEVICESOURCE_DVBAPI) {
+ if (deviceSourceM == DEVICESOURCE_DVBAPI) {
if (!strstr(*cDevice::ActualDevice()->DeviceType(), SATIP_DEVICE)) {
cDvbDevice *dev = getDvbDevice(cDevice::ActualDevice());
- m_Frontend = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1;
- if (m_Frontend >= 0) {
- if (ioctl(m_Frontend, FE_GET_INFO, &m_FrontendInfo) < 0) {
- if (!femonConfig.usesvdrp)
- error("cFemonOsd::ChannelSwitch() cannot read frontend info.");
- close(m_Frontend);
- m_Frontend = -1;
- memset(&m_FrontendInfo, 0, sizeof(m_FrontendInfo));
+ frontendM = dev ? open(*cString::sprintf(FRONTEND_DEVICE, dev->Adapter(), dev->Frontend()), O_RDONLY | O_NONBLOCK) : -1;
+ if (frontendM >= 0) {
+ if (ioctl(frontendM, FE_GET_INFO, &frontendInfoM) < 0) {
+ if (!FemonConfig.GetUseSvdrp())
+ error("%s Cannot read frontend info", __PRETTY_FUNCTION__);
+ close(frontendM);
+ frontendM = -1;
+ memset(&frontendInfoM, 0, sizeof(frontendInfoM));
return;
}
}
- else if (femonConfig.usesvdrp) {
+ else if (FemonConfig.GetUseSvdrp()) {
if (!SvdrpConnect() || !SvdrpTune())
return;
}
else {
- error("cFemonOsd::ChannelSwitch() cannot open frontend device.");
+ error("%s Cannot open frontend device", __PRETTY_FUNCTION__);
return;
}
}
- if (m_Receiver) {
- m_Receiver->Deactivate();
- DELETENULL(m_Receiver);
+ if (receiverM) {
+ receiverM->Deactivate();
+ DELETENULL(receiverM);
}
- m_Receiver = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0);
- cDevice::ActualDevice()->AttachReceiver(m_Receiver);
+ receiverM = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0);
+ cDevice::ActualDevice()->AttachReceiver(receiverM);
}
}
}
-void cFemonOsd::SetAudioTrack(int Index, const char * const *Tracks)
+void cFemonOsd::SetAudioTrack(int indexP, const char * const *tracksP)
{
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s (%d, )", __PRETTY_FUNCTION__, indexP);
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
- if (m_Receiver) {
- m_Receiver->Deactivate();
- DELETENULL(m_Receiver);
+ if (receiverM) {
+ receiverM->Deactivate();
+ DELETENULL(receiverM);
}
- if (femonConfig.analyzestream) {
+ if (FemonConfig.GetAnalyzeStream()) {
const cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (channel) {
- m_Receiver = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0);
- cDevice::ActualDevice()->AttachReceiver(m_Receiver);
+ receiverM = new cFemonReceiver(channel, IS_AUDIO_TRACK(track) ? int(track - ttAudioFirst) : 0, IS_DOLBY_TRACK(track) ? int(track - ttDolbyFirst) : 0);
+ cDevice::ActualDevice()->AttachReceiver(receiverM);
}
}
}
-bool cFemonOsd::DeviceSwitch(int direction)
+bool cFemonOsd::DeviceSwitch(int directionP)
{
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s (%d)", __PRETTY_FUNCTION__, directionP);
int device = cDevice::ActualDevice()->DeviceNumber();
- direction = sgn(direction);
+ int direction = sgn(directionP);
if (device >= 0) {
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (channel) {
@@ -908,7 +910,7 @@ bool cFemonOsd::DeviceSwitch(int direction)
if (NumUsableSlots && !HasInternalCam && !CamSlots.Get(j)->Assign(d, true))
continue; // CAM slot can't be used with this device
if (d->ProvidesChannel(channel, 0, &NeedsDetachAllReceivers)) { // this device is basically able to do the job
- debug("%s(%d) device(%d)\n", __PRETTY_FUNCTION__, direction, device);
+ debug1("%s (%d) device=%d", __PRETTY_FUNCTION__, direction, device);
if (NumUsableSlots && !HasInternalCam && d->CamSlot() && d->CamSlot() != CamSlots.Get(j))
NeedsDetachAllReceivers = true; // using a different CAM slot requires detaching receivers
if (NumUsableSlots && !HasInternalCam)
@@ -947,108 +949,108 @@ bool cFemonOsd::DeviceSwitch(int direction)
bool cFemonOsd::SvdrpConnect(void)
{
- if (m_SvdrpConnection.handle < 0) {
- m_SvdrpPlugin = cPluginManager::GetPlugin(SVDRPPLUGIN);
- if (m_SvdrpPlugin) {
- m_SvdrpConnection.serverIp = femonConfig.svdrpip;
- m_SvdrpConnection.serverPort = (unsigned short)femonConfig.svdrpport;
- m_SvdrpConnection.shared = true;
- m_SvdrpPlugin->Service("SvdrpConnection-v1.0", &m_SvdrpConnection);
- if (m_SvdrpConnection.handle >= 0) {
+ if (svdrpConnectionM.handle < 0) {
+ svdrpPluginM = cPluginManager::GetPlugin(SVDRPPLUGIN);
+ if (svdrpPluginM) {
+ svdrpConnectionM.serverIp = FemonConfig.GetSvdrpIp();
+ svdrpConnectionM.serverPort = (unsigned short)FemonConfig.GetSvdrpPort();
+ svdrpConnectionM.shared = true;
+ svdrpPluginM->Service("SvdrpConnection-v1.0", &svdrpConnectionM);
+ if (svdrpConnectionM.handle >= 0) {
SvdrpCommand_v1_0 cmd;
- cmd.handle = m_SvdrpConnection.handle;
+ cmd.handle = svdrpConnectionM.handle;
cmd.command = cString::sprintf("PLUG %s\r\n", PLUGIN_NAME_I18N);
- m_SvdrpPlugin->Service("SvdrpCommand-v1.0", &cmd);
+ svdrpPluginM->Service("SvdrpCommand-v1.0", &cmd);
if (cmd.responseCode != 214) {
- m_SvdrpPlugin->Service("SvdrpConnection-v1.0", &m_SvdrpConnection); // close connection
- error("cFemonOsd::SvdrpConnect() cannot find plugin '%s' on server %s.", PLUGIN_NAME_I18N, *m_SvdrpConnection.serverIp);
+ svdrpPluginM->Service("SvdrpConnection-v1.0", &svdrpConnectionM); // close connection
+ error("%s Cannot find plugin '%s' on server %s", __PRETTY_FUNCTION__, PLUGIN_NAME_I18N, *svdrpConnectionM.serverIp);
}
}
else
- error("cFemonOsd::SvdrpConnect() cannot connect to SVDRP server.");
+ error("%s Cannot connect to SVDRP server", __PRETTY_FUNCTION__);
}
else
- error("cFemonOsd::SvdrpConnect() cannot find plugin '%s'.", SVDRPPLUGIN);
+ error("%s Cannot find plugin '%s'", __PRETTY_FUNCTION__, SVDRPPLUGIN);
}
- return m_SvdrpConnection.handle >= 0;
+ return svdrpConnectionM.handle >= 0;
}
bool cFemonOsd::SvdrpTune(void)
{
- if (m_SvdrpPlugin && m_SvdrpConnection.handle >= 0) {
+ if (svdrpPluginM && svdrpConnectionM.handle >= 0) {
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (channel) {
SvdrpCommand_v1_0 cmd;
- cmd.handle = m_SvdrpConnection.handle;
+ cmd.handle = svdrpConnectionM.handle;
cmd.command = cString::sprintf("CHAN %s\r\n", *channel->GetChannelID().ToString());
- m_SvdrpPlugin->Service("SvdrpCommand-v1.0", &cmd);
+ svdrpPluginM->Service("SvdrpCommand-v1.0", &cmd);
if (cmd.responseCode == 250)
return true;
- error("cFemonOsd::SvdrpTune() cannot tune server channel.");
+ error("%s Cannot tune server channel", __PRETTY_FUNCTION__);
}
else
- error("cFemonOsd::SvdrpTune() invalid channel.");
+ error("%s Invalid channel", __PRETTY_FUNCTION__);
}
else
- error("cFemonOsd::SvdrpTune() unexpected connection state.");
+ error("%s Unexpected connection state", __PRETTY_FUNCTION__);
return false;
}
double cFemonOsd::GetVideoBitrate(void)
{
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s", __PRETTY_FUNCTION__);
double value = 0.0;
- if (m_Receiver)
- value = m_Receiver->VideoBitrate();
+ if (receiverM)
+ value = receiverM->VideoBitrate();
return (value);
}
double cFemonOsd::GetAudioBitrate(void)
{
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s", __PRETTY_FUNCTION__);
double value = 0.0;
- if (m_Receiver)
- value = m_Receiver->AudioBitrate();
+ if (receiverM)
+ value = receiverM->AudioBitrate();
return (value);
}
double cFemonOsd::GetDolbyBitrate(void)
{
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s", __PRETTY_FUNCTION__);
double value = 0.0;
- if (m_Receiver)
- value = m_Receiver->AC3Bitrate();
+ if (receiverM)
+ value = receiverM->AC3Bitrate();
return (value);
}
-eOSState cFemonOsd::ProcessKey(eKeys Key)
+eOSState cFemonOsd::ProcessKey(eKeys keyP)
{
- eOSState state = cOsdObject::ProcessKey(Key);
+ eOSState state = cOsdObject::ProcessKey(keyP);
if (state == osUnknown) {
- switch (int(Key)) {
+ switch (int(keyP)) {
case k0:
- if ((m_Number == 0) && (m_OldNumber != 0)) {
- m_Number = m_OldNumber;
- m_OldNumber = cDevice::CurrentChannel();
- Channels.SwitchTo(m_Number);
- m_Number = 0;
+ if ((numberM == 0) && (oldNumberM != 0)) {
+ numberM = oldNumberM;
+ oldNumberM = cDevice::CurrentChannel();
+ Channels.SwitchTo(numberM);
+ numberM = 0;
return osContinue;
}
case k1 ... k9:
- if (m_Number >= 0) {
- m_Number = m_Number * 10 + Key - k0;
- if (m_Number > 0) {
+ if (numberM >= 0) {
+ numberM = numberM * 10 + keyP - k0;
+ if (numberM > 0) {
DrawStatusWindow();
- cChannel *ch = Channels.GetByNumber(m_Number);
- m_InputTime.Set(0);
+ cChannel *ch = Channels.GetByNumber(numberM);
+ inputTimeM.Set(0);
// Lets see if there can be any useful further input:
- int n = ch ? m_Number * 10 : 0;
+ int n = ch ? numberM * 10 : 0;
while (ch && (ch = Channels.Next(ch)) != NULL) {
if (!ch->GroupSep()) {
if (n <= ch->Number() && ch->Number() <= n + 9) {
@@ -1061,9 +1063,9 @@ eOSState cFemonOsd::ProcessKey(eKeys Key)
}
if (n > 0) {
// This channel is the only one that fits the input, so let's take it right away:
- m_OldNumber = cDevice::CurrentChannel();
- Channels.SwitchTo(m_Number);
- m_Number = 0;
+ oldNumberM = cDevice::CurrentChannel();
+ Channels.SwitchTo(numberM);
+ numberM = 0;
}
}
}
@@ -1116,20 +1118,20 @@ eOSState cFemonOsd::ProcessKey(eKeys Key)
case kUp:
case kDown|k_Repeat:
case kDown:
- m_OldNumber = cDevice::CurrentChannel();
- cDevice::SwitchChannel(NORMALKEY(Key) == kUp ? 1 : -1);
- m_Number = 0;
+ oldNumberM = cDevice::CurrentChannel();
+ cDevice::SwitchChannel(NORMALKEY(keyP) == kUp ? 1 : -1);
+ numberM = 0;
break;
case kNone:
- if (m_Number && (m_InputTime.Elapsed() > CHANNELINPUT_TIMEOUT)) {
- if (Channels.GetByNumber(m_Number)) {
- m_OldNumber = cDevice::CurrentChannel();
- Channels.SwitchTo(m_Number);
- m_Number = 0;
+ if (numberM && (inputTimeM.Elapsed() > CHANNELINPUT_TIMEOUT)) {
+ if (Channels.GetByNumber(numberM)) {
+ oldNumberM = cDevice::CurrentChannel();
+ Channels.SwitchTo(numberM);
+ numberM = 0;
}
else {
- m_InputTime.Set(0);
- m_Number = 0;
+ inputTimeM.Set(0);
+ numberM = 0;
}
}
break;
@@ -1137,8 +1139,8 @@ eOSState cFemonOsd::ProcessKey(eKeys Key)
{
// toggle between display modes
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
- if (++m_DisplayMode == eFemonModeAC3 && channel && !channel->Dpid(0)) m_DisplayMode++;
- if (m_DisplayMode >= eFemonModeMaxNumber) m_DisplayMode = 0;
+ if (++displayModeM == eFemonModeAC3 && channel && !channel->Dpid(0)) displayModeM++;
+ if (displayModeM >= eFemonModeMaxNumber) displayModeM = 0;
DrawInfoWindow();
}
break;
diff --git a/osd.h b/osd.h
new file mode 100644
index 0000000..4428763
--- /dev/null
+++ b/osd.h
@@ -0,0 +1,102 @@
+/*
+ * osd.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_OSD_H
+#define __FEMON_OSD_H
+
+#include <linux/dvb/frontend.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <vdr/osd.h>
+#include <vdr/thread.h>
+#include <vdr/status.h>
+#include <vdr/plugin.h>
+#include <vdr/channels.h>
+#include <vdr/transfer.h>
+#include <vdr/tools.h>
+
+#include "receiver.h"
+#include "svdrpservice.h"
+
+#define MAX_BM_NUMBER 8
+
+class cFemonOsd : public cOsdObject, public cThread, public cStatus {
+private:
+ enum eDeviceSourceType {
+ DEVICESOURCE_DVBAPI = 0,
+ DEVICESOURCE_IPTV,
+ DEVICESOURCE_PVRINPUT,
+ DEVICESOURCE_COUNT
+ };
+
+ static cFemonOsd *pInstanceS;
+
+ cOsd *osdM;
+ cFemonReceiver *receiverM;
+ int frontendM;
+ int svdrpFrontendM;
+ double svdrpVideoBitRateM;
+ double svdrpAudioBitRateM;
+ SvdrpConnection_v1_0 svdrpConnectionM;
+ cPlugin *svdrpPluginM;
+ int numberM;
+ int oldNumberM;
+ int qualityM;
+ bool qualityValidM;
+ int strengthM;
+ bool strengthValidM;
+ uint16_t snrM;
+ bool snrValidM;
+ uint16_t signalM;
+ bool signalValidM;
+ uint32_t berM;
+ bool berValidM;
+ uint32_t uncM;
+ bool uncValidM;
+ cString frontendNameM;
+ fe_status_t frontendStatusM;
+ bool frontendStatusValidM;
+ dvb_frontend_info frontendInfoM;
+ eDeviceSourceType deviceSourceM;
+ int displayModeM;
+ int osdWidthM;
+ int osdHeightM;
+ int osdLeftM;
+ int osdTopM;
+ cFont *fontM;
+ cTimeMs inputTimeM;
+ cCondWait sleepM;
+ cMutex mutexM;
+
+ void DrawStatusWindow(void);
+ void DrawInfoWindow(void);
+ bool SvdrpConnect(void);
+ bool SvdrpTune(void);
+
+protected:
+ cFemonOsd();
+ cFemonOsd(const cFemonOsd&);
+ cFemonOsd& operator= (const cFemonOsd&);
+ virtual void Action(void);
+ virtual void ChannelSwitch(const cDevice *deviceP, int channelNumberP, bool liveViewP);
+ virtual void SetAudioTrack(int indexP, const char * const *tracksP);
+
+public:
+ static cFemonOsd *Instance(bool createP = false);
+ ~cFemonOsd();
+
+ virtual void Show(void);
+ virtual eOSState ProcessKey(eKeys keyP);
+
+ bool DeviceSwitch(int directionP);
+ double GetVideoBitrate(void);
+ double GetAudioBitrate(void);
+ double GetDolbyBitrate(void);
+};
+
+#endif //__FEMON_OSD_H
+
diff --git a/po/de_DE.po b/po/de_DE.po
index e03c8cb..5dd2004 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,10 +7,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: Christian Wieninger\n"
"Language-Team: German <vdr at linuxtv.org>\n"
"Language: de\n"
@@ -27,6 +27,99 @@ msgstr "Signalinformationen"
msgid "Femon not available"
msgstr "Femon nicht verf�gbar"
+msgid "Video"
+msgstr "Video"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "Audio"
+
+msgid "Transponder Information"
+msgstr "Transponderinformation"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "Coderate"
+
+msgid "Protocol"
+msgstr ""
+
+msgid "Bitrate"
+msgstr "Bitrate"
+
+msgid "Stream Information"
+msgstr "Streaminformation"
+
+msgid "Video Stream"
+msgstr "Video Stream"
+
+msgid "Codec"
+msgstr ""
+
+msgid "Aspect Ratio"
+msgstr "Seitenverh�ltnis"
+
+msgid "Frame Rate"
+msgstr "Bildrate"
+
+msgid "Video Format"
+msgstr "Bildformat"
+
+msgid "Resolution"
+msgstr "Aufl�sung"
+
+msgid "Audio Stream"
+msgstr "Audio Stream"
+
+msgid "Channel Mode"
+msgstr ""
+
+msgid "Sampling Frequency"
+msgstr "Abtastrate"
+
+msgid "AC-3 Stream"
+msgstr "AC-3 Stream"
+
+msgid "Bit Stream Mode"
+msgstr "Bitstream Modus"
+
+msgid "Audio Coding Mode"
+msgstr "Audiokodierung"
+
+msgid "Center Mix Level"
+msgstr "Center Mix Pegel"
+
+msgid "Surround Mix Level"
+msgstr "Surround Mix Pegel"
+
+msgid "Dolby Surround Mode"
+msgstr "Dolby Surround Modus"
+
+msgid "Low Frequency Effects"
+msgstr "Tieft�ner Effekte"
+
+msgid "Dialogue Normalization"
+msgstr "Dialog Normalisierung"
+
msgid "basic"
msgstr "Standard"
@@ -36,9 +129,6 @@ msgstr "Transponder"
msgid "stream"
msgstr "Stream"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "Klassischer"
@@ -150,96 +240,6 @@ msgstr ""
msgid "Help"
msgstr "Hilfe"
-msgid "Video"
-msgstr "Video"
-
-msgid "Audio"
-msgstr "Audio"
-
-msgid "Transponder Information"
-msgstr "Transponderinformation"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "Coderate"
-
-msgid "Protocol"
-msgstr ""
-
-msgid "Bitrate"
-msgstr "Bitrate"
-
-msgid "Stream Information"
-msgstr "Streaminformation"
-
-msgid "Video Stream"
-msgstr "Video Stream"
-
-msgid "Codec"
-msgstr ""
-
-msgid "Aspect Ratio"
-msgstr "Seitenverh�ltnis"
-
-msgid "Frame Rate"
-msgstr "Bildrate"
-
-msgid "Video Format"
-msgstr "Bildformat"
-
-msgid "Resolution"
-msgstr "Aufl�sung"
-
-msgid "Audio Stream"
-msgstr "Audio Stream"
-
-msgid "Channel Mode"
-msgstr ""
-
-msgid "Sampling Frequency"
-msgstr "Abtastrate"
-
-msgid "AC-3 Stream"
-msgstr "AC-3 Stream"
-
-msgid "Bit Stream Mode"
-msgstr "Bitstream Modus"
-
-msgid "Audio Coding Mode"
-msgstr "Audiokodierung"
-
-msgid "Center Mix Level"
-msgstr "Center Mix Pegel"
-
-msgid "Surround Mix Level"
-msgstr "Surround Mix Pegel"
-
-msgid "Dolby Surround Mode"
-msgstr "Dolby Surround Modus"
-
-msgid "Low Frequency Effects"
-msgstr "Tieft�ner Effekte"
-
-msgid "Dialogue Normalization"
-msgstr "Dialog Normalisierung"
-
msgid "Fixed"
msgstr "Fest"
diff --git a/po/es_ES.po b/po/es_ES.po
index 9255651..b93f35f 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: Luis Palacios\n"
"Language-Team: Spanish <vdr at linuxtv.org>\n"
"Language: es\n"
@@ -25,6 +25,99 @@ msgstr "Monitorizaci
msgid "Femon not available"
msgstr ""
+msgid "Video"
+msgstr "Video"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "Audio"
+
+msgid "Transponder Information"
+msgstr "Informaci�n del transpondedor"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "Coderate"
+
+msgid "Protocol"
+msgstr ""
+
+msgid "Bitrate"
+msgstr "Tasa de bits"
+
+msgid "Stream Information"
+msgstr "Informaci�n del flujo"
+
+msgid "Video Stream"
+msgstr "Flujo de video"
+
+msgid "Codec"
+msgstr ""
+
+msgid "Aspect Ratio"
+msgstr "Proporciones de la imagen"
+
+msgid "Frame Rate"
+msgstr "Tasa de frames"
+
+msgid "Video Format"
+msgstr "Formato de video"
+
+msgid "Resolution"
+msgstr "Resoluci�n"
+
+msgid "Audio Stream"
+msgstr "Flujo de audio"
+
+msgid "Channel Mode"
+msgstr ""
+
+msgid "Sampling Frequency"
+msgstr "Frecuencia de muestreo"
+
+msgid "AC-3 Stream"
+msgstr "Flujo AC-3"
+
+msgid "Bit Stream Mode"
+msgstr "Modo bitstream"
+
+msgid "Audio Coding Mode"
+msgstr "Modo de codificaci�n de audio"
+
+msgid "Center Mix Level"
+msgstr "Nivel sonoro central"
+
+msgid "Surround Mix Level"
+msgstr "Nivel sonoro surround"
+
+msgid "Dolby Surround Mode"
+msgstr "Nivel sonoro Dolby Surround"
+
+msgid "Low Frequency Effects"
+msgstr "Efectos de baja frecuencia"
+
+msgid "Dialogue Normalization"
+msgstr "Normalizaci�n del di�logo"
+
msgid "basic"
msgstr "B�sico"
@@ -34,9 +127,6 @@ msgstr "Transpondedor"
msgid "stream"
msgstr "Flujo"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "Cl�sico"
@@ -148,96 +238,6 @@ msgstr ""
msgid "Help"
msgstr "Ayuda"
-msgid "Video"
-msgstr "Video"
-
-msgid "Audio"
-msgstr "Audio"
-
-msgid "Transponder Information"
-msgstr "Informaci�n del transpondedor"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "Coderate"
-
-msgid "Protocol"
-msgstr ""
-
-msgid "Bitrate"
-msgstr "Tasa de bits"
-
-msgid "Stream Information"
-msgstr "Informaci�n del flujo"
-
-msgid "Video Stream"
-msgstr "Flujo de video"
-
-msgid "Codec"
-msgstr ""
-
-msgid "Aspect Ratio"
-msgstr "Proporciones de la imagen"
-
-msgid "Frame Rate"
-msgstr "Tasa de frames"
-
-msgid "Video Format"
-msgstr "Formato de video"
-
-msgid "Resolution"
-msgstr "Resoluci�n"
-
-msgid "Audio Stream"
-msgstr "Flujo de audio"
-
-msgid "Channel Mode"
-msgstr ""
-
-msgid "Sampling Frequency"
-msgstr "Frecuencia de muestreo"
-
-msgid "AC-3 Stream"
-msgstr "Flujo AC-3"
-
-msgid "Bit Stream Mode"
-msgstr "Modo bitstream"
-
-msgid "Audio Coding Mode"
-msgstr "Modo de codificaci�n de audio"
-
-msgid "Center Mix Level"
-msgstr "Nivel sonoro central"
-
-msgid "Surround Mix Level"
-msgstr "Nivel sonoro surround"
-
-msgid "Dolby Surround Mode"
-msgstr "Nivel sonoro Dolby Surround"
-
-msgid "Low Frequency Effects"
-msgstr "Efectos de baja frecuencia"
-
-msgid "Dialogue Normalization"
-msgstr "Normalizaci�n del di�logo"
-
msgid "Fixed"
msgstr "Fijo"
diff --git a/po/et_EE.po b/po/et_EE.po
index 2bf423a..d114787 100644
--- a/po/et_EE.po
+++ b/po/et_EE.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: Arthur Konovalov\n"
"Language-Team: Estonian <vdr at linuxtv.org>\n"
"Language: et\n"
@@ -25,6 +25,99 @@ msgstr "Signaaliinfo"
msgid "Femon not available"
msgstr "Femon ei ole k�ttesaadav"
+msgid "Video"
+msgstr "Video"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "Audio"
+
+msgid "Transponder Information"
+msgstr "Transponderi info"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "Coderate"
+
+msgid "Protocol"
+msgstr ""
+
+msgid "Bitrate"
+msgstr "Bitikiirus"
+
+msgid "Stream Information"
+msgstr "Vooinfo"
+
+msgid "Video Stream"
+msgstr "Videovoog"
+
+msgid "Codec"
+msgstr "Koodek"
+
+msgid "Aspect Ratio"
+msgstr "K�lgsuhe"
+
+msgid "Frame Rate"
+msgstr "Kaadrisagedus"
+
+msgid "Video Format"
+msgstr "Videoformaat"
+
+msgid "Resolution"
+msgstr "Resolutsioon"
+
+msgid "Audio Stream"
+msgstr "Audiovoog"
+
+msgid "Channel Mode"
+msgstr "Kanalimoodus"
+
+msgid "Sampling Frequency"
+msgstr "S�mplimissagedus"
+
+msgid "AC-3 Stream"
+msgstr "AC-3 voog"
+
+msgid "Bit Stream Mode"
+msgstr "Bitivoo t��p"
+
+msgid "Audio Coding Mode"
+msgstr "Audiokodeering"
+
+msgid "Center Mix Level"
+msgstr "Keskmise kanali tase"
+
+msgid "Surround Mix Level"
+msgstr "Surround kanali tase"
+
+msgid "Dolby Surround Mode"
+msgstr "Dolby Surround'i t��p"
+
+msgid "Low Frequency Effects"
+msgstr "LFE kanal"
+
+msgid "Dialogue Normalization"
+msgstr "Dialoogi normalisatsioon"
+
msgid "basic"
msgstr "standard"
@@ -34,9 +127,6 @@ msgstr "transponder"
msgid "stream"
msgstr "voog"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "Classic"
@@ -148,96 +238,6 @@ msgstr "SVDRP teenuse IP aadressi m
msgid "Help"
msgstr "Abi"
-msgid "Video"
-msgstr "Video"
-
-msgid "Audio"
-msgstr "Audio"
-
-msgid "Transponder Information"
-msgstr "Transponderi info"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "Coderate"
-
-msgid "Protocol"
-msgstr ""
-
-msgid "Bitrate"
-msgstr "Bitikiirus"
-
-msgid "Stream Information"
-msgstr "Vooinfo"
-
-msgid "Video Stream"
-msgstr "Videovoog"
-
-msgid "Codec"
-msgstr "Koodek"
-
-msgid "Aspect Ratio"
-msgstr "K�lgsuhe"
-
-msgid "Frame Rate"
-msgstr "Kaadrisagedus"
-
-msgid "Video Format"
-msgstr "Videoformaat"
-
-msgid "Resolution"
-msgstr "Resolutsioon"
-
-msgid "Audio Stream"
-msgstr "Audiovoog"
-
-msgid "Channel Mode"
-msgstr "Kanalimoodus"
-
-msgid "Sampling Frequency"
-msgstr "S�mplimissagedus"
-
-msgid "AC-3 Stream"
-msgstr "AC-3 voog"
-
-msgid "Bit Stream Mode"
-msgstr "Bitivoo t��p"
-
-msgid "Audio Coding Mode"
-msgstr "Audiokodeering"
-
-msgid "Center Mix Level"
-msgstr "Keskmise kanali tase"
-
-msgid "Surround Mix Level"
-msgstr "Surround kanali tase"
-
-msgid "Dolby Surround Mode"
-msgstr "Dolby Surround'i t��p"
-
-msgid "Low Frequency Effects"
-msgstr "LFE kanal"
-
-msgid "Dialogue Normalization"
-msgstr "Dialoogi normalisatsioon"
-
msgid "Fixed"
msgstr "Fikseeritud"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 45ffe0c..9c936b4 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: Finnish <vdr at linuxtv.org>\n"
"Language: fi\n"
@@ -25,6 +25,99 @@ msgstr "Signaalimittari"
msgid "Femon not available"
msgstr "Signaalimittari ei ole käytettävissä"
+msgid "Video"
+msgstr "Kuva"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "Ääni"
+
+msgid "Transponder Information"
+msgstr "Transponderin tiedot"
+
+msgid "Apid"
+msgstr "Ääni-PID"
+
+msgid "Dpid"
+msgstr "Dolby-PID"
+
+msgid "Spid"
+msgstr "Tekstitys-PID"
+
+msgid "Nid"
+msgstr "Verkko-ID"
+
+msgid "Tid"
+msgstr "TS-ID"
+
+msgid "Rid"
+msgstr "Radio-ID"
+
+msgid "Coderate"
+msgstr "Suojaustaso"
+
+msgid "Protocol"
+msgstr "Protokolla"
+
+msgid "Bitrate"
+msgstr "Bittinopeus"
+
+msgid "Stream Information"
+msgstr "Lähetteen tiedot"
+
+msgid "Video Stream"
+msgstr "Kuvaraita"
+
+msgid "Codec"
+msgstr "Koodekki"
+
+msgid "Aspect Ratio"
+msgstr "Kuvasuhde"
+
+msgid "Frame Rate"
+msgstr "Ruudunpäivitystaajuus"
+
+msgid "Video Format"
+msgstr "Kuvaformaatti"
+
+msgid "Resolution"
+msgstr "Resoluutio"
+
+msgid "Audio Stream"
+msgstr "Ääniraita"
+
+msgid "Channel Mode"
+msgstr "Kanavatila"
+
+msgid "Sampling Frequency"
+msgstr "Näytteenottotaajuus"
+
+msgid "AC-3 Stream"
+msgstr "AC-3-ääniraita"
+
+msgid "Bit Stream Mode"
+msgstr "Lähetteen tyyppi"
+
+msgid "Audio Coding Mode"
+msgstr "Äänikoodaus"
+
+msgid "Center Mix Level"
+msgstr "Keskikanavan taso"
+
+msgid "Surround Mix Level"
+msgstr "Tehostekanavien taso"
+
+msgid "Dolby Surround Mode"
+msgstr "Dolby Surround -tehoste"
+
+msgid "Low Frequency Effects"
+msgstr "LFE-kanava"
+
+msgid "Dialogue Normalization"
+msgstr "Dialogin normalisointi"
+
msgid "basic"
msgstr "perus"
@@ -34,9 +127,6 @@ msgstr "transponderi"
msgid "stream"
msgstr "lähete"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "Klassinen"
@@ -148,96 +238,6 @@ msgstr "Määrittele SVDRP-palvelun käyttämä IP-osoite."
msgid "Help"
msgstr "Opaste"
-msgid "Video"
-msgstr "Kuva"
-
-msgid "Audio"
-msgstr "Ääni"
-
-msgid "Transponder Information"
-msgstr "Transponderin tiedot"
-
-msgid "Apid"
-msgstr "Ääni-PID"
-
-msgid "Dpid"
-msgstr "Dolby-PID"
-
-msgid "Spid"
-msgstr "Tekstitys-PID"
-
-msgid "Nid"
-msgstr "Verkko-ID"
-
-msgid "Tid"
-msgstr "TS-ID"
-
-msgid "Rid"
-msgstr "Radio-ID"
-
-msgid "Coderate"
-msgstr "Suojaustaso"
-
-msgid "Protocol"
-msgstr "Protokolla"
-
-msgid "Bitrate"
-msgstr "Bittinopeus"
-
-msgid "Stream Information"
-msgstr "Lähetteen tiedot"
-
-msgid "Video Stream"
-msgstr "Kuvaraita"
-
-msgid "Codec"
-msgstr "Koodekki"
-
-msgid "Aspect Ratio"
-msgstr "Kuvasuhde"
-
-msgid "Frame Rate"
-msgstr "Ruudunpäivitystaajuus"
-
-msgid "Video Format"
-msgstr "Kuvaformaatti"
-
-msgid "Resolution"
-msgstr "Resoluutio"
-
-msgid "Audio Stream"
-msgstr "Ääniraita"
-
-msgid "Channel Mode"
-msgstr "Kanavatila"
-
-msgid "Sampling Frequency"
-msgstr "Näytteenottotaajuus"
-
-msgid "AC-3 Stream"
-msgstr "AC-3-ääniraita"
-
-msgid "Bit Stream Mode"
-msgstr "Lähetteen tyyppi"
-
-msgid "Audio Coding Mode"
-msgstr "Äänikoodaus"
-
-msgid "Center Mix Level"
-msgstr "Keskikanavan taso"
-
-msgid "Surround Mix Level"
-msgstr "Tehostekanavien taso"
-
-msgid "Dolby Surround Mode"
-msgstr "Dolby Surround -tehoste"
-
-msgid "Low Frequency Effects"
-msgstr "LFE-kanava"
-
-msgid "Dialogue Normalization"
-msgstr "Dialogin normalisointi"
-
msgid "Fixed"
msgstr "kiinteä"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 2a16aa5..531fb23 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -7,10 +7,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: Bernard Jaulin <bernard.jaulin at gmail.com>\n"
"Language-Team: French <vdr at linuxtv.org>\n"
"Language: fr\n"
@@ -27,6 +27,99 @@ msgstr "Infos sur le signal DVB"
msgid "Femon not available"
msgstr "Femon n'est pas disponible"
+msgid "Video"
+msgstr "Vidéo"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "Audio"
+
+msgid "Transponder Information"
+msgstr "Information du transpondeur"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "Coderate"
+
+msgid "Protocol"
+msgstr "Protocole"
+
+msgid "Bitrate"
+msgstr "Taux d'échantillonnage fixe"
+
+msgid "Stream Information"
+msgstr "Information sur le flux"
+
+msgid "Video Stream"
+msgstr "Flux vidéo"
+
+msgid "Codec"
+msgstr "Codec"
+
+msgid "Aspect Ratio"
+msgstr "Format de l'image"
+
+msgid "Frame Rate"
+msgstr "Rafraîchissement"
+
+msgid "Video Format"
+msgstr "Standard vidéo"
+
+msgid "Resolution"
+msgstr "Résolution"
+
+msgid "Audio Stream"
+msgstr "Flux audio"
+
+msgid "Channel Mode"
+msgstr "Mode chaîne"
+
+msgid "Sampling Frequency"
+msgstr "Fréquence d'échantillonage"
+
+msgid "AC-3 Stream"
+msgstr "Flux AC-3"
+
+msgid "Bit Stream Mode"
+msgstr "Mode bitstream"
+
+msgid "Audio Coding Mode"
+msgstr "Mode de codage audio"
+
+msgid "Center Mix Level"
+msgstr "Niveau sonore milieu"
+
+msgid "Surround Mix Level"
+msgstr "Niveau sonore surround"
+
+msgid "Dolby Surround Mode"
+msgstr "Mode Dolby Surround"
+
+msgid "Low Frequency Effects"
+msgstr "Effets de basses"
+
+msgid "Dialogue Normalization"
+msgstr "Normalisation des dialogues"
+
msgid "basic"
msgstr "basique"
@@ -36,9 +129,6 @@ msgstr "transpondeur"
msgid "stream"
msgstr "flux"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "Classique"
@@ -150,96 +240,6 @@ msgstr "Définit l'adresse IP du service SVDRP."
msgid "Help"
msgstr "Aide"
-msgid "Video"
-msgstr "Vidéo"
-
-msgid "Audio"
-msgstr "Audio"
-
-msgid "Transponder Information"
-msgstr "Information du transpondeur"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "Coderate"
-
-msgid "Protocol"
-msgstr "Protocole"
-
-msgid "Bitrate"
-msgstr "Taux d'échantillonnage fixe"
-
-msgid "Stream Information"
-msgstr "Information sur le flux"
-
-msgid "Video Stream"
-msgstr "Flux vidéo"
-
-msgid "Codec"
-msgstr "Codec"
-
-msgid "Aspect Ratio"
-msgstr "Format de l'image"
-
-msgid "Frame Rate"
-msgstr "Rafraîchissement"
-
-msgid "Video Format"
-msgstr "Standard vidéo"
-
-msgid "Resolution"
-msgstr "Résolution"
-
-msgid "Audio Stream"
-msgstr "Flux audio"
-
-msgid "Channel Mode"
-msgstr "Mode chaîne"
-
-msgid "Sampling Frequency"
-msgstr "Fréquence d'échantillonage"
-
-msgid "AC-3 Stream"
-msgstr "Flux AC-3"
-
-msgid "Bit Stream Mode"
-msgstr "Mode bitstream"
-
-msgid "Audio Coding Mode"
-msgstr "Mode de codage audio"
-
-msgid "Center Mix Level"
-msgstr "Niveau sonore milieu"
-
-msgid "Surround Mix Level"
-msgstr "Niveau sonore surround"
-
-msgid "Dolby Surround Mode"
-msgstr "Mode Dolby Surround"
-
-msgid "Low Frequency Effects"
-msgstr "Effets de basses"
-
-msgid "Dialogue Normalization"
-msgstr "Normalisation des dialogues"
-
msgid "Fixed"
msgstr "Fixe"
diff --git a/po/hu_HU.po b/po/hu_HU.po
index b053366..88a29ca 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: F�ley Istv�n <ifuley at tigercomp dot ro>\n"
"Language-Team: Hungarian <ifuley at tigercomp dot ro>\n"
"Language: hu\n"
@@ -28,6 +28,99 @@ msgstr "Jel inform
msgid "Femon not available"
msgstr "Femon nem el�rhet�"
+msgid "Video"
+msgstr "Video"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "Audio"
+
+msgid "Transponder Information"
+msgstr "Transponder inf�"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "Coderate"
+
+msgid "Protocol"
+msgstr ""
+
+msgid "Bitrate"
+msgstr "Bitr�ta"
+
+msgid "Stream Information"
+msgstr "Adatfolyam inf�"
+
+msgid "Video Stream"
+msgstr "Vide� adatfolyam"
+
+msgid "Codec"
+msgstr "Kodek"
+
+msgid "Aspect Ratio"
+msgstr "M�retar�ny"
+
+msgid "Frame Rate"
+msgstr "K�pfriss�t�s"
+
+msgid "Video Format"
+msgstr "Vide� form�tum"
+
+msgid "Resolution"
+msgstr "Felbont�s"
+
+msgid "Audio Stream"
+msgstr "Hang adatfolyam"
+
+msgid "Channel Mode"
+msgstr "Hangs�v m�d"
+
+msgid "Sampling Frequency"
+msgstr "Mintav�telez�si frekvencia"
+
+msgid "AC-3 Stream"
+msgstr "AC-3 adatfolyam"
+
+msgid "Bit Stream Mode"
+msgstr "Bit Stream m�d"
+
+msgid "Audio Coding Mode"
+msgstr "Hang k�dol�si m�d"
+
+msgid "Center Mix Level"
+msgstr "K�z�pcsatorna kever�si jelszintje"
+
+msgid "Surround Mix Level"
+msgstr "T�rhat�s csatorna kever�si szintje"
+
+msgid "Dolby Surround Mode"
+msgstr "Dolby Surround m�d"
+
+msgid "Low Frequency Effects"
+msgstr "LFE - alacsony frekvenci�s effektek"
+
+msgid "Dialogue Normalization"
+msgstr "P�rbesz�d jelszint normaliz�l�sa"
+
msgid "basic"
msgstr "alap"
@@ -37,9 +130,6 @@ msgstr "transponder"
msgid "stream"
msgstr "adatfolyam (stream)"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "Klasszikus"
@@ -151,96 +241,6 @@ msgstr "Meghat
msgid "Help"
msgstr "Seg�ts�g"
-msgid "Video"
-msgstr "Video"
-
-msgid "Audio"
-msgstr "Audio"
-
-msgid "Transponder Information"
-msgstr "Transponder inf�"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "Coderate"
-
-msgid "Protocol"
-msgstr ""
-
-msgid "Bitrate"
-msgstr "Bitr�ta"
-
-msgid "Stream Information"
-msgstr "Adatfolyam inf�"
-
-msgid "Video Stream"
-msgstr "Vide� adatfolyam"
-
-msgid "Codec"
-msgstr "Kodek"
-
-msgid "Aspect Ratio"
-msgstr "M�retar�ny"
-
-msgid "Frame Rate"
-msgstr "K�pfriss�t�s"
-
-msgid "Video Format"
-msgstr "Vide� form�tum"
-
-msgid "Resolution"
-msgstr "Felbont�s"
-
-msgid "Audio Stream"
-msgstr "Hang adatfolyam"
-
-msgid "Channel Mode"
-msgstr "Hangs�v m�d"
-
-msgid "Sampling Frequency"
-msgstr "Mintav�telez�si frekvencia"
-
-msgid "AC-3 Stream"
-msgstr "AC-3 adatfolyam"
-
-msgid "Bit Stream Mode"
-msgstr "Bit Stream m�d"
-
-msgid "Audio Coding Mode"
-msgstr "Hang k�dol�si m�d"
-
-msgid "Center Mix Level"
-msgstr "K�z�pcsatorna kever�si jelszintje"
-
-msgid "Surround Mix Level"
-msgstr "T�rhat�s csatorna kever�si szintje"
-
-msgid "Dolby Surround Mode"
-msgstr "Dolby Surround m�d"
-
-msgid "Low Frequency Effects"
-msgstr "LFE - alacsony frekvenci�s effektek"
-
-msgid "Dialogue Normalization"
-msgstr "P�rbesz�d jelszint normaliz�l�sa"
-
msgid "Fixed"
msgstr "�lland�"
diff --git a/po/it_IT.po b/po/it_IT.po
index 29de2a9..8818e2f 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: Diego Pierotto <vdr-italian at tiscali.it>\n"
"Language-Team: Italian <vdr at linuxtv.org>\n"
"Language: it\n"
@@ -29,6 +29,99 @@ msgstr "Info segnale"
msgid "Femon not available"
msgstr "Femon non disponibile"
+msgid "Video"
+msgstr "Video"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "Audio"
+
+msgid "Transponder Information"
+msgstr "Informazioni transponder"
+
+msgid "Apid"
+msgstr "PID Audio"
+
+msgid "Dpid"
+msgstr "PID AC3"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "Coderate"
+
+msgid "Protocol"
+msgstr ""
+
+msgid "Bitrate"
+msgstr "Bitrate"
+
+msgid "Stream Information"
+msgstr "Informazioni flusso"
+
+msgid "Video Stream"
+msgstr "Flusso video"
+
+msgid "Codec"
+msgstr "Codifica"
+
+msgid "Aspect Ratio"
+msgstr "Formato immagine"
+
+msgid "Frame Rate"
+msgstr "Frame rate"
+
+msgid "Video Format"
+msgstr "Formato video"
+
+msgid "Resolution"
+msgstr "Risoluzione"
+
+msgid "Audio Stream"
+msgstr "Flusso audio"
+
+msgid "Channel Mode"
+msgstr "Modalità canale"
+
+msgid "Sampling Frequency"
+msgstr "Frequenza campionamento"
+
+msgid "AC-3 Stream"
+msgstr "Flusso AC-3"
+
+msgid "Bit Stream Mode"
+msgstr "Modalità bitstream"
+
+msgid "Audio Coding Mode"
+msgstr "Modalità codifica audio"
+
+msgid "Center Mix Level"
+msgstr "Livello sonoro centrale"
+
+msgid "Surround Mix Level"
+msgstr "Livello sonoro surround"
+
+msgid "Dolby Surround Mode"
+msgstr "Modalità Dolby Surround"
+
+msgid "Low Frequency Effects"
+msgstr "Effetti bassa frequenza"
+
+msgid "Dialogue Normalization"
+msgstr "Normalizzazione dialoghi"
+
msgid "basic"
msgstr "base"
@@ -38,9 +131,6 @@ msgstr "transponder"
msgid "stream"
msgstr "flusso"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "Classico"
@@ -152,96 +242,6 @@ msgstr "Definisci l'indirizzo IP del servizio SVDRP."
msgid "Help"
msgstr "Aiuto"
-msgid "Video"
-msgstr "Video"
-
-msgid "Audio"
-msgstr "Audio"
-
-msgid "Transponder Information"
-msgstr "Informazioni transponder"
-
-msgid "Apid"
-msgstr "PID Audio"
-
-msgid "Dpid"
-msgstr "PID AC3"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "Coderate"
-
-msgid "Protocol"
-msgstr ""
-
-msgid "Bitrate"
-msgstr "Bitrate"
-
-msgid "Stream Information"
-msgstr "Informazioni flusso"
-
-msgid "Video Stream"
-msgstr "Flusso video"
-
-msgid "Codec"
-msgstr "Codifica"
-
-msgid "Aspect Ratio"
-msgstr "Formato immagine"
-
-msgid "Frame Rate"
-msgstr "Frame rate"
-
-msgid "Video Format"
-msgstr "Formato video"
-
-msgid "Resolution"
-msgstr "Risoluzione"
-
-msgid "Audio Stream"
-msgstr "Flusso audio"
-
-msgid "Channel Mode"
-msgstr "Modalità canale"
-
-msgid "Sampling Frequency"
-msgstr "Frequenza campionamento"
-
-msgid "AC-3 Stream"
-msgstr "Flusso AC-3"
-
-msgid "Bit Stream Mode"
-msgstr "Modalità bitstream"
-
-msgid "Audio Coding Mode"
-msgstr "Modalità codifica audio"
-
-msgid "Center Mix Level"
-msgstr "Livello sonoro centrale"
-
-msgid "Surround Mix Level"
-msgstr "Livello sonoro surround"
-
-msgid "Dolby Surround Mode"
-msgstr "Modalità Dolby Surround"
-
-msgid "Low Frequency Effects"
-msgstr "Effetti bassa frequenza"
-
-msgid "Dialogue Normalization"
-msgstr "Normalizzazione dialoghi"
-
msgid "Fixed"
msgstr "Fisso"
diff --git a/po/lt_LT.po b/po/lt_LT.po
index b6f8f73..ee2b3fc 100644
--- a/po/lt_LT.po
+++ b/po/lt_LT.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: Valdemaras Pipiras <varas at ambernet.lt>\n"
"Language-Team: Lithuanian <vdr at linuxtv.org>\n"
"Language: lt\n"
@@ -25,6 +25,99 @@ msgstr "Signalo informacija"
msgid "Femon not available"
msgstr "Femon įskiepas nepasiekiamas"
+msgid "Video"
+msgstr "Video"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "Audio"
+
+msgid "Transponder Information"
+msgstr "Siųstuvo informacija"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "Kodavimo dažnis"
+
+msgid "Protocol"
+msgstr "Protokolas"
+
+msgid "Bitrate"
+msgstr "Kokybė"
+
+msgid "Stream Information"
+msgstr "Srauto informacija"
+
+msgid "Video Stream"
+msgstr "Video srautas"
+
+msgid "Codec"
+msgstr "Kodekas"
+
+msgid "Aspect Ratio"
+msgstr "Proporcijos"
+
+msgid "Frame Rate"
+msgstr "Kadrų dažnis"
+
+msgid "Video Format"
+msgstr "Video formatas"
+
+msgid "Resolution"
+msgstr "Rezoliucija"
+
+msgid "Audio Stream"
+msgstr "Audio srautas"
+
+msgid "Channel Mode"
+msgstr "Kanalo būsena"
+
+msgid "Sampling Frequency"
+msgstr "Parodomasis dažnis"
+
+msgid "AC-3 Stream"
+msgstr "AC-3 srautas"
+
+msgid "Bit Stream Mode"
+msgstr "Srauto būsena"
+
+msgid "Audio Coding Mode"
+msgstr "Audio kodavimas"
+
+msgid "Center Mix Level"
+msgstr "Centrinis mikserio lygis"
+
+msgid "Surround Mix Level"
+msgstr "Surround Mix lygis"
+
+msgid "Dolby Surround Mode"
+msgstr "Dolby Surround būklė"
+
+msgid "Low Frequency Effects"
+msgstr "Žemo dažnio efektai"
+
+msgid "Dialogue Normalization"
+msgstr "Dialogo normalizacija"
+
msgid "basic"
msgstr "Standartinis"
@@ -34,9 +127,6 @@ msgstr "Siųstuvas"
msgid "stream"
msgstr "Srautas"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "Klasikinis"
@@ -148,96 +238,6 @@ msgstr "Nustatyti SVDRP įrenginio IP adresą."
msgid "Help"
msgstr "Pagalba"
-msgid "Video"
-msgstr "Video"
-
-msgid "Audio"
-msgstr "Audio"
-
-msgid "Transponder Information"
-msgstr "Siųstuvo informacija"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "Kodavimo dažnis"
-
-msgid "Protocol"
-msgstr "Protokolas"
-
-msgid "Bitrate"
-msgstr "Kokybė"
-
-msgid "Stream Information"
-msgstr "Srauto informacija"
-
-msgid "Video Stream"
-msgstr "Video srautas"
-
-msgid "Codec"
-msgstr "Kodekas"
-
-msgid "Aspect Ratio"
-msgstr "Proporcijos"
-
-msgid "Frame Rate"
-msgstr "Kadrų dažnis"
-
-msgid "Video Format"
-msgstr "Video formatas"
-
-msgid "Resolution"
-msgstr "Rezoliucija"
-
-msgid "Audio Stream"
-msgstr "Audio srautas"
-
-msgid "Channel Mode"
-msgstr "Kanalo būsena"
-
-msgid "Sampling Frequency"
-msgstr "Parodomasis dažnis"
-
-msgid "AC-3 Stream"
-msgstr "AC-3 srautas"
-
-msgid "Bit Stream Mode"
-msgstr "Srauto būsena"
-
-msgid "Audio Coding Mode"
-msgstr "Audio kodavimas"
-
-msgid "Center Mix Level"
-msgstr "Centrinis mikserio lygis"
-
-msgid "Surround Mix Level"
-msgstr "Surround Mix lygis"
-
-msgid "Dolby Surround Mode"
-msgstr "Dolby Surround būklė"
-
-msgid "Low Frequency Effects"
-msgstr "Žemo dažnio efektai"
-
-msgid "Dialogue Normalization"
-msgstr "Dialogo normalizacija"
-
msgid "Fixed"
msgstr "Sutvarkyta"
diff --git a/po/ru_RU.po b/po/ru_RU.po
index d07851f..ac65c8b 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: Vyacheslav Dikonov\n"
"Language-Team: Russian <vdr at linuxtv.org>\n"
"Language: ru\n"
@@ -25,6 +25,99 @@ msgstr "
msgid "Femon not available"
msgstr ""
+msgid "Video"
+msgstr "�����"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "�����"
+
+msgid "Transponder Information"
+msgstr "�������� � ������"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "Coderate"
+
+msgid "Protocol"
+msgstr ""
+
+msgid "Bitrate"
+msgstr ""
+
+msgid "Stream Information"
+msgstr ""
+
+msgid "Video Stream"
+msgstr ""
+
+msgid "Codec"
+msgstr ""
+
+msgid "Aspect Ratio"
+msgstr ""
+
+msgid "Frame Rate"
+msgstr ""
+
+msgid "Video Format"
+msgstr ""
+
+msgid "Resolution"
+msgstr ""
+
+msgid "Audio Stream"
+msgstr ""
+
+msgid "Channel Mode"
+msgstr ""
+
+msgid "Sampling Frequency"
+msgstr ""
+
+msgid "AC-3 Stream"
+msgstr ""
+
+msgid "Bit Stream Mode"
+msgstr ""
+
+msgid "Audio Coding Mode"
+msgstr ""
+
+msgid "Center Mix Level"
+msgstr ""
+
+msgid "Surround Mix Level"
+msgstr ""
+
+msgid "Dolby Surround Mode"
+msgstr ""
+
+msgid "Low Frequency Effects"
+msgstr ""
+
+msgid "Dialogue Normalization"
+msgstr ""
+
msgid "basic"
msgstr ""
@@ -34,9 +127,6 @@ msgstr ""
msgid "stream"
msgstr ""
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr ""
@@ -148,96 +238,6 @@ msgstr ""
msgid "Help"
msgstr ""
-msgid "Video"
-msgstr "�����"
-
-msgid "Audio"
-msgstr "�����"
-
-msgid "Transponder Information"
-msgstr "�������� � ������"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "Coderate"
-
-msgid "Protocol"
-msgstr ""
-
-msgid "Bitrate"
-msgstr ""
-
-msgid "Stream Information"
-msgstr ""
-
-msgid "Video Stream"
-msgstr ""
-
-msgid "Codec"
-msgstr ""
-
-msgid "Aspect Ratio"
-msgstr ""
-
-msgid "Frame Rate"
-msgstr ""
-
-msgid "Video Format"
-msgstr ""
-
-msgid "Resolution"
-msgstr ""
-
-msgid "Audio Stream"
-msgstr ""
-
-msgid "Channel Mode"
-msgstr ""
-
-msgid "Sampling Frequency"
-msgstr ""
-
-msgid "AC-3 Stream"
-msgstr ""
-
-msgid "Bit Stream Mode"
-msgstr ""
-
-msgid "Audio Coding Mode"
-msgstr ""
-
-msgid "Center Mix Level"
-msgstr ""
-
-msgid "Surround Mix Level"
-msgstr ""
-
-msgid "Dolby Surround Mode"
-msgstr ""
-
-msgid "Low Frequency Effects"
-msgstr ""
-
-msgid "Dialogue Normalization"
-msgstr ""
-
msgid "Fixed"
msgstr ""
diff --git a/po/sk_SK.po b/po/sk_SK.po
index cac252c..5f40aa9 100644
--- a/po/sk_SK.po
+++ b/po/sk_SK.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: Milan Hrala <hrala.milan at gmail.com>\n"
"Language-Team: Slovak <vdr at linuxtv.org>\n"
"Language: sk\n"
@@ -25,6 +25,99 @@ msgstr "Inform
msgid "Femon not available"
msgstr "Femon nie je k dispoz�cii"
+msgid "Video"
+msgstr "Video"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "Zvuk"
+
+msgid "Transponder Information"
+msgstr "Inform�cie transpond�ra"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "r�chlos� k�dovania"
+
+msgid "Protocol"
+msgstr "Protokol"
+
+msgid "Bitrate"
+msgstr "D�tov� tok"
+
+msgid "Stream Information"
+msgstr "Inform�cie o d�tovom toku"
+
+msgid "Video Stream"
+msgstr "Video stopa"
+
+msgid "Codec"
+msgstr "kodek"
+
+msgid "Aspect Ratio"
+msgstr "Pomer str�n"
+
+msgid "Frame Rate"
+msgstr "Po�et sn�mkov"
+
+msgid "Video Format"
+msgstr "Video form�t"
+
+msgid "Resolution"
+msgstr "Rozl�enie"
+
+msgid "Audio Stream"
+msgstr "Zvukov� stopa"
+
+msgid "Channel Mode"
+msgstr "re�im kan�la"
+
+msgid "Sampling Frequency"
+msgstr "Vzorkovacia frekvencia"
+
+msgid "AC-3 Stream"
+msgstr "AC-3 d�tov� tok"
+
+msgid "Bit Stream Mode"
+msgstr "re�im bitov�ho toku"
+
+msgid "Audio Coding Mode"
+msgstr "Re��m k�dovania zvuku"
+
+msgid "Center Mix Level"
+msgstr "�rove� Center mix"
+
+msgid "Surround Mix Level"
+msgstr "�rove� Surround mix"
+
+msgid "Dolby Surround Mode"
+msgstr "Dolby Surround re��m"
+
+msgid "Low Frequency Effects"
+msgstr "Basov� efekty"
+
+msgid "Dialogue Normalization"
+msgstr "�tandartn� dial�g"
+
msgid "basic"
msgstr "�tandardtn�"
@@ -34,9 +127,6 @@ msgstr "Transpond
msgid "stream"
msgstr "d�tov� tok"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "Klasick�"
@@ -148,96 +238,6 @@ msgstr "zadajte IP adresu slu
msgid "Help"
msgstr "Pomoc"
-msgid "Video"
-msgstr "Video"
-
-msgid "Audio"
-msgstr "Zvuk"
-
-msgid "Transponder Information"
-msgstr "Inform�cie transpond�ra"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "r�chlos� k�dovania"
-
-msgid "Protocol"
-msgstr "Protokol"
-
-msgid "Bitrate"
-msgstr "D�tov� tok"
-
-msgid "Stream Information"
-msgstr "Inform�cie o d�tovom toku"
-
-msgid "Video Stream"
-msgstr "Video stopa"
-
-msgid "Codec"
-msgstr "kodek"
-
-msgid "Aspect Ratio"
-msgstr "Pomer str�n"
-
-msgid "Frame Rate"
-msgstr "Po�et sn�mkov"
-
-msgid "Video Format"
-msgstr "Video form�t"
-
-msgid "Resolution"
-msgstr "Rozl�enie"
-
-msgid "Audio Stream"
-msgstr "Zvukov� stopa"
-
-msgid "Channel Mode"
-msgstr "re�im kan�la"
-
-msgid "Sampling Frequency"
-msgstr "Vzorkovacia frekvencia"
-
-msgid "AC-3 Stream"
-msgstr "AC-3 d�tov� tok"
-
-msgid "Bit Stream Mode"
-msgstr "re�im bitov�ho toku"
-
-msgid "Audio Coding Mode"
-msgstr "Re��m k�dovania zvuku"
-
-msgid "Center Mix Level"
-msgstr "�rove� Center mix"
-
-msgid "Surround Mix Level"
-msgstr "�rove� Surround mix"
-
-msgid "Dolby Surround Mode"
-msgstr "Dolby Surround re��m"
-
-msgid "Low Frequency Effects"
-msgstr "Basov� efekty"
-
-msgid "Dialogue Normalization"
-msgstr "�tandartn� dial�g"
-
msgid "Fixed"
msgstr "Pevn�"
diff --git a/po/uk_UA.po b/po/uk_UA.po
index 7ca0a3d..56efac1 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -4,10 +4,10 @@
# Yarema aka Knedlyk <yupadmin at gmail.com>, 2010.
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: Yarema aka Knedlyk <yupadmin at gmail.com>\n"
"Language-Team: Ukrainian <translation at linux.org.ua>\n"
"Language: uk\n"
@@ -25,6 +25,99 @@ msgstr "Інформація про сигнал"
msgid "Femon not available"
msgstr "Femon не доступний"
+msgid "Video"
+msgstr "Відео"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "Аудіо"
+
+msgid "Transponder Information"
+msgstr "Інформація про транспондер"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "Шв. кодування"
+
+msgid "Protocol"
+msgstr "Протокол"
+
+msgid "Bitrate"
+msgstr "Бітрейт"
+
+msgid "Stream Information"
+msgstr "Інформація про потік"
+
+msgid "Video Stream"
+msgstr "Відео потік"
+
+msgid "Codec"
+msgstr "Кодек"
+
+msgid "Aspect Ratio"
+msgstr "Співвідношення сторін"
+
+msgid "Frame Rate"
+msgstr "Частота кадрів"
+
+msgid "Video Format"
+msgstr "Формат відео"
+
+msgid "Resolution"
+msgstr "Роздільна здатність"
+
+msgid "Audio Stream"
+msgstr "Аудіо потік"
+
+msgid "Channel Mode"
+msgstr "Режим каналу"
+
+msgid "Sampling Frequency"
+msgstr "Частота"
+
+msgid "AC-3 Stream"
+msgstr "AC-3 потік"
+
+msgid "Bit Stream Mode"
+msgstr "Режим бітового потоку:"
+
+msgid "Audio Coding Mode"
+msgstr "Режим кодування малюнка"
+
+msgid "Center Mix Level"
+msgstr "Рівень міксування в центрі"
+
+msgid "Surround Mix Level"
+msgstr "Рівень міксування заповнення"
+
+msgid "Dolby Surround Mode"
+msgstr "Режим Dolby Surround"
+
+msgid "Low Frequency Effects"
+msgstr "Ефекти низької частоти"
+
+msgid "Dialogue Normalization"
+msgstr "Нормалізація гучності"
+
msgid "basic"
msgstr "основне"
@@ -34,9 +127,6 @@ msgstr "транспондер"
msgid "stream"
msgstr "потік"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "Класичний"
@@ -148,96 +238,6 @@ msgstr "Визначення IP адреси сервісу SVDRP."
msgid "Help"
msgstr "Допомога"
-msgid "Video"
-msgstr "Відео"
-
-msgid "Audio"
-msgstr "Аудіо"
-
-msgid "Transponder Information"
-msgstr "Інформація про транспондер"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "Шв. кодування"
-
-msgid "Protocol"
-msgstr "Протокол"
-
-msgid "Bitrate"
-msgstr "Бітрейт"
-
-msgid "Stream Information"
-msgstr "Інформація про потік"
-
-msgid "Video Stream"
-msgstr "Відео потік"
-
-msgid "Codec"
-msgstr "Кодек"
-
-msgid "Aspect Ratio"
-msgstr "Співвідношення сторін"
-
-msgid "Frame Rate"
-msgstr "Частота кадрів"
-
-msgid "Video Format"
-msgstr "Формат відео"
-
-msgid "Resolution"
-msgstr "Роздільна здатність"
-
-msgid "Audio Stream"
-msgstr "Аудіо потік"
-
-msgid "Channel Mode"
-msgstr "Режим каналу"
-
-msgid "Sampling Frequency"
-msgstr "Частота"
-
-msgid "AC-3 Stream"
-msgstr "AC-3 потік"
-
-msgid "Bit Stream Mode"
-msgstr "Режим бітового потоку:"
-
-msgid "Audio Coding Mode"
-msgstr "Режим кодування малюнка"
-
-msgid "Center Mix Level"
-msgstr "Рівень міксування в центрі"
-
-msgid "Surround Mix Level"
-msgstr "Рівень міксування заповнення"
-
-msgid "Dolby Surround Mode"
-msgstr "Режим Dolby Surround"
-
-msgid "Low Frequency Effects"
-msgstr "Ефекти низької частоти"
-
-msgid "Dialogue Normalization"
-msgstr "Нормалізація гучності"
-
msgid "Fixed"
msgstr "Фіксовано"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 4c5943d..b4b3865 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: NanFeng <nfgx at 21cn.com>\n"
"Language-Team: Chinese (simplified) <vdr at linuxtv.org>\n"
"Language: zh_CN\n"
@@ -25,6 +25,99 @@ msgstr "频道信息浏览"
msgid "Femon not available"
msgstr "Femon插件无法使用"
+msgid "Video"
+msgstr "视频"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "音频"
+
+msgid "Transponder Information"
+msgstr "转发器信息"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "码速率"
+
+msgid "Protocol"
+msgstr ""
+
+msgid "Bitrate"
+msgstr "比特率"
+
+msgid "Stream Information"
+msgstr "流信息"
+
+msgid "Video Stream"
+msgstr "视频流"
+
+msgid "Codec"
+msgstr "解码模式"
+
+msgid "Aspect Ratio"
+msgstr "纵横比"
+
+msgid "Frame Rate"
+msgstr "帧速率"
+
+msgid "Video Format"
+msgstr "视频制式"
+
+msgid "Resolution"
+msgstr "分辨率"
+
+msgid "Audio Stream"
+msgstr "音频流"
+
+msgid "Channel Mode"
+msgstr "声道模式"
+
+msgid "Sampling Frequency"
+msgstr "采样频率"
+
+msgid "AC-3 Stream"
+msgstr "AC-3流"
+
+msgid "Bit Stream Mode"
+msgstr "比特流模式"
+
+msgid "Audio Coding Mode"
+msgstr "音频编码模式"
+
+msgid "Center Mix Level"
+msgstr "中心混合级别"
+
+msgid "Surround Mix Level"
+msgstr "环绕混合级别"
+
+msgid "Dolby Surround Mode"
+msgstr "杜比环绕声模式"
+
+msgid "Low Frequency Effects"
+msgstr "低频效果"
+
+msgid "Dialogue Normalization"
+msgstr "对话正常化"
+
msgid "basic"
msgstr "基本"
@@ -34,9 +127,6 @@ msgstr "转发器"
msgid "stream"
msgstr "数据流"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "经典"
@@ -148,96 +238,6 @@ msgstr "定义SVDRP服务的IP地址."
msgid "Help"
msgstr "帮助"
-msgid "Video"
-msgstr "视频"
-
-msgid "Audio"
-msgstr "音频"
-
-msgid "Transponder Information"
-msgstr "转发器信息"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "码速率"
-
-msgid "Protocol"
-msgstr ""
-
-msgid "Bitrate"
-msgstr "比特率"
-
-msgid "Stream Information"
-msgstr "流信息"
-
-msgid "Video Stream"
-msgstr "视频流"
-
-msgid "Codec"
-msgstr "解码模式"
-
-msgid "Aspect Ratio"
-msgstr "纵横比"
-
-msgid "Frame Rate"
-msgstr "帧速率"
-
-msgid "Video Format"
-msgstr "视频制式"
-
-msgid "Resolution"
-msgstr "分辨率"
-
-msgid "Audio Stream"
-msgstr "音频流"
-
-msgid "Channel Mode"
-msgstr "声道模式"
-
-msgid "Sampling Frequency"
-msgstr "采样频率"
-
-msgid "AC-3 Stream"
-msgstr "AC-3流"
-
-msgid "Bit Stream Mode"
-msgstr "比特流模式"
-
-msgid "Audio Coding Mode"
-msgstr "音频编码模式"
-
-msgid "Center Mix Level"
-msgstr "中心混合级别"
-
-msgid "Surround Mix Level"
-msgstr "环绕混合级别"
-
-msgid "Dolby Surround Mode"
-msgstr "杜比环绕声模式"
-
-msgid "Low Frequency Effects"
-msgstr "低频效果"
-
-msgid "Dialogue Normalization"
-msgstr "对话正常化"
-
msgid "Fixed"
msgstr "固定"
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 8ceff81..e7d246d 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: vdr-femon 2.2.0\n"
+"Project-Id-Version: vdr-femon 2.2.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-02-19 02:19+0200\n"
-"PO-Revision-Date: 2015-02-19 02:19+0200\n"
+"POT-Creation-Date: 2015-04-04 04:04+0300\n"
+"PO-Revision-Date: 2015-04-04 04:04+0300\n"
"Last-Translator: NanFeng <nfgx at 21cn.com>\n"
"Language-Team: Chinese (traditional) <vdr at linuxtv.org>\n"
"Language: zh_TW\n"
@@ -25,6 +25,99 @@ msgstr "頻道信息瀏覽"
msgid "Femon not available"
msgstr "Femon插件無法使用"
+msgid "Video"
+msgstr "視頻"
+
+msgid "AC-3"
+msgstr "AC-3"
+
+msgid "Audio"
+msgstr "音頻"
+
+msgid "Transponder Information"
+msgstr "轉發器信息"
+
+msgid "Apid"
+msgstr "Apid"
+
+msgid "Dpid"
+msgstr "Dpid"
+
+msgid "Spid"
+msgstr "Spid"
+
+msgid "Nid"
+msgstr "Nid"
+
+msgid "Tid"
+msgstr "Tid"
+
+msgid "Rid"
+msgstr "Rid"
+
+msgid "Coderate"
+msgstr "碼速率"
+
+msgid "Protocol"
+msgstr ""
+
+msgid "Bitrate"
+msgstr "比特率"
+
+msgid "Stream Information"
+msgstr "流信息"
+
+msgid "Video Stream"
+msgstr "視頻流"
+
+msgid "Codec"
+msgstr "解碼模式"
+
+msgid "Aspect Ratio"
+msgstr "縱橫比"
+
+msgid "Frame Rate"
+msgstr "幀速率"
+
+msgid "Video Format"
+msgstr "視頻制式"
+
+msgid "Resolution"
+msgstr "分辨率"
+
+msgid "Audio Stream"
+msgstr "音頻流"
+
+msgid "Channel Mode"
+msgstr "聲道模式"
+
+msgid "Sampling Frequency"
+msgstr "採樣頻率"
+
+msgid "AC-3 Stream"
+msgstr "AC-3流"
+
+msgid "Bit Stream Mode"
+msgstr "比特流模式"
+
+msgid "Audio Coding Mode"
+msgstr "音頻編碼模式"
+
+msgid "Center Mix Level"
+msgstr "中心混合級別"
+
+msgid "Surround Mix Level"
+msgstr "環繞混合級別"
+
+msgid "Dolby Surround Mode"
+msgstr "杜比環繞聲模式"
+
+msgid "Low Frequency Effects"
+msgstr "低頻效果"
+
+msgid "Dialogue Normalization"
+msgstr "對話正常化"
+
msgid "basic"
msgstr "基本"
@@ -34,9 +127,6 @@ msgstr "轉發器"
msgid "stream"
msgstr "數據流"
-msgid "AC-3"
-msgstr "AC-3"
-
msgid "Classic"
msgstr "經典"
@@ -148,96 +238,6 @@ msgstr "定義SVDRP服務的IP地址."
msgid "Help"
msgstr "幫助"
-msgid "Video"
-msgstr "視頻"
-
-msgid "Audio"
-msgstr "音頻"
-
-msgid "Transponder Information"
-msgstr "轉發器信息"
-
-msgid "Apid"
-msgstr "Apid"
-
-msgid "Dpid"
-msgstr "Dpid"
-
-msgid "Spid"
-msgstr "Spid"
-
-msgid "Nid"
-msgstr "Nid"
-
-msgid "Tid"
-msgstr "Tid"
-
-msgid "Rid"
-msgstr "Rid"
-
-msgid "Coderate"
-msgstr "碼速率"
-
-msgid "Protocol"
-msgstr ""
-
-msgid "Bitrate"
-msgstr "比特率"
-
-msgid "Stream Information"
-msgstr "流信息"
-
-msgid "Video Stream"
-msgstr "視頻流"
-
-msgid "Codec"
-msgstr "解碼模式"
-
-msgid "Aspect Ratio"
-msgstr "縱橫比"
-
-msgid "Frame Rate"
-msgstr "幀速率"
-
-msgid "Video Format"
-msgstr "視頻制式"
-
-msgid "Resolution"
-msgstr "分辨率"
-
-msgid "Audio Stream"
-msgstr "音頻流"
-
-msgid "Channel Mode"
-msgstr "聲道模式"
-
-msgid "Sampling Frequency"
-msgstr "採樣頻率"
-
-msgid "AC-3 Stream"
-msgstr "AC-3流"
-
-msgid "Bit Stream Mode"
-msgstr "比特流模式"
-
-msgid "Audio Coding Mode"
-msgstr "音頻編碼模式"
-
-msgid "Center Mix Level"
-msgstr "中心混合級別"
-
-msgid "Surround Mix Level"
-msgstr "環繞混合級別"
-
-msgid "Dolby Surround Mode"
-msgstr "杜比環繞聲模式"
-
-msgid "Low Frequency Effects"
-msgstr "低頻效果"
-
-msgid "Dialogue Normalization"
-msgstr "對話正常化"
-
msgid "Fixed"
msgstr "固定"
diff --git a/receiver.c b/receiver.c
new file mode 100644
index 0000000..4401dab
--- /dev/null
+++ b/receiver.c
@@ -0,0 +1,252 @@
+/*
+ * receiver.c: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#include <unistd.h>
+
+#include "config.h"
+#include "log.h"
+#include "tools.h"
+#include "receiver.h"
+
+cFemonReceiver::cFemonReceiver(const cChannel *channelP, int aTrackP, int dTrackP)
+: cReceiver(channelP),
+ cThread("femon receiver"),
+ mutexM(),
+ sleepM(),
+ activeM(false),
+ detectH264M(this),
+ detectMpegM(this, this),
+ detectAacM(this),
+ detectLatmM(this),
+ detectAc3M(this),
+ videoBufferM(KILOBYTE(512), TS_SIZE, false, "Femon video"),
+ videoTypeM(channelP ? channelP->Vtype(): 0),
+ videoPidM(channelP ? channelP->Vpid() : 0),
+ videoPacketCountM(0),
+ videoBitRateM(0.0),
+ videoValidM(false),
+ audioBufferM(KILOBYTE(256), TS_SIZE, false, "Femon audio"),
+ audioPidM(channelP ? channelP->Apid(aTrackP) : 0),
+ audioPacketCountM(0),
+ audioBitRateM(0.0),
+ audioValidM(false),
+ ac3BufferM(KILOBYTE(256), TS_SIZE, false, "Femon AC3"),
+ ac3PidM(channelP ? channelP->Dpid(dTrackP) : 0),
+ ac3PacketCountM(0),
+ ac3BitRateM(0),
+ ac3ValidM(false)
+{
+ debug1("%s (, %d, %d)", __PRETTY_FUNCTION__, aTrackP, dTrackP);
+
+ SetPids(NULL);
+ AddPid(videoPidM);
+ AddPid(audioPidM);
+ AddPid(ac3PidM);
+
+ videoBufferM.SetTimeouts(0, 100);
+ audioBufferM.SetTimeouts(0, 100);
+ ac3BufferM.SetTimeouts(0, 100);
+
+ videoInfoM.codec = VIDEO_CODEC_INVALID;
+ videoInfoM.format = VIDEO_FORMAT_INVALID;
+ videoInfoM.scan = VIDEO_SCAN_INVALID;
+ videoInfoM.aspectRatio = VIDEO_ASPECT_RATIO_INVALID;
+ videoInfoM.width = 0;
+ videoInfoM.height = 0;
+ videoInfoM.frameRate = 0;
+ videoInfoM.bitrate = AUDIO_BITRATE_INVALID;
+ audioInfoM.codec = AUDIO_CODEC_UNKNOWN;
+ audioInfoM.bitrate = AUDIO_BITRATE_INVALID;
+ audioInfoM.samplingFrequency = AUDIO_SAMPLING_FREQUENCY_INVALID;
+ audioInfoM.channelMode = AUDIO_CHANNEL_MODE_INVALID;
+ ac3InfoM.bitrate = AUDIO_BITRATE_INVALID;
+ ac3InfoM.samplingFrequency = AUDIO_SAMPLING_FREQUENCY_INVALID;
+ ac3InfoM.bitstreamMode = AUDIO_BITSTREAM_MODE_INVALID;
+ ac3InfoM.audioCodingMode = AUDIO_CODING_MODE_INVALID;
+ ac3InfoM.dolbySurroundMode = AUDIO_DOLBY_SURROUND_MODE_INVALID;
+ ac3InfoM.centerMixLevel = AUDIO_CENTER_MIX_LEVEL_INVALID;
+ ac3InfoM.surroundMixLevel = AUDIO_SURROUND_MIX_LEVEL_INVALID;
+ ac3InfoM.dialogLevel = 0;
+ ac3InfoM.lfe = false;
+}
+
+cFemonReceiver::~cFemonReceiver(void)
+{
+ debug1("%s", __PRETTY_FUNCTION__);
+ Deactivate();
+}
+
+void cFemonReceiver::Deactivate(void)
+{
+ debug1("%s", __PRETTY_FUNCTION__);
+ Detach();
+ if (activeM) {
+ activeM = false;
+ sleepM.Signal();
+ if (Running())
+ Cancel(3);
+ }
+}
+
+void cFemonReceiver::Activate(bool onP)
+{
+ debug1("%s (%d)", __PRETTY_FUNCTION__, onP);
+ if (onP)
+ Start();
+ else
+ Deactivate();
+}
+
+void cFemonReceiver::Receive(uchar *dataP, int lengthP)
+{
+ // TS packet length: TS_SIZE
+ if (Running() && (*dataP == TS_SYNC_BYTE) && (lengthP == TS_SIZE)) {
+ int len, pid = TsPid(dataP);
+ if (pid == videoPidM) {
+ ++videoPacketCountM;
+ len = videoBufferM.Put(dataP, lengthP);
+ if (len != lengthP) {
+ videoBufferM.ReportOverflow(lengthP - len);
+ videoBufferM.Clear();
+ }
+ }
+ else if (pid == audioPidM) {
+ ++audioPacketCountM;
+ len = audioBufferM.Put(dataP, lengthP);
+ if (len != lengthP) {
+ audioBufferM.ReportOverflow(lengthP - len);
+ audioBufferM.Clear();
+ }
+ }
+ else if (pid == ac3PidM) {
+ ++ac3PacketCountM;
+ len = ac3BufferM.Put(dataP, lengthP);
+ if (len != lengthP) {
+ ac3BufferM.ReportOverflow(lengthP - len);
+ ac3BufferM.Clear();
+ }
+ }
+ }
+}
+
+void cFemonReceiver::Action(void)
+{
+ debug1("%s", __PRETTY_FUNCTION__);
+ cTimeMs calcPeriod(0);
+ activeM = true;
+
+ while (Running() && activeM) {
+ uint8_t *Data;
+ double timeout;
+ int len, Length;
+ bool processed = false;
+
+ // process available video data
+ while ((Data = videoBufferM.Get(Length))) {
+ if (!activeM || (Length < TS_SIZE))
+ break;
+ Length = TS_SIZE;
+ if (*Data != TS_SYNC_BYTE) {
+ for (int i = 1; i < Length; ++i) {
+ if (Data[i] == TS_SYNC_BYTE) {
+ Length = i;
+ break;
+ }
+ }
+ videoBufferM.Del(Length);
+ continue;
+ }
+ processed = true;
+ if (TsPayloadStart(Data)) {
+ while (const uint8_t *p = videoAssemblerM.GetPes(len)) {
+ if (videoTypeM == 0x1B) { // MPEG4
+ if (detectH264M.processVideo(p, len)) {
+ videoValidM = true;
+ break;
+ }
+ }
+ else {
+ if (detectMpegM.processVideo(p, len)) {
+ videoValidM = true;
+ break;
+ }
+ }
+ }
+ videoAssemblerM.Reset();
+ }
+ videoAssemblerM.PutTs(Data, Length);
+ videoBufferM.Del(Length);
+ }
+
+ // process available audio data
+ while ((Data = audioBufferM.Get(Length))) {
+ if (!activeM || (Length < TS_SIZE))
+ break;
+ Length = TS_SIZE;
+ if (*Data != TS_SYNC_BYTE) {
+ for (int i = 1; i < Length; ++i) {
+ if (Data[i] == TS_SYNC_BYTE) {
+ Length = i;
+ break;
+ }
+ }
+ audioBufferM.Del(Length);
+ continue;
+ }
+ processed = true;
+ if (const uint8_t *p = audioAssemblerM.GetPes(len)) {
+ if (detectAacM.processAudio(p, len) || detectLatmM.processAudio(p, len) || detectMpegM.processAudio(p, len))
+ audioValidM = true;
+ audioAssemblerM.Reset();
+ }
+ audioAssemblerM.PutTs(Data, Length);
+ audioBufferM.Del(Length);
+ }
+
+ // process available dolby data
+ while ((Data = ac3BufferM.Get(Length))) {
+ if (!activeM || (Length < TS_SIZE))
+ break;
+ Length = TS_SIZE;
+ if (*Data != TS_SYNC_BYTE) {
+ for (int i = 1; i < Length; ++i) {
+ if (Data[i] == TS_SYNC_BYTE) {
+ Length = i;
+ break;
+ }
+ }
+ ac3BufferM.Del(Length);
+ continue;
+ }
+ processed = true;
+ if (const uint8_t *p = ac3AssemblerM.GetPes(len)) {
+ if (detectAc3M.processAudio(p, len))
+ ac3ValidM = true;
+ ac3AssemblerM.Reset();
+ }
+ ac3AssemblerM.PutTs(Data, Length);
+ ac3BufferM.Del(Length);
+ }
+
+ // calculate bitrates
+ timeout = double(calcPeriod.Elapsed());
+ if (activeM && (timeout >= (100.0 * FemonConfig.GetCalcInterval()))) {
+ // TS packet 188 bytes - 4 byte header; MPEG standard defines 1Mbit = 1000000bit
+ // PES headers should be compensated!
+ videoBitRateM = (1000.0 * 8.0 * 184.0 * videoPacketCountM) / timeout;
+ videoPacketCountM = 0;
+ audioBitRateM = (1000.0 * 8.0 * 184.0 * audioPacketCountM) / timeout;
+ audioPacketCountM = 0;
+ ac3BitRateM = (1000.0 * 8.0 * 184.0 * ac3PacketCountM) / timeout;
+ ac3PacketCountM = 0;
+ calcPeriod.Set(0);
+ }
+
+ if (!processed)
+ sleepM.Wait(10); // to avoid busy loop and reduce cpu load
+ }
+}
diff --git a/receiver.h b/receiver.h
new file mode 100644
index 0000000..c4b5ecf
--- /dev/null
+++ b/receiver.h
@@ -0,0 +1,178 @@
+/*
+ * receiver.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_RECEIVER_H
+#define __FEMON_RECEIVER_H
+
+#include <vdr/thread.h>
+#include <vdr/receiver.h>
+
+#include "aac.h"
+#include "ac3.h"
+#include "audio.h"
+#include "h264.h"
+#include "latm.h"
+#include "mpeg.h"
+#include "tools.h"
+#include "video.h"
+
+class cFemonReceiver : public cReceiver, public cThread, public cFemonVideoIf, public cFemonAudioIf, public cFemonAC3If {
+private:
+ cMutex mutexM;
+ cCondWait sleepM;
+ bool activeM;
+
+ cFemonH264 detectH264M;
+ cFemonMPEG detectMpegM;
+ cFemonAAC detectAacM;
+ cFemonLATM detectLatmM;
+ cFemonAC3 detectAc3M;
+
+ cRingBufferLinear videoBufferM;
+ cTsToPes videoAssemblerM;
+ int videoTypeM;
+ int videoPidM;
+ int videoPacketCountM;
+ double videoBitRateM;
+ bool videoValidM;
+ video_info_t videoInfoM;
+
+ cRingBufferLinear audioBufferM;
+ cTsToPes audioAssemblerM;
+ int audioPidM;
+ int audioPacketCountM;
+ double audioBitRateM;
+ bool audioValidM;
+ audio_info_t audioInfoM;
+
+ cRingBufferLinear ac3BufferM;
+ cTsToPes ac3AssemblerM;
+ int ac3PidM;
+ int ac3PacketCountM;
+ double ac3BitRateM;
+ bool ac3ValidM;
+ ac3_info_t ac3InfoM;
+
+protected:
+ virtual void Activate(bool onP);
+ virtual void Receive(uchar *dataP, int lengthP);
+ virtual void Action(void);
+
+public:
+ virtual void SetVideoCodec(eVideoCodec codecP) { cMutexLock MutexLock(&mutexM);
+ videoInfoM.codec = codecP; }
+ virtual void SetVideoFormat(eVideoFormat formatP) { cMutexLock MutexLock(&mutexM);
+ videoInfoM.format = formatP; }
+ virtual void SetVideoScan(eVideoScan scanP) { cMutexLock MutexLock(&mutexM);
+ videoInfoM.scan = scanP; }
+ virtual void SetVideoAspectRatio(eVideoAspectRatio aspectRatioP) { cMutexLock MutexLock(&mutexM);
+ videoInfoM.aspectRatio = aspectRatioP; }
+ virtual void SetVideoSize(int widthP, int heightP) { cMutexLock MutexLock(&mutexM);
+ videoInfoM.width = widthP;
+ videoInfoM.height = heightP; }
+ virtual void SetVideoFramerate(double frameRateP) { cMutexLock MutexLock(&mutexM);
+ videoInfoM.frameRate = frameRateP; }
+ virtual void SetVideoBitrate(double bitRateP) { cMutexLock MutexLock(&mutexM);
+ videoInfoM.bitrate = bitRateP; }
+
+ virtual void SetAudioCodec(eAudioCodec codecP) { cMutexLock MutexLock(&mutexM);
+ audioInfoM.codec = codecP; }
+ virtual void SetAudioBitrate(double bitRateP) { cMutexLock MutexLock(&mutexM);
+ audioInfoM.bitrate = bitRateP; }
+ virtual void SetAudioSamplingFrequency(int samplingP) { cMutexLock MutexLock(&mutexM);
+ audioInfoM.samplingFrequency = samplingP; }
+ virtual void SetAudioChannel(eAudioChannelMode modeP) { cMutexLock MutexLock(&mutexM);
+ audioInfoM.channelMode = modeP; }
+
+ virtual void SetAC3Bitrate(int bitRateP) { cMutexLock MutexLock(&mutexM);
+ ac3InfoM.bitrate = bitRateP; }
+ virtual void SetAC3SamplingFrequency(int samplingP) { cMutexLock MutexLock(&mutexM);
+ ac3InfoM.samplingFrequency = samplingP; }
+ virtual void SetAC3Bitstream(int modeP) { cMutexLock MutexLock(&mutexM);
+ ac3InfoM.bitstreamMode = modeP; }
+ virtual void SetAC3AudioCoding(int modeP) { cMutexLock MutexLock(&mutexM);
+ ac3InfoM.audioCodingMode = modeP; }
+ virtual void SetAC3DolbySurround(int modeP) { cMutexLock MutexLock(&mutexM);
+ ac3InfoM.dolbySurroundMode = modeP; }
+ virtual void SetAC3CenterMix(int levelP) { cMutexLock MutexLock(&mutexM);
+ ac3InfoM.centerMixLevel = levelP; }
+ virtual void SetAC3SurroundMix(int levelP) { cMutexLock MutexLock(&mutexM);
+ ac3InfoM.surroundMixLevel = levelP; }
+ virtual void SetAC3Dialog(int levelP) { cMutexLock MutexLock(&mutexM);
+ ac3InfoM.dialogLevel = levelP; }
+ virtual void SetAC3LFE(bool onoffP) { cMutexLock MutexLock(&mutexM);
+ ac3InfoM.lfe = onoffP; }
+
+public:
+ cFemonReceiver(const cChannel* channelP, int aTrackp, int dTrackP);
+ virtual ~cFemonReceiver();
+ void Deactivate(void);
+
+ bool VideoValid(void) { cMutexLock MutexLock(&mutexM);
+ return videoValidM; }; // boolean
+ double VideoBitrate(void) { cMutexLock MutexLock(&mutexM);
+ return videoBitRateM; }; // bit/s
+ int VideoCodec(void) { cMutexLock MutexLock(&mutexM);
+ return videoInfoM.codec; }; // eVideoCodec
+ int VideoFormat(void) { cMutexLock MutexLock(&mutexM);
+ return videoInfoM.format; }; // eVideoFormat
+ int VideoScan(void) { cMutexLock MutexLock(&mutexM);
+ return videoInfoM.scan; }; // eVideoScan
+ int VideoAspectRatio(void) { cMutexLock MutexLock(&mutexM);
+ return videoInfoM.aspectRatio; }; // eVideoAspectRatio
+ int VideoHorizontalSize(void) { cMutexLock MutexLock(&mutexM);
+ return videoInfoM.width; }; // pixels
+ int VideoVerticalSize(void) { cMutexLock MutexLock(&mutexM);
+ return videoInfoM.height; }; // pixels
+ double VideoFrameRate(void) { cMutexLock MutexLock(&mutexM);
+ return videoInfoM.frameRate; }; // Hz
+ double VideoStreamBitrate(void) { cMutexLock MutexLock(&mutexM);
+ return videoInfoM.bitrate; }; // bit/s
+
+ bool AudioValid(void) { cMutexLock MutexLock(&mutexM);
+ return audioValidM; }; // boolean
+ double AudioBitrate(void) { cMutexLock MutexLock(&mutexM);
+ return audioBitRateM; }; // bit/s
+ int AudioCodec(void) { cMutexLock MutexLock(&mutexM);
+ return audioInfoM.codec; }; // eAudioCodec
+ int AudioChannelMode(void) { cMutexLock MutexLock(&mutexM);
+ return audioInfoM.channelMode; }; // eAudioChannelMode
+ double AudioStreamBitrate(void) { cMutexLock MutexLock(&mutexM);
+ return audioInfoM.bitrate; }; // bit/s or eAudioBitrate
+ int AudioSamplingFreq(void) { cMutexLock MutexLock(&mutexM);
+ return audioInfoM.samplingFrequency; }; // Hz or eAudioSamplingFrequency
+
+ bool AC3Valid(void) { cMutexLock MutexLock(&mutexM);
+ return ac3ValidM; }; // boolean
+ double AC3Bitrate(void) { cMutexLock MutexLock(&mutexM);
+ return ac3BitRateM; }; // bit/s
+ double AC3StreamBitrate(void) { cMutexLock MutexLock(&mutexM);
+ return ac3InfoM.bitrate; }; // bit/s or eAudioBitrate
+ int AC3SamplingFreq(void) { cMutexLock MutexLock(&mutexM);
+ return ac3InfoM.samplingFrequency; }; // Hz or eAudioSamplingFrequency
+ int AC3BitStreamMode(void) { cMutexLock MutexLock(&mutexM);
+ return ac3InfoM.bitstreamMode; }; // 0..7 or eAudioBitstreamMode
+ int AC3AudioCodingMode(void) { cMutexLock MutexLock(&mutexM);
+ return ac3InfoM.audioCodingMode; }; // 0..7 or eAudioCodingMode
+ bool AC3_2_0(void) { cMutexLock MutexLock(&mutexM);
+ return (ac3InfoM.audioCodingMode == AUDIO_CODING_MODE_2_0); }; // boolean
+ bool AC3_5_1(void) { cMutexLock MutexLock(&mutexM);
+ return (ac3InfoM.audioCodingMode == AUDIO_CODING_MODE_3_2); }; // boolean
+ int AC3DolbySurroundMode(void) { cMutexLock MutexLock(&mutexM);
+ return ac3InfoM.dolbySurroundMode; }; // eAudioDolbySurroundMode
+ int AC3CenterMixLevel(void) { cMutexLock MutexLock(&mutexM);
+ return ac3InfoM.centerMixLevel; }; // eAudioCenterMixLevel
+ int AC3SurroundMixLevel(void) { cMutexLock MutexLock(&mutexM);
+ return ac3InfoM.surroundMixLevel; }; // eAudioSurroundMixLevel
+ int AC3DialogLevel(void) { cMutexLock MutexLock(&mutexM);
+ return ac3InfoM.dialogLevel; }; // -dB
+ bool AC3Lfe(void) { cMutexLock MutexLock(&mutexM);
+ return ac3InfoM.lfe; }; // boolean
+ };
+
+#endif //__FEMON_RECEIVER_H
+
diff --git a/setup.c b/setup.c
new file mode 100644
index 0000000..e1e94ff
--- /dev/null
+++ b/setup.c
@@ -0,0 +1,162 @@
+/*
+ * setup.c: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#include <vdr/menu.h>
+
+#include "config.h"
+#include "log.h"
+#include "tools.h"
+#include "setup.h"
+
+cMenuFemonSetup::cMenuFemonSetup()
+: hideMenuM(FemonConfig.GetHideMenu()),
+ displayModeM(FemonConfig.GetDisplayMode()),
+ skinM(FemonConfig.GetSkin()),
+ themeM(FemonConfig.GetTheme()),
+ positionM(FemonConfig.GetPosition()),
+ downscaleM(FemonConfig.GetDownscale()),
+ redLimitM(FemonConfig.GetRedLimit()),
+ greenLimitM(FemonConfig.GetGreenLimit()),
+ updateIntervalM(FemonConfig.GetUpdateInterval()),
+ analyzeStreamM(FemonConfig.GetAnalyzeStream()),
+ calcIntervalM(FemonConfig.GetCalcInterval()),
+ useSvdrpM(FemonConfig.GetUseSvdrp()),
+ svdrpPortM(FemonConfig.GetSvdrpPort())
+{
+ debug1("%s", __PRETTY_FUNCTION__);
+ strn0cpy(svdrpIpM, FemonConfig.GetSvdrpIp(), sizeof(svdrpIpM));
+
+ dispModesM[eFemonModeBasic] = tr("basic");
+ dispModesM[eFemonModeTransponder] = tr("transponder");
+ dispModesM[eFemonModeStream] = tr("stream");
+ dispModesM[eFemonModeAC3] = tr("AC-3");
+
+ skinsM[eFemonSkinClassic] = tr("Classic");
+ skinsM[eFemonSkinElchi] = tr("Elchi");
+
+ themesM[eFemonThemeClassic] = tr("Classic");
+ themesM[eFemonThemeElchi] = tr("Elchi");
+ themesM[eFemonThemeSTTNG] = tr("ST:TNG");
+ themesM[eFemonThemeDeepBlue] = tr("DeepBlue");
+ themesM[eFemonThemeMoronimo] = tr("Moronimo");
+ themesM[eFemonThemeEnigma] = tr("Enigma");
+ themesM[eFemonThemeEgalsTry] = tr("EgalsTry");
+ themesM[eFemonThemeDuotone] = tr("Duotone");
+ themesM[eFemonThemeSilverGreen] = tr("SilverGreen");
+ themesM[eFemonThemePearlHD] = tr("PearlHD");
+
+ SetMenuCategory(mcSetupPlugins);
+ Setup();
+}
+
+void cMenuFemonSetup::Setup(void)
+{
+ int current = Current();
+
+ Clear();
+ helpM.Clear();
+
+ Add(new cMenuEditBoolItem(tr("Hide main menu entry"), &hideMenuM));
+ helpM.Append(tr("Define whether the main menu entry is hidden."));
+
+ Add(new cMenuEditStraItem(tr("Default display mode"), &displayModeM, eFemonModeMaxNumber, dispModesM));
+ helpM.Append(tr("Define the default display mode at startup."));
+
+ Add(new cMenuEditStraItem(trVDR("Setup.OSD$Skin"), &skinM, eFemonSkinMaxNumber, skinsM));
+ helpM.Append(tr("Define the used OSD skin."));
+
+ Add(new cMenuEditStraItem(trVDR("Setup.OSD$Theme"), &themeM, eFemonThemeMaxNumber, themesM));
+ helpM.Append(tr("Define the used OSD theme."));
+
+ Add(new cMenuEditBoolItem(tr("Position"), &positionM, trVDR("bottom"), trVDR("top")));
+ helpM.Append(tr("Define the position of OSD."));
+
+ Add(new cMenuEditIntItem(tr("Downscale OSD size [%]"), &downscaleM, 0, 20));
+ helpM.Append(tr("Define the downscale ratio for OSD size."));
+
+ Add(new cMenuEditIntItem(tr("Red limit [%]"), &redLimitM, 1, 50));
+ helpM.Append(tr("Define a limit for red bar, which is used to indicate a bad signal."));
+
+ Add(new cMenuEditIntItem(tr("Green limit [%]"), &greenLimitM, 51, 100));
+ helpM.Append(tr("Define a limit for green bar, which is used to indicate a good signal."));
+
+ Add(new cMenuEditIntItem(tr("OSD update interval [0.1s]"), &updateIntervalM, 1, 100));
+ helpM.Append(tr("Define an interval for OSD updates. The smaller interval generates higher CPU load."));
+
+ Add(new cMenuEditBoolItem(tr("Analyze stream"), &analyzeStreamM));
+ helpM.Append(tr("Define whether the DVB stream is analyzed and bitrates calculated."));
+
+ if (analyzeStreamM) {
+ Add(new cMenuEditIntItem(tr("Calculation interval [0.1s]"), &calcIntervalM, 1, 100));
+ helpM.Append(tr("Define an interval for calculation. The bigger interval generates more stable values."));
+ }
+
+ Add(new cMenuEditBoolItem(tr("Use SVDRP service"), &useSvdrpM));
+ helpM.Append(tr("Define whether the SVDRP service is used in client/server setups."));
+
+ if (useSvdrpM) {
+ Add(new cMenuEditIntItem(tr("SVDRP service port"), &svdrpPortM, 1, 65535));
+ helpM.Append(tr("Define the port number of SVDRP service."));
+
+ Add(new cMenuEditStrItem(tr("SVDRP service IP"), svdrpIpM, sizeof(svdrpIpM), ".1234567890"));
+ helpM.Append(tr("Define the IP address of SVDRP service."));
+ }
+
+ SetCurrent(Get(current));
+ Display();
+}
+
+void cMenuFemonSetup::Store(void)
+{
+ debug1("%s", __PRETTY_FUNCTION__);
+ // Store values into setup.conf
+ SetupStore("HideMenu", hideMenuM);
+ SetupStore("DisplayMode", displayModeM);
+ SetupStore("Skin", skinM);
+ SetupStore("Theme", themeM);
+ SetupStore("Position", positionM);
+ SetupStore("Downscale", downscaleM);
+ SetupStore("RedLimit", redLimitM);
+ SetupStore("GreenLimit", greenLimitM);
+ SetupStore("UpdateInterval", updateIntervalM);
+ SetupStore("AnalStream", analyzeStreamM);
+ SetupStore("CalcInterval", calcIntervalM);
+ SetupStore("UseSvdrp", useSvdrpM);
+ SetupStore("ServerPort", svdrpPortM);
+ SetupStore("ServerIp", svdrpIpM);
+ // Update global config
+ FemonConfig.SetHideMenu(hideMenuM);
+ FemonConfig.SetDisplayMode(displayModeM);
+ FemonConfig.SetSkin(skinM);
+ FemonConfig.SetTheme(themeM);
+ FemonConfig.SetPosition(positionM);
+ FemonConfig.SetDownscale(downscaleM);
+ FemonConfig.SetRedLimit(redLimitM);
+ FemonConfig.SetGreenLimit(greenLimitM);
+ FemonConfig.SetUpdateInterval(updateIntervalM);
+ FemonConfig.SetAnalyzeStream(analyzeStreamM);
+ FemonConfig.SetCalcInterval(calcIntervalM);
+ FemonConfig.SetUseSvdrp(useSvdrpM);
+ FemonConfig.SetSvdrpPort(svdrpPortM);
+ FemonConfig.SetSvdrpIp(svdrpIpM);
+}
+
+eOSState cMenuFemonSetup::ProcessKey(eKeys keyP)
+{
+ int oldUseSvdrp = useSvdrpM;
+ int oldAnalyzeStream = analyzeStreamM;
+
+ eOSState state = cMenuSetupPage::ProcessKey(keyP);
+
+ if (keyP != kNone && (analyzeStreamM != oldAnalyzeStream || useSvdrpM != oldUseSvdrp))
+ Setup();
+
+ if ((keyP == kInfo) && (state == osUnknown) && (Current() < helpM.Size()))
+ return AddSubMenu(new cMenuText(cString::sprintf("%s - %s '%s'", tr("Help"), trVDR("Plugin"), PLUGIN_NAME_I18N), helpM[Current()]));
+
+ return state;
+}
diff --git a/setup.h b/setup.h
new file mode 100644
index 0000000..eda3e46
--- /dev/null
+++ b/setup.h
@@ -0,0 +1,41 @@
+/*
+ * setup.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_SETUP_H
+#define __FEMON_SETUP_H
+
+class cMenuFemonSetup : public cMenuSetupPage {
+private:
+ const char *dispModesM[eFemonModeMaxNumber];
+ const char *skinsM[eFemonSkinMaxNumber];
+ const char *themesM[eFemonThemeMaxNumber];
+ cVector<const char*> helpM;
+ int hideMenuM;
+ int displayModeM;
+ int skinM;
+ int themeM;
+ int positionM;
+ int downscaleM;
+ int redLimitM;
+ int greenLimitM;
+ int updateIntervalM;
+ int analyzeStreamM;
+ int calcIntervalM;
+ int useSvdrpM;
+ int svdrpPortM;
+ char svdrpIpM[MaxSvdrpIp + 1]; // must end with additional null
+ void Setup(void);
+
+protected:
+ virtual eOSState ProcessKey(eKeys Key);
+ virtual void Store(void);
+
+public:
+ cMenuFemonSetup();
+};
+
+#endif // __FEMON_SETUP_H
diff --git a/svdrpservice.h b/svdrpservice.h
index 416a032..7a9b070 100644
--- a/svdrpservice.h
+++ b/svdrpservice.h
@@ -11,11 +11,11 @@
class cLine: public cListObject {
private:
- char *Line;
+ char *lineM;
public:
- const char *Text() { return Line; }
- cLine(const char *s) { Line = s ? strdup(s) : NULL; };
- virtual ~cLine() { if (Line) free(Line); };
+ const char *Text() { return lineM; }
+ cLine(const char *strP) { lineM = strP ? strdup(strP) : NULL; };
+ virtual ~cLine() { if (lineM) free(lineM); };
};
struct SvdrpConnection_v1_0 {
diff --git a/femonsymbol.c b/symbol.c
similarity index 95%
rename from femonsymbol.c
rename to symbol.c
index 02cc351..618db31 100644
--- a/femonsymbol.c
+++ b/symbol.c
@@ -1,13 +1,15 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * symbol.c: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
#include <vdr/device.h>
-#include "femontools.h"
-#include "femonsymbol.h"
+
+#include "log.h"
+#include "tools.h"
+#include "symbol.h"
#include "symbols/stereo.xpm"
#include "symbols/monoleft.xpm"
@@ -118,7 +120,7 @@ void cFemonSymbolCache::Refresh()
int width, height;
double aspect, xfactor, yfactor;
cDevice::PrimaryDevice()->GetOsdSize(width, height, aspect);
- debug("%s(): %dx%d\n", __PRETTY_FUNCTION__, width, height);
+ debug1("%s width=%d height=%d", __PRETTY_FUNCTION__, width, height);
xfactor = (double)width / DEFAULT_WIDTH;
yfactor = (double)height / DEFAULT_HEIGHT;
if (!DoubleEqual(xfactor, xFactorM) || !DoubleEqual(yfactor, yFactorM)) {
@@ -130,7 +132,7 @@ void cFemonSymbolCache::Refresh()
bool cFemonSymbolCache::Populate(void)
{
- debug("%s(): %.02fx%.02f\n", __PRETTY_FUNCTION__, xFactorM, yFactorM);
+ debug1("%s xFactor=%.02f yFactor=%.02f", __PRETTY_FUNCTION__, xFactorM, yFactorM);
if (!DoubleEqual(0.0, xFactorM) || !DoubleEqual(0.0, yFactorM)) {
Flush();
@@ -188,7 +190,7 @@ bool cFemonSymbolCache::Populate(void)
bool cFemonSymbolCache::Flush(void)
{
- debug("%s()\n", __PRETTY_FUNCTION__);
+ debug1("%s", __PRETTY_FUNCTION__);
for (int i = 0; i < cacheM.Size(); ++i) {
cBitmap *bmp = cacheM[i];
DELETENULL(bmp);
@@ -204,7 +206,7 @@ cBitmap& cFemonSymbolCache::Get(eSymbols symbolP)
if (symbolP < cacheM.Size())
bitmapM = cacheM[symbolP];
else
- error("%s(): Invalid symbol %d\n", __PRETTY_FUNCTION__, symbolP);
+ error("%s (%d) Invalid symbol", __PRETTY_FUNCTION__, symbolP);
return *bitmapM;
}
diff --git a/femonsymbol.h b/symbol.h
similarity index 91%
rename from femonsymbol.h
rename to symbol.h
index 4fe14c6..de8a462 100644
--- a/femonsymbol.h
+++ b/symbol.h
@@ -1,12 +1,12 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * symbol.h: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
-#ifndef __FEMONSYMBOL_H
-#define __FEMONSYMBOL_H
+#ifndef __FEMON_SYMBOL_H
+#define __FEMON_SYMBOL_H
#include <vdr/tools.h>
#include <vdr/osd.h>
@@ -84,4 +84,4 @@ public:
extern cFemonSymbolCache femonSymbols;
-#endif // __FEMONSYMBOL_H
+#endif // __FEMON_SYMBOL_H
diff --git a/femontools.c b/tools.c
similarity index 61%
rename from femontools.c
rename to tools.c
index 05f74f0..3dafc52 100644
--- a/femontools.c
+++ b/tools.c
@@ -1,5 +1,5 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * tools.c: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
@@ -15,92 +15,93 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/dvb/frontend.h>
-#include "femonreceiver.h"
-#include "femonosd.h"
-#include "femontools.h"
-static cString getCA(int value)
+#include "osd.h"
+#include "receiver.h"
+#include "tools.h"
+
+static cString getCA(int valueP)
{
// http://www.dvb.org/index.php?id=174
// http://en.wikipedia.org/wiki/Conditional_access_system
- switch (value) {
- case 0x0000: return cString::sprintf("%s (%X)", trVDR("Free To Air"), value); // Reserved
+ switch (valueP) {
+ case 0x0000: return cString::sprintf("%s (%X)", trVDR("Free To Air"), valueP); // Reserved
case 0x0001 ... 0x009F:
- case 0x00A2 ... 0x00FF: return cString::sprintf("%s (%X)", tr("Fixed"), value); // Standardized systems
- case 0x00A0 ... 0x00A1: return cString::sprintf("%s (%X)", tr("Analog"), value); // Analog signals
- case 0x0100 ... 0x01FF: return cString::sprintf("SECA Mediaguard (%X)", value); // Canal Plus
- case 0x0464: return cString::sprintf("EuroDec (%X)", value); // EuroDec
- case 0x0500 ... 0x05FF: return cString::sprintf("Viaccess (%X)", value); // France Telecom
- case 0x0600 ... 0x06FF: return cString::sprintf("Irdeto (%X)", value); // Irdeto
- case 0x0700 ... 0x07FF: return cString::sprintf("DigiCipher 2 (%X)", value); // Jerrold/GI/Motorola 4DTV
- case 0x0900 ... 0x09FF: return cString::sprintf("NDS Videoguard (%X)", value); // NDS
- case 0x0B00 ... 0x0BFF: return cString::sprintf("Conax (%X)", value); // Norwegian Telekom
- case 0x0D00 ... 0x0DFF: return cString::sprintf("CryptoWorks (%X)", value); // Philips CryptoTec
- case 0x0E00 ... 0x0EFF: return cString::sprintf("PowerVu (%X)", value); // Scientific Atlanta
- case 0x1000: return cString::sprintf("RAS (%X)", value); // Tandberg Television
- case 0x1200 ... 0x12FF: return cString::sprintf("NagraVision (%X)", value); // BellVu Express
- case 0x1700 ... 0x17FF: return cString::sprintf("VCAS (%X)", value); // Verimatrix Inc. former BetaTechnik
- case 0x1800 ... 0x18FF: return cString::sprintf("NagraVision (%X)", value); // Kudelski SA
- case 0x22F0: return cString::sprintf("Codicrypt (%X)", value); // Scopus Network Technologies
- case 0x2600: return cString::sprintf("BISS (%X)", value); // European Broadcasting Union
- case 0x2719: return cString::sprintf("VanyaCas (%X)", value); // S-Curious Research & Technology Pvt. Ltd.
- case 0x4347: return cString::sprintf("CryptOn (%X)", value); // CryptOn
- case 0x4800: return cString::sprintf("Accessgate (%X)", value); // Telemann
- case 0x4900: return cString::sprintf("China Crypt (%X)", value); // CryptoWorks
- case 0x4A02: return cString::sprintf("Tongfang (%X)", value); // Tsinghua Tongfang Company
- case 0x4A10: return cString::sprintf("EasyCas (%X)", value); // EasyCas
- case 0x4A20: return cString::sprintf("AlphaCrypt (%X)", value); // AlphaCrypt
- case 0x4A60: return cString::sprintf("SkyCrypt (%X)", value); // @Sky
- case 0x4A61: return cString::sprintf("Neotioncrypt (%X)", value); // Neotion
- case 0x4A62: return cString::sprintf("SkyCrypt (%X)", value); // @Sky
- case 0x4A63: return cString::sprintf("Neotion SHL (%X)", value); // Neotion
- case 0x4A64 ... 0x4A6F: return cString::sprintf("SkyCrypt (%X)", value); // @Sky
- case 0x4A70: return cString::sprintf("DreamCrypt (%X)", value); // Dream Multimedia
- case 0x4A80: return cString::sprintf("ThalesCrypt (%X)", value); // Thales Broadcast & Multimedia
- case 0x4AA1: return cString::sprintf("KeyFly (%X)", value); // SIDSA
- case 0x4ABF: return cString::sprintf("CTI-CAS (%X)", value); // Beijing Compunicate Technology Inc.
- case 0x4AC1: return cString::sprintf("Latens (%X)", value); // Latens Systems
- case 0x4AD0 ... 0x4AD1: return cString::sprintf("X-Crypt (%X)", value); // XCrypt Inc.
- case 0x4AD4: return cString::sprintf("OmniCrypt (%X)", value); // Widevine Technologies, Inc.
- case 0x4AE0 ... 0x4AE1: return cString::sprintf("Z-Crypt (%X)", value); // Digi Raum Electronics Co. Ltd.
- case 0x4AE4: return cString::sprintf("CoreCrypt (%X)", value); // CoreTrust
- case 0x4AE5: return cString::sprintf("PRO-Crypt (%X)", value); // IK SATPROF
- case 0x4AEA: return cString::sprintf("Cryptoguard (%X)", value); // Gryptoguard AB
- case 0x4AEB: return cString::sprintf("Abel Quintic (%X)", value); // Abel DRM Systems
- case 0x4AF0: return cString::sprintf("ABV (%X)", value); // Alliance Broadcast Vision
- case 0x5500: return cString::sprintf("Z-Crypt (%X)", value); // Digi Raum Electronics Co. Ltd.
- case 0x5501: return cString::sprintf("Griffin (%X)", value); // Nucleus Systems Ltd.
- case 0x5581: return cString::sprintf("Bulcrypt (%X)", value); // Bulcrypt
- case 0x7BE1: return cString::sprintf("DRE-Crypt (%X)", value); // DRE-Crypt
- case 0xA101: return cString::sprintf("RosCrypt-M (%X)", value); // NIIR
- case 0xEAD0: return cString::sprintf("VanyaCas (%X)", value); // S-Curious Research & Technology Pvt. Ltd.
+ case 0x00A2 ... 0x00FF: return cString::sprintf("%s (%X)", tr("Fixed"), valueP); // Standardized systems
+ case 0x00A0 ... 0x00A1: return cString::sprintf("%s (%X)", tr("Analog"), valueP); // Analog signals
+ case 0x0100 ... 0x01FF: return cString::sprintf("SECA Mediaguard (%X)", valueP); // Canal Plus
+ case 0x0464: return cString::sprintf("EuroDec (%X)", valueP); // EuroDec
+ case 0x0500 ... 0x05FF: return cString::sprintf("Viaccess (%X)", valueP); // France Telecom
+ case 0x0600 ... 0x06FF: return cString::sprintf("Irdeto (%X)", valueP); // Irdeto
+ case 0x0700 ... 0x07FF: return cString::sprintf("DigiCipher 2 (%X)", valueP); // Jerrold/GI/Motorola 4DTV
+ case 0x0900 ... 0x09FF: return cString::sprintf("NDS Videoguard (%X)", valueP); // NDS
+ case 0x0B00 ... 0x0BFF: return cString::sprintf("Conax (%X)", valueP); // Norwegian Telekom
+ case 0x0D00 ... 0x0DFF: return cString::sprintf("CryptoWorks (%X)", valueP); // Philips CryptoTec
+ case 0x0E00 ... 0x0EFF: return cString::sprintf("PowerVu (%X)", valueP); // Scientific Atlanta
+ case 0x1000: return cString::sprintf("RAS (%X)", valueP); // Tandberg Television
+ case 0x1200 ... 0x12FF: return cString::sprintf("NagraVision (%X)", valueP); // BellVu Express
+ case 0x1700 ... 0x17FF: return cString::sprintf("VCAS (%X)", valueP); // Verimatrix Inc. former BetaTechnik
+ case 0x1800 ... 0x18FF: return cString::sprintf("NagraVision (%X)", valueP); // Kudelski SA
+ case 0x22F0: return cString::sprintf("Codicrypt (%X)", valueP); // Scopus Network Technologies
+ case 0x2600: return cString::sprintf("BISS (%X)", valueP); // European Broadcasting Union
+ case 0x2719: return cString::sprintf("VanyaCas (%X)", valueP); // S-Curious Research & Technology Pvt. Ltd.
+ case 0x4347: return cString::sprintf("CryptOn (%X)", valueP); // CryptOn
+ case 0x4800: return cString::sprintf("Accessgate (%X)", valueP); // Telemann
+ case 0x4900: return cString::sprintf("China Crypt (%X)", valueP); // CryptoWorks
+ case 0x4A02: return cString::sprintf("Tongfang (%X)", valueP); // Tsinghua Tongfang Company
+ case 0x4A10: return cString::sprintf("EasyCas (%X)", valueP); // EasyCas
+ case 0x4A20: return cString::sprintf("AlphaCrypt (%X)", valueP); // AlphaCrypt
+ case 0x4A60: return cString::sprintf("SkyCrypt (%X)", valueP); // @Sky
+ case 0x4A61: return cString::sprintf("Neotioncrypt (%X)", valueP); // Neotion
+ case 0x4A62: return cString::sprintf("SkyCrypt (%X)", valueP); // @Sky
+ case 0x4A63: return cString::sprintf("Neotion SHL (%X)", valueP); // Neotion
+ case 0x4A64 ... 0x4A6F: return cString::sprintf("SkyCrypt (%X)", valueP); // @Sky
+ case 0x4A70: return cString::sprintf("DreamCrypt (%X)", valueP); // Dream Multimedia
+ case 0x4A80: return cString::sprintf("ThalesCrypt (%X)", valueP); // Thales Broadcast & Multimedia
+ case 0x4AA1: return cString::sprintf("KeyFly (%X)", valueP); // SIDSA
+ case 0x4ABF: return cString::sprintf("CTI-CAS (%X)", valueP); // Beijing Compunicate Technology Inc.
+ case 0x4AC1: return cString::sprintf("Latens (%X)", valueP); // Latens Systems
+ case 0x4AD0 ... 0x4AD1: return cString::sprintf("X-Crypt (%X)", valueP); // XCrypt Inc.
+ case 0x4AD4: return cString::sprintf("OmniCrypt (%X)", valueP); // Widevine Technologies, Inc.
+ case 0x4AE0 ... 0x4AE1: return cString::sprintf("Z-Crypt (%X)", valueP); // Digi Raum Electronics Co. Ltd.
+ case 0x4AE4: return cString::sprintf("CoreCrypt (%X)", valueP); // CoreTrust
+ case 0x4AE5: return cString::sprintf("PRO-Crypt (%X)", valueP); // IK SATPROF
+ case 0x4AEA: return cString::sprintf("Cryptoguard (%X)", valueP); // Gryptoguard AB
+ case 0x4AEB: return cString::sprintf("Abel Quintic (%X)", valueP); // Abel DRM Systems
+ case 0x4AF0: return cString::sprintf("ABV (%X)", valueP); // Alliance Broadcast Vision
+ case 0x5500: return cString::sprintf("Z-Crypt (%X)", valueP); // Digi Raum Electronics Co. Ltd.
+ case 0x5501: return cString::sprintf("Griffin (%X)", valueP); // Nucleus Systems Ltd.
+ case 0x5581: return cString::sprintf("Bulcrypt (%X)", valueP); // Bulcrypt
+ case 0x7BE1: return cString::sprintf("DRE-Crypt (%X)", valueP); // DRE-Crypt
+ case 0xA101: return cString::sprintf("RosCrypt-M (%X)", valueP); // NIIR
+ case 0xEAD0: return cString::sprintf("VanyaCas (%X)", valueP); // S-Curious Research & Technology Pvt. Ltd.
default: break;
}
- return cString::sprintf("%X", value);
+ return cString::sprintf("%X", valueP);
}
-static const char *getUserString(int Value, const tDvbParameterMap *Map)
+static const char *getUserString(int valueP, const tDvbParameterMap *mapP)
{
- const tDvbParameterMap *map = Map;
+ const tDvbParameterMap *map = mapP;
while (map && map->userValue != -1) {
- if (map->driverValue == Value)
+ if (map->driverValue == valueP)
return map->userString ? trVDR(map->userString) : "---";
map++;
}
return "---";
}
-cDvbDevice *getDvbDevice(cDevice* device)
+cDvbDevice *getDvbDevice(cDevice* deviceP)
{
- cDvbDevice *dev = dynamic_cast<cDvbDevice*>(device);
+ cDvbDevice *dev = dynamic_cast<cDvbDevice*>(deviceP);
#ifdef __DYNAMIC_DEVICE_PROBE
- if (!dev && device && device->HasSubDevice())
- dev = dynamic_cast<cDvbDevice*>(device->SubDevice());
+ if (!dev && deviceP && deviceP->HasSubDevice())
+ dev = dynamic_cast<cDvbDevice*>(deviceP->SubDevice());
#endif
return dev;
}
-cString getFrontendInfo(cDvbDevice *device)
+cString getFrontendInfo(cDvbDevice *deviceP)
{
struct dvb_frontend_info value;
fe_status_t status;
@@ -111,17 +112,17 @@ cString getFrontendInfo(cDvbDevice *device)
uint32_t unc = 0;
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
- if (!device)
+ if (!deviceP)
return info;
- int fe = open(*cString::sprintf(FRONTEND_DEVICE, device->Adapter(), device->Frontend()), O_RDONLY | O_NONBLOCK);
+ int fe = open(*cString::sprintf(FRONTEND_DEVICE, deviceP->Adapter(), deviceP->Frontend()), O_RDONLY | O_NONBLOCK);
if (fe < 0)
return info;
- info = cString::sprintf("CARD:%d\nSTRG:%d\nQUAL:%d", device->CardIndex(), device->SignalStrength(), device->SignalQuality());
+ info = cString::sprintf("CARD:%d\nSTRG:%d\nQUAL:%d", deviceP->CardIndex(), deviceP->SignalStrength(), deviceP->SignalQuality());
if (ioctl(fe, FE_GET_INFO, &value) >= 0)
- info = cString::sprintf("%s\nTYPE:%d\nNAME:%s", *info, value.type, *device->DeviceName());
+ info = cString::sprintf("%s\nTYPE:%d\nNAME:%s", *info, value.type, *deviceP->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)
@@ -143,39 +144,39 @@ cString getFrontendInfo(cDvbDevice *device)
return info;
}
-cString getFrontendName(cDvbDevice *device)
+cString getFrontendName(cDvbDevice *deviceP)
{
- if (!device)
+ if (!deviceP)
return NULL;
- return (cString::sprintf("%s on device #%d", *device->DeviceName(), device->CardIndex()));
+ return (cString::sprintf("%s on deviceP #%d", *deviceP->DeviceName(), deviceP->CardIndex()));
}
-cString getFrontendStatus(cDvbDevice *device)
+cString getFrontendStatus(cDvbDevice *deviceP)
{
fe_status_t value;
- if (!device)
+ if (!deviceP)
return NULL;
- int fe = open(*cString::sprintf(FRONTEND_DEVICE, device->Adapter(), device->Frontend()), O_RDONLY | O_NONBLOCK);
+ int fe = open(*cString::sprintf(FRONTEND_DEVICE, deviceP->Adapter(), deviceP->Frontend()), O_RDONLY | O_NONBLOCK);
if (fe < 0)
return NULL;
memset(&value, 0, sizeof(value));
ioctl(fe, FE_READ_STATUS, &value);
close(fe);
- return (cString::sprintf("Status %s:%s:%s:%s:%s on device #%d", (value & FE_HAS_LOCK) ? "LOCKED" : "-", (value & FE_HAS_SIGNAL) ? "SIGNAL" : "-", (value & FE_HAS_CARRIER) ? "CARRIER" : "-", (value & FE_HAS_VITERBI) ? "VITERBI" : "-", (value & FE_HAS_SYNC) ? "SYNC" : "-", device->CardIndex()));
+ return (cString::sprintf("Status %s:%s:%s:%s:%s on deviceP #%d", (value & FE_HAS_LOCK) ? "LOCKED" : "-", (value & FE_HAS_SIGNAL) ? "SIGNAL" : "-", (value & FE_HAS_CARRIER) ? "CARRIER" : "-", (value & FE_HAS_VITERBI) ? "VITERBI" : "-", (value & FE_HAS_SYNC) ? "SYNC" : "-", deviceP->CardIndex()));
}
-uint16_t getSignal(cDvbDevice *device)
+uint16_t getSignal(cDvbDevice *deviceP)
{
uint16_t value = 0;
- if (!device)
+ if (!deviceP)
return (value);
- int fe = open(*cString::sprintf(FRONTEND_DEVICE, device->Adapter(), device->Frontend()), O_RDONLY | O_NONBLOCK);
+ int fe = open(*cString::sprintf(FRONTEND_DEVICE, deviceP->Adapter(), deviceP->Frontend()), O_RDONLY | O_NONBLOCK);
if (fe < 0)
return (value);
ioctl(fe, FE_READ_SIGNAL_STRENGTH, &value);
@@ -184,14 +185,14 @@ uint16_t getSignal(cDvbDevice *device)
return (value);
}
-uint16_t getSNR(cDvbDevice *device)
+uint16_t getSNR(cDvbDevice *deviceP)
{
uint16_t value = 0;
- if (!device)
+ if (!deviceP)
return (value);
- int fe = open(*cString::sprintf(FRONTEND_DEVICE, device->Adapter(), device->Frontend()), O_RDONLY | O_NONBLOCK);
+ int fe = open(*cString::sprintf(FRONTEND_DEVICE, deviceP->Adapter(), deviceP->Frontend()), O_RDONLY | O_NONBLOCK);
if (fe < 0)
return (value);
ioctl(fe, FE_READ_SNR, &value);
@@ -200,14 +201,14 @@ uint16_t getSNR(cDvbDevice *device)
return (value);
}
-uint32_t getBER(cDvbDevice *device)
+uint32_t getBER(cDvbDevice *deviceP)
{
uint32_t value = 0;
- if (!device)
+ if (!deviceP)
return (value);
- int fe = open(*cString::sprintf(FRONTEND_DEVICE, device->Adapter(), device->Frontend()), O_RDONLY | O_NONBLOCK);
+ int fe = open(*cString::sprintf(FRONTEND_DEVICE, deviceP->Adapter(), deviceP->Frontend()), O_RDONLY | O_NONBLOCK);
if (fe < 0)
return (value);
ioctl(fe, FE_READ_BER, &value);
@@ -216,14 +217,14 @@ uint32_t getBER(cDvbDevice *device)
return (value);
}
-uint32_t getUNC(cDvbDevice *device)
+uint32_t getUNC(cDvbDevice *deviceP)
{
uint32_t value = 0;
- if (!device)
+ if (!deviceP)
return (value);
- int fe = open(*cString::sprintf(FRONTEND_DEVICE, device->Adapter(), device->Frontend()), O_RDONLY | O_NONBLOCK);
+ int fe = open(*cString::sprintf(FRONTEND_DEVICE, deviceP->Adapter(), deviceP->Frontend()), O_RDONLY | O_NONBLOCK);
if (fe < 0)
return (value);
ioctl(fe, FE_READ_UNCORRECTED_BLOCKS, &value);
@@ -232,39 +233,39 @@ uint32_t getUNC(cDvbDevice *device)
return (value);
}
-cString getApids(const cChannel *channel)
+cString getApids(const cChannel *channelP)
{
int value = 0;
- cString apids = cString::sprintf("%d", channel->Apid(value));
- while (channel->Apid(++value) && (value < MAXAPIDS))
- apids = cString::sprintf("%s, %d", *apids, channel->Apid(value));
+ cString apids = cString::sprintf("%d", channelP->Apid(value));
+ while (channelP->Apid(++value) && (value < MAXAPIDS))
+ apids = cString::sprintf("%s, %d", *apids, channelP->Apid(value));
return apids;
}
-cString getDpids(const cChannel *channel)
+cString getDpids(const cChannel *channelP)
{
int value = 0;
- cString dpids = cString::sprintf("%d", channel->Dpid(value));
- while (channel->Dpid(++value) && (value < MAXDPIDS))
- dpids = cString::sprintf("%s, %d", *dpids, channel->Dpid(value));
+ cString dpids = cString::sprintf("%d", channelP->Dpid(value));
+ while (channelP->Dpid(++value) && (value < MAXDPIDS))
+ dpids = cString::sprintf("%s, %d", *dpids, channelP->Dpid(value));
return dpids;
}
-cString getSpids(const cChannel *channel)
+cString getSpids(const cChannel *channelP)
{
int value = 0;
- cString spids = cString::sprintf("%d", channel->Spid(value));
- while (channel->Spid(++value) && (value < MAXSPIDS))
- spids = cString::sprintf("%s, %d", *spids, channel->Spid(value));
+ cString spids = cString::sprintf("%d", channelP->Spid(value));
+ while (channelP->Spid(++value) && (value < MAXSPIDS))
+ spids = cString::sprintf("%s, %d", *spids, channelP->Spid(value));
return spids;
}
-cString getCAids(const cChannel *channel)
+cString getCAids(const cChannel *channelP)
{
int value = 0;
- cString caids = cString::sprintf("%s", *getCA(channel->Ca(value)));
- while (channel->Ca(++value) && (value < MAXCAIDS))
- caids = cString::sprintf("%s, %s", *caids, *getCA(channel->Ca(value)));
+ cString caids = cString::sprintf("%s", *getCA(channelP->Ca(value)));
+ while (channelP->Ca(++value) && (value < MAXCAIDS))
+ caids = cString::sprintf("%s, %s", *caids, *getCA(channelP->Ca(value)));
return caids;
}
@@ -275,37 +276,37 @@ cString getVideoStream(int value)
return cString::sprintf("---");
}
-cString getAudioStream(int value, const cChannel *channel)
+cString getAudioStream(int valueP, const cChannel *channelP)
{
int pid = 0;
- if (IS_AUDIO_TRACK(value))
- pid = int(value - ttAudioFirst);
- if (channel && channel->Apid(pid)) {
- if (channel->Alang(pid))
- return cString::sprintf("#%d (%s)", channel->Apid(pid), channel->Alang(pid));
+ if (IS_AUDIO_TRACK(valueP))
+ pid = int(valueP - ttAudioFirst);
+ if (channelP && channelP->Apid(pid)) {
+ if (channelP->Alang(pid))
+ return cString::sprintf("#%d (%s)", channelP->Apid(pid), channelP->Alang(pid));
else
- return cString::sprintf("#%d", channel->Apid(pid));
+ return cString::sprintf("#%d", channelP->Apid(pid));
}
return cString::sprintf("---");
}
-cString getAC3Stream(int value, const cChannel *channel)
+cString getAC3Stream(int valueP, const cChannel *channelP)
{
int pid = 0;
- if (IS_DOLBY_TRACK(value))
- pid = int(value - ttDolbyFirst);
- if (channel && channel->Dpid(pid)) {
- if (channel->Dlang(pid))
- return cString::sprintf("#%d (%s)", channel->Dpid(pid), channel->Dlang(pid));
+ if (IS_DOLBY_TRACK(valueP))
+ pid = int(valueP - ttDolbyFirst);
+ if (channelP && channelP->Dpid(pid)) {
+ if (channelP->Dlang(pid))
+ return cString::sprintf("#%d (%s)", channelP->Dpid(pid), channelP->Dlang(pid));
else
- return cString::sprintf("#%d", channel->Dpid(pid));
+ return cString::sprintf("#%d", channelP->Dpid(pid));
}
return cString::sprintf("---");
}
-cString getVideoCodec(int value)
+cString getVideoCodec(int valueP)
{
- switch (value) {
+ switch (valueP) {
case VIDEO_CODEC_MPEG2: return cString::sprintf("%s", tr("MPEG-2"));
case VIDEO_CODEC_H264: return cString::sprintf("%s", tr("H.264"));
default: break;
@@ -313,9 +314,9 @@ cString getVideoCodec(int value)
return cString::sprintf("---");
}
-cString getAudioCodec(int value)
+cString getAudioCodec(int valueP)
{
- switch (value) {
+ switch (valueP) {
case AUDIO_CODEC_MPEG1_I: return cString::sprintf("%s", tr("MPEG-1 Layer I"));
case AUDIO_CODEC_MPEG1_II: return cString::sprintf("%s", tr("MPEG-1 Layer II"));
case AUDIO_CODEC_MPEG1_III: return cString::sprintf("%s", tr("MPEG-1 Layer III"));
@@ -329,9 +330,9 @@ cString getAudioCodec(int value)
return cString::sprintf("---");
}
-cString getAudioChannelMode(int value)
+cString getAudioChannelMode(int valueP)
{
- switch (value) {
+ switch (valueP) {
case AUDIO_CHANNEL_MODE_STEREO: return cString::sprintf("%s", tr("stereo"));
case AUDIO_CHANNEL_MODE_JOINT_STEREO: return cString::sprintf("%s", tr("joint Stereo"));
case AUDIO_CHANNEL_MODE_DUAL: return cString::sprintf("%s", tr("dual"));
@@ -341,76 +342,76 @@ cString getAudioChannelMode(int value)
return cString::sprintf("---");
}
-cString getCoderate(int value)
+cString getCoderate(int valueP)
{
- return cString::sprintf("%s", getUserString(value, CoderateValues));
+ return cString::sprintf("%s", getUserString(valueP, CoderateValues));
}
-cString getTransmission(int value)
+cString getTransmission(int valueP)
{
- return cString::sprintf("%s", getUserString(value, TransmissionValues));
+ return cString::sprintf("%s", getUserString(valueP, TransmissionValues));
}
-cString getBandwidth(int value)
+cString getBandwidth(int valueP)
{
- return cString::sprintf("%s", getUserString(value, BandwidthValues));
+ return cString::sprintf("%s", getUserString(valueP, BandwidthValues));
}
-cString getInversion(int value)
+cString getInversion(int valueP)
{
- return cString::sprintf("%s", getUserString(value, InversionValues));
+ return cString::sprintf("%s", getUserString(valueP, InversionValues));
}
-cString getHierarchy(int value)
+cString getHierarchy(int valueP)
{
- return cString::sprintf("%s", getUserString(value, HierarchyValues));
+ return cString::sprintf("%s", getUserString(valueP, HierarchyValues));
}
-cString getGuard(int value)
+cString getGuard(int valueP)
{
- return cString::sprintf("%s", getUserString(value, GuardValues));
+ return cString::sprintf("%s", getUserString(valueP, GuardValues));
}
-cString getModulation(int value)
+cString getModulation(int valueP)
{
- return cString::sprintf("%s", getUserString(value, ModulationValues));
+ return cString::sprintf("%s", getUserString(valueP, ModulationValues));
}
-cString getTerrestrialSystem(int value)
+cString getTerrestrialSystem(int valueP)
{
- return cString::sprintf("%s", getUserString(value, SystemValuesTerr));
+ return cString::sprintf("%s", getUserString(valueP, SystemValuesTerr));
}
-cString getSatelliteSystem(int value)
+cString getSatelliteSystem(int valueP)
{
- return cString::sprintf("%s", getUserString(value, SystemValuesSat));
+ return cString::sprintf("%s", getUserString(valueP, SystemValuesSat));
}
-cString getRollOff(int value)
+cString getRollOff(int valueP)
{
- return cString::sprintf("%s", getUserString(value, RollOffValues));
+ return cString::sprintf("%s", getUserString(valueP, RollOffValues));
}
-cString getPilot(int value)
+cString getPilot(int valueP)
{
- return cString::sprintf("%s", getUserString(value, PilotValues));
+ return cString::sprintf("%s", getUserString(valueP, PilotValues));
}
-cString getResolution(int width, int height, int scan)
+cString getResolution(int widthP, int heightP, int scanP)
{
- if ((width > 0) && (height > 0)) {
- switch (scan) {
- case VIDEO_SCAN_INTERLACED: return cString::sprintf("%dx%d %s", width, height, tr("interlaced"));
- case VIDEO_SCAN_PROGRESSIVE: return cString::sprintf("%dx%d %s", width, height, tr("progressive"));
- default: return cString::sprintf("%dx%d", width, height);
+ if ((widthP > 0) && (heightP > 0)) {
+ switch (scanP) {
+ case VIDEO_SCAN_INTERLACED: return cString::sprintf("%dx%d %s", widthP, heightP, tr("interlaced"));
+ case VIDEO_SCAN_PROGRESSIVE: return cString::sprintf("%dx%d %s", widthP, heightP, tr("progressive"));
+ default: return cString::sprintf("%dx%d", widthP, heightP);
}
}
return cString::sprintf("---");
}
-cString getAspectRatio(int value)
+cString getAspectRatio(int valueP)
{
- switch (value) {
+ switch (valueP) {
case VIDEO_ASPECT_RATIO_RESERVED: return cString::sprintf("%s", tr("reserved"));
case VIDEO_ASPECT_RATIO_EXTENDED: return cString::sprintf("%s", tr("extended"));
case VIDEO_ASPECT_RATIO_1_1: return cString::sprintf("1:1");
@@ -436,9 +437,9 @@ cString getAspectRatio(int value)
return cString::sprintf("---");
}
-cString getVideoFormat(int value)
+cString getVideoFormat(int valueP)
{
- switch (value) {
+ switch (valueP) {
case VIDEO_FORMAT_UNKNOWN: return cString::sprintf("%s", tr("unknown"));
case VIDEO_FORMAT_RESERVED: return cString::sprintf("%s", tr("reserved"));
case VIDEO_FORMAT_COMPONENT: return cString::sprintf("%s", tr("component"));
@@ -451,16 +452,16 @@ cString getVideoFormat(int value)
return cString::sprintf("---");
}
-cString getFrameRate(double value)
+cString getFrameRate(double valueP)
{
- if (value > 0)
- return cString::sprintf("%.2f %s", value, tr("Hz"));
+ if (valueP > 0)
+ return cString::sprintf("%.2f %s", valueP, tr("Hz"));
return cString::sprintf("---");
}
-cString getAC3BitStreamMode(int value, int coding)
+cString getAC3BitStreamMode(int valueP, int codingP)
{
- switch (value) {
+ switch (valueP) {
case AUDIO_BITSTREAM_MODE_CM: return cString::sprintf("%s", tr("Complete Main (CM)"));
case AUDIO_BITSTREAM_MODE_ME: return cString::sprintf("%s", tr("Music and Effects (ME)"));
case AUDIO_BITSTREAM_MODE_VI: return cString::sprintf("%s", tr("Visually Impaired (VI)"));
@@ -468,16 +469,16 @@ cString getAC3BitStreamMode(int value, int coding)
case AUDIO_BITSTREAM_MODE_D: return cString::sprintf("%s", tr("Dialogue (D)"));
case AUDIO_BITSTREAM_MODE_C: return cString::sprintf("%s", tr("Commentary (C)"));
case AUDIO_BITSTREAM_MODE_E: return cString::sprintf("%s", tr("Emergency (E)"));
- case AUDIO_BITSTREAM_MODE_VO_KAR: return cString::sprintf("%s", (coding == 1) ? tr("Voice Over (VO)") : tr("Karaoke"));
+ case AUDIO_BITSTREAM_MODE_VO_KAR: return cString::sprintf("%s", (codingP == 1) ? tr("Voice Over (VO)") : tr("Karaoke"));
default: break;
}
return cString::sprintf("---");
}
-cString getAC3AudioCodingMode(int value, int stream)
+cString getAC3AudioCodingMode(int valueP, int streamP)
{
- if (stream != 7) {
- switch (value) {
+ if (streamP != 7) {
+ switch (valueP) {
case AUDIO_CODING_MODE_1_1: return cString::sprintf("1+1 - %s, %s", tr("Ch1"), tr("Ch2"));
case AUDIO_CODING_MODE_1_0: return cString::sprintf("1/0 - %s", tr("C"));
case AUDIO_CODING_MODE_2_0: return cString::sprintf("2/0 - %s, %s", tr("L"), tr("R"));
@@ -492,9 +493,9 @@ cString getAC3AudioCodingMode(int value, int stream)
return cString::sprintf("---");
}
-cString getAC3CenterMixLevel(int value)
+cString getAC3CenterMixLevel(int valueP)
{
- switch (value) {
+ switch (valueP) {
case AUDIO_CENTER_MIX_LEVEL_MINUS_3dB: return cString::sprintf("-3.0 %s", tr("dB"));
case AUDIO_CENTER_MIX_LEVEL_MINUS_4_5dB: return cString::sprintf("-4.5 %s", tr("dB"));
case AUDIO_CENTER_MIX_LEVEL_MINUS_6dB: return cString::sprintf("-6.0 %s", tr("dB"));
@@ -504,9 +505,9 @@ cString getAC3CenterMixLevel(int value)
return cString::sprintf("---");
}
-cString getAC3SurroundMixLevel(int value)
+cString getAC3SurroundMixLevel(int valueP)
{
- switch (value) {
+ switch (valueP) {
case AUDIO_SURROUND_MIX_LEVEL_MINUS_3dB: return cString::sprintf("-3 %s", tr("dB"));
case AUDIO_SURROUND_MIX_LEVEL_MINUS_6dB: return cString::sprintf("-6 %s", tr("dB"));
case AUDIO_SURROUND_MIX_LEVEL_0_dB: return cString::sprintf("0 %s", tr("dB"));
@@ -516,9 +517,9 @@ cString getAC3SurroundMixLevel(int value)
return cString::sprintf("---");
}
-cString getAC3DolbySurroundMode(int value)
+cString getAC3DolbySurroundMode(int valueP)
{
- switch (value) {
+ switch (valueP) {
case AUDIO_DOLBY_SURROUND_MODE_NOT_INDICATED: return cString::sprintf("%s", tr("not indicated"));
case AUDIO_DOLBY_SURROUND_MODE_NOT_DOLBYSURROUND: return cString::sprintf("%s", trVDR("no"));
case AUDIO_DOLBY_SURROUND_MODE_DOLBYSURROUND: return cString::sprintf("%s", trVDR("yes"));
@@ -528,57 +529,57 @@ cString getAC3DolbySurroundMode(int value)
return cString::sprintf("---");
}
-cString getAC3DialogLevel(int value)
+cString getAC3DialogLevel(int valueP)
{
- if (value > 0)
- return cString::sprintf("-%d %s", value, tr("dB"));
+ if (valueP > 0)
+ return cString::sprintf("-%d %s", valueP, tr("dB"));
return cString::sprintf("---");
}
-cString getFrequencyMHz(int value)
+cString getFrequencyMHz(int valueP)
{
- double freq = value;
+ double freq = valueP;
while (freq > 20000.0) freq /= 1000.0;
return cString::sprintf("%s %s", *dtoa(freq, "%lg"), tr("MHz"));
}
-cString getAudioSamplingFreq(int value)
+cString getAudioSamplingFreq(int valueP)
{
- switch (value) {
+ switch (valueP) {
case AUDIO_SAMPLING_FREQUENCY_INVALID: return cString::sprintf("---");
case AUDIO_SAMPLING_FREQUENCY_RESERVED: return cString::sprintf("%s", tr("reserved"));
default: break;
}
- return cString::sprintf("%d %s", value, tr("Hz"));
+ return cString::sprintf("%d %s", valueP, tr("Hz"));
}
-cString getAudioBitrate(double value, double stream)
+cString getAudioBitrate(double valueP, double streamP)
{
- switch ((int)stream) {
+ switch ((int)streamP) {
case AUDIO_BITRATE_INVALID: return cString::sprintf("---");
- case AUDIO_BITRATE_RESERVED: return cString::sprintf("%s (%s)", tr("reserved"), *getBitrateKbits(value));
- case AUDIO_BITRATE_FREE: return cString::sprintf("%s (%s)", tr("free"), *getBitrateKbits(value));
+ case AUDIO_BITRATE_RESERVED: return cString::sprintf("%s (%s)", tr("reserved"), *getBitrateKbits(valueP));
+ case AUDIO_BITRATE_FREE: return cString::sprintf("%s (%s)", tr("free"), *getBitrateKbits(valueP));
default: break;
}
- return cString::sprintf("%s (%s)", *getBitrateKbits(stream), *getBitrateKbits(value));
+ return cString::sprintf("%s (%s)", *getBitrateKbits(streamP), *getBitrateKbits(valueP));
}
-cString getVideoBitrate(double value, double stream)
+cString getVideoBitrate(double valueP, double streamP)
{
- return cString::sprintf("%s (%s)", *getBitrateMbits(stream), *getBitrateMbits(value));
+ return cString::sprintf("%s (%s)", *getBitrateMbits(streamP), *getBitrateMbits(valueP));
}
-cString getBitrateMbits(double value)
+cString getBitrateMbits(double valueP)
{
- if (value > 0)
- return cString::sprintf("%.2f %s", value / 1000000.0, tr("Mbit/s"));
+ if (valueP > 0)
+ return cString::sprintf("%.2f %s", valueP / 1000000.0, tr("Mbit/s"));
return cString::sprintf("---");
}
-cString getBitrateKbits(double value)
+cString getBitrateKbits(double valueP)
{
- if (value > 0)
- return cString::sprintf("%.0f %s", value / 1000.0, tr("kbit/s"));
+ if (valueP > 0)
+ return cString::sprintf("%.0f %s", valueP / 1000.0, tr("kbit/s"));
return cString::sprintf("---");
}
diff --git a/tools.h b/tools.h
new file mode 100644
index 0000000..d492e41
--- /dev/null
+++ b/tools.h
@@ -0,0 +1,83 @@
+/*
+ * tools.h: Frontend Status Monitor plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#ifndef __FEMON_COMMON_H
+#define __FEMON_COMMON_H
+
+#include <stdint.h>
+#include <vdr/channels.h>
+#include <vdr/dvbdevice.h>
+#include <vdr/remux.h>
+#include <vdr/tools.h>
+
+#define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
+
+#define FRONTEND_DEVICE "/dev/dvb/adapter%d/frontend%d"
+
+#define SATIP_DEVICE "SAT>IP"
+
+cDvbDevice *getDvbDevice(cDevice* deviceP);
+
+cString getFrontendInfo(cDvbDevice *deviceP);
+cString getFrontendName(cDvbDevice *deviceP);
+cString getFrontendStatus(cDvbDevice *deviceP);
+
+uint16_t getSNR(cDvbDevice *deviceP);
+uint16_t getSignal(cDvbDevice *deviceP);
+
+uint32_t getBER(cDvbDevice *deviceP);
+uint32_t getUNC(cDvbDevice *deviceP);
+
+cString getApids(const cChannel *channelP);
+cString getDpids(const cChannel *channelP);
+cString getSpids(const cChannel *channelP);
+cString getCAids(const cChannel *channelP);
+cString getVideoStream(int valueP);
+cString getVideoCodec(int valueP);
+cString getAudioStream(int valueP, const cChannel *channelP);
+cString getAudioCodec(int valueP);
+cString getAudioChannelMode(int valueP);
+cString getCoderate(int valueP);
+cString getTransmission(int valueP);
+cString getBandwidth(int valueP);
+cString getInversion(int valueP);
+cString getHierarchy(int valueP);
+cString getGuard(int valueP);
+cString getModulation(int valueP);
+cString getTerrestrialSystem(int valueP);
+cString getSatelliteSystem(int valueP);
+cString getRollOff(int valueP);
+cString getPilot(int valueP);
+cString getResolution(int widthP, int heightP, int scanP);
+cString getAspectRatio(int valueP);
+cString getVideoFormat(int valueP);
+cString getFrameRate(double valueP);
+cString getAC3Stream(int valueP, const cChannel *channelP);
+cString getAC3BitStreamMode(int valueP, int codingP);
+cString getAC3AudioCodingMode(int valueP, int streamP);
+cString getAC3CenterMixLevel(int valueP);
+cString getAC3SurroundMixLevel(int valueP);
+cString getAC3DolbySurroundMode(int valueP);
+cString getAC3DialogLevel(int valueP);
+cString getFrequencyMHz(int valueP);
+cString getAudioSamplingFreq(int valueP);
+cString getAudioBitrate(double valueP, double streamP);
+cString getVideoBitrate(double valueP, double streamP);
+cString getBitrateMbits(double valueP);
+cString getBitrateKbits(double valueP);
+
+class cFemonBitStream : public cBitStream {
+public:
+ cFemonBitStream(const uint8_t *dataP, const int lengthP) : cBitStream(dataP, lengthP) {}
+ uint32_t GetUeGolomb();
+ int32_t GetSeGolomb();
+ void SkipGolomb();
+ void SkipUeGolomb() { SkipGolomb(); }
+ void SkipSeGolomb() { SkipGolomb(); }
+ };
+
+#endif // __FEMON_COMMON_H
diff --git a/femonvideo.h b/video.h
similarity index 76%
rename from femonvideo.h
rename to video.h
index 40ecf63..01ff131 100644
--- a/femonvideo.h
+++ b/video.h
@@ -1,12 +1,12 @@
/*
- * Frontend Status Monitor plugin for the Video Disk Recorder
+ * video.h: Frontend Status Monitor plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
-#ifndef __FEMONVIDEO_H
-#define __FEMONVIDEO_H
+#ifndef __FEMON_VIDEO_H
+#define __FEMON_VIDEO_H
enum eVideoCodec {
VIDEO_CODEC_INVALID = -1,
@@ -75,19 +75,19 @@ public:
virtual ~cFemonVideoIf() {}
// eVideoCodec
- virtual void SetVideoCodec(eVideoCodec codec) = 0;
+ virtual void SetVideoCodec(eVideoCodec codecP) = 0;
// eVideoFormat
- virtual void SetVideoFormat(eVideoFormat format) = 0;
+ virtual void SetVideoFormat(eVideoFormat formatP) = 0;
// eVideoScan
- virtual void SetVideoScan(eVideoScan scan) = 0;
+ virtual void SetVideoScan(eVideoScan scanP) = 0;
// eVideoAspectRatio
- virtual void SetVideoAspectRatio(eVideoAspectRatio aspectratio) = 0;
+ virtual void SetVideoAspectRatio(eVideoAspectRatio aspectRatioP) = 0;
// pixels
- virtual void SetVideoSize(int width, int height) = 0;
+ virtual void SetVideoSize(int widthP, int heightP) = 0;
// Hz
- virtual void SetVideoFramerate(double framerate) = 0;
+ virtual void SetVideoFramerate(double frameRateP) = 0;
// Mbit/s
- virtual void SetVideoBitrate(double bitrate) = 0;
+ virtual void SetVideoBitrate(double bitRateP) = 0;
};
-#endif //__FEMONVIDEO_H
+#endif //__FEMON_VIDEO_H
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-femon.git
More information about the pkg-vdr-dvb-changes
mailing list