2005-08-28 03:20:00 +02:00
|
|
|
/*
|
|
|
|
* 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>
|
2006-09-17 03:20:00 +02:00
|
|
|
#include <vdr/channels.h>
|
2012-01-15 22:07:53 +01:00
|
|
|
#include <vdr/dvbdevice.h>
|
2009-08-25 19:22:06 +02:00
|
|
|
#include <vdr/remux.h>
|
2005-08-28 03:20:00 +02:00
|
|
|
#include <vdr/tools.h>
|
|
|
|
|
2006-03-08 03:20:00 +01:00
|
|
|
#ifdef DEBUG
|
2009-10-01 11:13:35 +02:00
|
|
|
#define debug(x...) dsyslog("FEMON: " x);
|
|
|
|
#define error(x...) esyslog("ERROR: " x);
|
2005-08-28 03:20:00 +02:00
|
|
|
#else
|
2009-10-01 11:13:35 +02:00
|
|
|
#define debug(x...) ;
|
|
|
|
#define error(x...) esyslog("ERROR: " x);
|
2005-08-28 03:20:00 +02:00
|
|
|
#endif
|
|
|
|
|
2008-11-09 12:43:27 +01:00
|
|
|
#define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))
|
|
|
|
|
2005-08-28 03:20:00 +02:00
|
|
|
#define FRONTEND_DEVICE "/dev/dvb/adapter%d/frontend%d"
|
|
|
|
|
2012-01-15 22:07:53 +01:00
|
|
|
cString getFrontendInfo(cDvbDevice *device);
|
|
|
|
cString getFrontendName(cDvbDevice *device);
|
|
|
|
cString getFrontendStatus(cDvbDevice *device);
|
2006-09-17 03:20:00 +02:00
|
|
|
|
2012-01-15 22:07:53 +01:00
|
|
|
uint16_t getSNR(cDvbDevice *device);
|
|
|
|
uint16_t getSignal(cDvbDevice *device);
|
2006-09-17 03:20:00 +02:00
|
|
|
|
2012-01-15 22:07:53 +01:00
|
|
|
uint32_t getBER(cDvbDevice *device);
|
|
|
|
uint32_t getUNC(cDvbDevice *device);
|
2005-08-28 03:20:00 +02:00
|
|
|
|
2006-09-17 03:20:00 +02:00
|
|
|
cString getApids(const cChannel *channel);
|
|
|
|
cString getDpids(const cChannel *channel);
|
2007-10-14 03:20:00 +02:00
|
|
|
cString getSpids(const cChannel *channel);
|
2008-12-16 11:26:46 +01:00
|
|
|
cString getCAids(const cChannel *channel);
|
2008-11-10 23:30:00 +01:00
|
|
|
cString getVideoStream(int value);
|
2008-11-09 12:43:27 +01:00
|
|
|
cString getVideoCodec(int value);
|
2008-11-10 23:30:00 +01:00
|
|
|
cString getAudioStream(int value, const cChannel *channel);
|
2008-11-09 12:43:27 +01:00
|
|
|
cString getAudioCodec(int value);
|
|
|
|
cString getAudioChannelMode(int value);
|
2006-09-17 03:20:00 +02:00
|
|
|
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);
|
2012-01-15 22:07:53 +01:00
|
|
|
cString getTerrestrialSystem(int value);
|
|
|
|
cString getSatelliteSystem(int value);
|
2008-11-09 12:43:27 +01:00
|
|
|
cString getRollOff(int value);
|
|
|
|
cString getResolution(int width, int height, int scan);
|
2006-09-17 03:20:00 +02:00
|
|
|
cString getAspectRatio(int value);
|
|
|
|
cString getVideoFormat(int value);
|
2008-11-09 12:43:27 +01:00
|
|
|
cString getFrameRate(double value);
|
2008-11-22 22:12:39 +01:00
|
|
|
cString getAC3Stream(int value, const cChannel *channel);
|
2006-09-17 03:20:00 +02:00
|
|
|
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);
|
2008-11-09 12:43:27 +01:00
|
|
|
cString getVideoBitrate(double value, double stream);
|
2006-09-17 03:20:00 +02:00
|
|
|
cString getBitrateMbits(double value);
|
|
|
|
cString getBitrateKbits(double value);
|
|
|
|
|
2011-12-04 18:30:24 +01:00
|
|
|
class cFemonBitStream : public cBitStream {
|
2009-08-25 19:22:06 +02:00
|
|
|
public:
|
2011-12-04 18:30:24 +01:00
|
|
|
cFemonBitStream(const uint8_t *Data, const int Length) : cBitStream(Data, Length) {}
|
2011-11-19 15:02:16 +01:00
|
|
|
uint32_t GetUeGolomb();
|
|
|
|
int32_t GetSeGolomb();
|
|
|
|
void SkipGolomb();
|
|
|
|
void SkipUeGolomb() { SkipGolomb(); }
|
|
|
|
void SkipSeGolomb() { SkipGolomb(); }
|
|
|
|
};
|
2009-08-25 19:22:06 +02:00
|
|
|
|
2005-08-28 03:20:00 +02:00
|
|
|
#endif // __FEMONTOOLS_H
|