1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
/*
* iMON LCD plugin to VDR (C++)
*
* (C) 2009 Andreas Brachold <vdr07 AT deltab de>
*
* This code is distributed under the terms and conditions of the
* GNU GENERAL PUBLIC LICENSE. See the file COPYING for details.
*
*/
#include <stdint.h>
#include <time.h>
#include <vdr/eitscan.h>
#include "watch.h"
#include "status.h"
//#define MOREDEBUGMSG
// ---
ciMonStatusMonitor::ciMonStatusMonitor(ciMonWatch* pDev)
: m_pDev(pDev)
{
}
void ciMonStatusMonitor::ChannelSwitch(const cDevice *pDevice, int nChannelNumber)
{
if (nChannelNumber > 0
&& pDevice->IsPrimaryDevice()
&& !EITScanner.UsesDevice(pDevice)
&& (nChannelNumber == cDevice::CurrentChannel()))
{
#ifdef MOREDEBUGMSG
dsyslog("iMonLCD: channel switched to %d on DVB %d", nChannelNumber, pDevice->CardIndex());
#endif
m_pDev->Channel(nChannelNumber);
}
}
void ciMonStatusMonitor::SetVolume(int Volume, bool Absolute)
{
#ifdef MOREDEBUGMSG
dsyslog("iMonLCD: SetVolume %d %d", Volume, Absolute);
#endif
m_pDev->Volume(Volume,Absolute);
}
void ciMonStatusMonitor::Recording(const cDevice *pDevice, const char *szName, const char *szFileName, bool bOn)
{
#ifdef MOREDEBUGMSG
dsyslog("iMonLCD: Recording %d %s", pDevice->CardIndex(), szName);
#endif
m_pDev->Recording(pDevice,szName,szFileName,bOn);
}
void ciMonStatusMonitor::Replaying(const cControl *pControl, const char *szName, const char *szFileName, bool bOn)
{
#ifdef MOREDEBUGMSG
dsyslog("iMonLCD: Replaying %s", szName);
#endif
m_pDev->Replaying(pControl,szName,szFileName,bOn);
}
void ciMonStatusMonitor::OsdClear(void)
{
#ifdef unusedMOREDEBUGMSG
dsyslog("iMonLCD: OsdClear");
#endif
}
void ciMonStatusMonitor::OsdTitle(const char *Title)
{
#ifdef unusedMOREDEBUGMSG
dsyslog("iMonLCD: OsdTitle '%s'", Title);
#endif
}
void ciMonStatusMonitor::OsdStatusMessage(const char *szMessage)
{
#ifdef MOREDEBUGMSG
dsyslog("iMonLCD: OsdStatusMessage '%s'", szMessage ? szMessage : "NULL");
#endif
m_pDev->StatusMessage(szMessage);
}
void ciMonStatusMonitor::OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue)
{
#ifdef unusedMOREDEBUGMSG
dsyslog("iMonLCD: OsdHelpKeys %s - %s - %s - %s", Red, Green, Yellow, Blue);
#endif
}
void ciMonStatusMonitor::OsdCurrentItem(const char *Text)
{
#ifdef unusedMOREDEBUGMSG
dsyslog("iMonLCD: OsdCurrentItem %s", Text);
#endif
}
void ciMonStatusMonitor::OsdTextItem(const char *Text, bool Scroll)
{
#ifdef unusedMOREDEBUGMSG
dsyslog("iMonLCD: OsdTextItem %s %d", Text, Scroll);
#endif
}
void ciMonStatusMonitor::OsdChannel(const char *Text)
{
#ifdef unusedMOREDEBUGMSG
dsyslog("iMonLCD: OsdChannel %s", Text);
#endif
}
void ciMonStatusMonitor::OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle)
{
#ifdef unusedMOREDEBUGMSG
char buffer[25];
struct tm tm_r;
dsyslog("iMonLCD: OsdProgramme");
strftime(buffer, sizeof(buffer), "%R", localtime_r(&PresentTime, &tm_r));
dsyslog("%5s %s", buffer, PresentTitle);
dsyslog("%5s %s", "", PresentSubtitle);
strftime(buffer, sizeof(buffer), "%R", localtime_r(&FollowingTime, &tm_r));
dsyslog("%5s %s", buffer, FollowingTitle);
dsyslog("%5s %s", "", FollowingSubtitle);
#endif
}
|