1
0
mirror of https://github.com/rofafor/vdr-plugin-femon.git synced 2023-10-10 13:36:53 +02:00
vdr-plugin-femon/femonclient-0.0.1/femonclient.c
Rolf Ahrenberg 7da8cb2110 Updated for vdr-1.3.36.
Added french translation (Thanks to Nicolas Huillard).
Enabled bitrate commands via SVDRP.
Added new SVDRP commands.
Modified femon service without incrementing version number.
Added "Duotone" theme for 2bpp on screen displays.
Fixed crash bug in femonreceiver.
Fixed setup page bug (Thanks to Thomas Günther for reporting this one).
2005-11-13 04:20:00 +02:00

52 lines
1.6 KiB
C

/*
* femonclient.c: Demo femon service client plugin
*
* See the README file for copyright information and how to reach the author.
*
* $Id: $
*/
#include <stdlib.h>
#include <vdr/interface.h>
#include <vdr/plugin.h>
#include "femonservice.h"
static const char *VERSION = "0.0.1";
static const char *DESCRIPTION = "Femon client";
static const char *MAINMENUENTRY = "Show frontend statistic on console";
class cPluginFemonClient : public cPlugin {
public:
virtual const char *Version(void) { return VERSION; }
virtual const char *Description(void) { return DESCRIPTION; }
virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; }
virtual cOsdObject *MainMenuAction(void);
};
// --- cPluginFemonClient ----------------------------------------------------------
cOsdObject *cPluginFemonClient::MainMenuAction(void)
{
FemonService_v1_0 femon;
cPlugin *p;
p = cPluginManager::CallFirstService("FemonService-v1.0", &femon);
if (p) {
printf("Device : %s\n", *femon.fe_name);
printf("Status : %s\n", *femon.fe_status);
printf("Signal : %04X (%2d%%)\n", femon.fe_signal, femon.fe_signal / 655);
printf("SNR : %04X (%2d%%)\n", femon.fe_snr, femon.fe_snr / 655);
printf("BER : %08X\n", femon.fe_ber);
printf("UNC : %08X\n", femon.fe_unc);
printf("Video : %.2f Mbit/s\n", femon.video_bitrate);
printf("Audio : %.0f kbit/s\n", femon.audio_bitrate);
printf("Dolby : %.0f kbit/s\n", femon.dolby_bitrate);
}
else
printf("\n--- No support for FemonService-v1.0 found ---\n");
return NULL;
}
VDRPLUGINCREATOR(cPluginFemonClient); // Don't touch this!