2004-03-03 03:20:00 +01:00
|
|
|
/*
|
|
|
|
* Frontend Status Monitor plugin for the Video Disk Recorder
|
|
|
|
*
|
|
|
|
* See the README file for copyright information and how to reach the author.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2004-02-15 03:20:00 +01:00
|
|
|
#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>
|
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>
|
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
|
|
|
|
};
|
|
|
|
|
2005-11-13 03:20:00 +01:00
|
|
|
static cFemonOsd *pInstance;
|
2008-11-12 16:58:32 +01:00
|
|
|
|
|
|
|
cOsd *m_Osd;
|
|
|
|
cFemonReceiver *m_Receiver;
|
|
|
|
int m_Frontend;
|
|
|
|
int m_SvdrpFrontend;
|
|
|
|
double m_SvdrpVideoBitrate;
|
|
|
|
double m_SvdrpAudioBitrate;
|
2006-09-17 03:20:00 +02:00
|
|
|
SvdrpConnection_v1_0 m_SvdrpConnection;
|
2008-11-12 16:58:32 +01:00
|
|
|
cPlugin *m_SvdrpPlugin;
|
|
|
|
int m_Number;
|
|
|
|
int m_OldNumber;
|
2011-09-03 22:00:33 +02:00
|
|
|
int m_Quality;
|
|
|
|
bool m_QualityValid;
|
|
|
|
int m_Strength;
|
|
|
|
bool m_StrengthValid;
|
2009-09-22 07:44:30 +02:00
|
|
|
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;
|
2008-11-12 16:58:32 +01:00
|
|
|
fe_status_t m_FrontendStatus;
|
2009-09-22 07:44:30 +02:00
|
|
|
bool m_FrontendStatusValid;
|
|
|
|
dvb_frontend_info m_FrontendInfo;
|
2012-02-05 13:04:04 +01:00
|
|
|
eDeviceSourceType m_DeviceSource;
|
2008-11-12 16:58:32 +01:00
|
|
|
int m_DisplayMode;
|
2009-07-08 22:14:19 +02:00
|
|
|
int m_OsdWidth;
|
|
|
|
int m_OsdHeight;
|
2010-02-25 19:33:20 +01:00
|
|
|
int m_OsdLeft;
|
|
|
|
int m_OsdTop;
|
2009-06-18 11:16:11 +02:00
|
|
|
cFont *m_Font;
|
2008-11-12 16:58:32 +01:00
|
|
|
cTimeMs m_InputTime;
|
|
|
|
cCondWait m_Sleep;
|
|
|
|
cMutex m_Mutex;
|
|
|
|
|
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);
|
|
|
|
virtual void ChannelSwitch(const cDevice * device, int channelNumber);
|
2005-01-15 03:20:00 +01:00
|
|
|
virtual void SetAudioTrack(int Index, const char * const *Tracks);
|
2004-02-15 03:20:00 +01:00
|
|
|
|
|
|
|
public:
|
2005-11-13 03:20:00 +01:00
|
|
|
static cFemonOsd *Instance(bool create = false);
|
2004-02-15 03:20:00 +01:00
|
|
|
~cFemonOsd();
|
|
|
|
|
|
|
|
virtual void Show(void);
|
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
2005-11-13 03:20:00 +01:00
|
|
|
|
2008-11-12 16:58:32 +01:00
|
|
|
bool DeviceSwitch(int direction);
|
|
|
|
double GetVideoBitrate(void);
|
|
|
|
double GetAudioBitrate(void);
|
|
|
|
double GetDolbyBitrate(void);
|
2004-02-15 03:20:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__FEMONOSD_H
|
|
|
|
|