2004-03-03 03:20:00 +01:00
|
|
|
/*
|
2015-03-07 21:32:58 +01:00
|
|
|
* osd.h: Frontend Status Monitor plugin for the Video Disk Recorder
|
2004-03-03 03:20:00 +01:00
|
|
|
*
|
|
|
|
* See the README file for copyright information and how to reach the author.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-03-07 21:32:58 +01:00
|
|
|
#ifndef __FEMON_OSD_H
|
|
|
|
#define __FEMON_OSD_H
|
2004-02-15 03:20:00 +01:00
|
|
|
|
|
|
|
#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>
|
2006-09-17 03:20:00 +02:00
|
|
|
#include <vdr/plugin.h>
|
2004-02-15 03:20:00 +01:00
|
|
|
#include <vdr/channels.h>
|
2004-06-24 03:20:00 +02:00
|
|
|
#include <vdr/transfer.h>
|
2005-01-15 03:20:00 +01:00
|
|
|
#include <vdr/tools.h>
|
2015-03-07 21:09:18 +01:00
|
|
|
|
2015-03-07 21:32:58 +01:00
|
|
|
#include "receiver.h"
|
2006-09-17 03:20:00 +02:00
|
|
|
#include "svdrpservice.h"
|
|
|
|
|
2008-11-09 12:43:27 +01:00
|
|
|
#define MAX_BM_NUMBER 8
|
2004-02-15 03:20:00 +01:00
|
|
|
|
|
|
|
class cFemonOsd : public cOsdObject, public cThread, public cStatus {
|
|
|
|
private:
|
2012-02-05 13:04:04 +01:00
|
|
|
enum eDeviceSourceType {
|
|
|
|
DEVICESOURCE_DVBAPI = 0,
|
|
|
|
DEVICESOURCE_IPTV,
|
|
|
|
DEVICESOURCE_PVRINPUT,
|
|
|
|
DEVICESOURCE_COUNT
|
|
|
|
};
|
|
|
|
|
2015-03-07 17:22:02 +01:00
|
|
|
static cFemonOsd *pInstanceS;
|
2008-11-12 16:58:32 +01:00
|
|
|
|
2015-03-07 17:22:02 +01:00
|
|
|
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;
|
2008-11-12 16:58:32 +01:00
|
|
|
|
2016-01-21 20:01:15 +01:00
|
|
|
bool AttachFrontend(void);
|
2004-03-03 03:20:00 +01:00
|
|
|
void DrawStatusWindow(void);
|
|
|
|
void DrawInfoWindow(void);
|
2006-09-17 03:20:00 +02:00
|
|
|
bool SvdrpConnect(void);
|
|
|
|
bool SvdrpTune(void);
|
2004-02-15 03:20:00 +01:00
|
|
|
|
|
|
|
protected:
|
2005-11-13 03:20:00 +01:00
|
|
|
cFemonOsd();
|
|
|
|
cFemonOsd(const cFemonOsd&);
|
|
|
|
cFemonOsd& operator= (const cFemonOsd&);
|
2004-02-15 03:20:00 +01:00
|
|
|
virtual void Action(void);
|
2015-03-07 17:22:02 +01:00
|
|
|
virtual void ChannelSwitch(const cDevice *deviceP, int channelNumberP, bool liveViewP);
|
|
|
|
virtual void SetAudioTrack(int indexP, const char * const *tracksP);
|
2004-02-15 03:20:00 +01:00
|
|
|
|
|
|
|
public:
|
2015-03-07 17:22:02 +01:00
|
|
|
static cFemonOsd *Instance(bool createP = false);
|
2004-02-15 03:20:00 +01:00
|
|
|
~cFemonOsd();
|
|
|
|
|
|
|
|
virtual void Show(void);
|
2015-03-07 17:22:02 +01:00
|
|
|
virtual eOSState ProcessKey(eKeys keyP);
|
2005-11-13 03:20:00 +01:00
|
|
|
|
2015-03-07 17:22:02 +01:00
|
|
|
bool DeviceSwitch(int directionP);
|
2008-11-12 16:58:32 +01:00
|
|
|
double GetVideoBitrate(void);
|
|
|
|
double GetAudioBitrate(void);
|
|
|
|
double GetDolbyBitrate(void);
|
2004-02-15 03:20:00 +01:00
|
|
|
};
|
|
|
|
|
2015-03-07 21:32:58 +01:00
|
|
|
#endif //__FEMON_OSD_H
|
2004-02-15 03:20:00 +01:00
|
|
|
|