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.
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*/
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
#define MAX_BM_NUMBER 5
|
2004-02-15 03:20:00 +01:00
|
|
|
|
|
|
|
class cFemonOsd : public cOsdObject, public cThread, public cStatus {
|
|
|
|
private:
|
2006-09-17 03:20:00 +02:00
|
|
|
enum { MAX_BMNUMBERS = 6 };
|
2005-11-13 03:20:00 +01:00
|
|
|
static cFemonOsd *pInstance;
|
2004-05-18 03:20:00 +02:00
|
|
|
cOsd *m_Osd;
|
2004-02-26 03:20:00 +01:00
|
|
|
cFemonReceiver *m_Receiver;
|
2004-02-15 03:20:00 +01:00
|
|
|
int m_Frontend;
|
2006-09-17 03:20:00 +02:00
|
|
|
int m_SvdrpFrontend;
|
|
|
|
double m_SvdrpVideoBitrate;
|
|
|
|
double m_SvdrpAudioBitrate;
|
|
|
|
SvdrpConnection_v1_0 m_SvdrpConnection;
|
|
|
|
cPlugin *m_SvdrpPlugin;
|
2004-02-15 03:20:00 +01:00
|
|
|
struct dvb_frontend_info m_FrontendInfo;
|
|
|
|
int m_Number;
|
2004-03-16 03:20:00 +01:00
|
|
|
int m_OldNumber;
|
2004-03-03 03:20:00 +01:00
|
|
|
uint16_t m_SNR;
|
|
|
|
uint16_t m_Signal;
|
|
|
|
uint32_t m_BER;
|
|
|
|
uint32_t m_UNC;
|
|
|
|
fe_status_t m_FrontendStatus;
|
|
|
|
int m_DisplayMode;
|
2004-05-18 03:20:00 +02:00
|
|
|
const cFont *m_Font;
|
2005-01-15 03:20:00 +01:00
|
|
|
cTimeMs m_InputTime;
|
2004-03-03 03:20:00 +01:00
|
|
|
cMutex* m_Mutex;
|
2005-01-15 03:20:00 +01:00
|
|
|
static cBitmap bmStereo, bmMonoLeft, bmMonoRight, bmDD, bmDD20, bmDD51;
|
2006-09-17 03:20:00 +02:00
|
|
|
static cBitmap bmNumbers[MAX_BMNUMBERS];
|
|
|
|
static cBitmap bmDevice, bmPAL, bmNTSC, bmSVDRP;
|
2005-01-15 03:20:00 +01:00
|
|
|
static cBitmap bmAspectRatio_1_1, bmAspectRatio_16_9, bmAspectRatio_2_21_1, bmAspectRatio_4_3;
|
2005-02-24 03:20:00 +01:00
|
|
|
static cBitmap bmLock, bmSignal, bmCarrier, bmViterbi, bmSync;
|
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
|
|
|
|
|
|
|
bool DeviceSwitch(int direction);
|
|
|
|
double GetVideoBitrate(void);
|
|
|
|
double GetAudioBitrate(void);
|
|
|
|
double GetDolbyBitrate(void);
|
2004-02-15 03:20:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__FEMONOSD_H
|
|
|
|
|