summaryrefslogtreecommitdiff
path: root/plugins/control/patches/control-0.0.2a.patch
blob: d4c0fe39b5d696fd0104cae13d028f763ca7da2f (plain)
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
diff -ur control-0.0.2a/gateway.c control-0.0.2a-patched/gateway.c
--- control-0.0.2a/gateway.c	2006-01-08 17:33:12.000000000 +0100
+++ control-0.0.2a-patched/gateway.c	2006-01-08 17:37:30.000000000 +0100
@@ -102,7 +102,12 @@
 
       uint64 Command = 0;
       uint i = 0;
+#if VDRVERSNUM >= 10318
+      cTimeMs timeout;
+      timeout.Set(100);
+#else
       int t0 = time_ms();
+#endif
       while (_active && i < sizeof(Command)) {
 
         uchar ch;
@@ -131,7 +136,11 @@
           // of their codes, so we'll need to wait some 100ms to see if
           // there is more coming up - or whether this really is the 'ESC'
           // key (if somebody knows how to clean this up, please let me know):
+#if VDRVERSNUM >= 10318
+          if (Command == 0x1B && !timeout.TimedOut())
+#else
           if (Command == 0x1B && time_ms() - t0 < 100)
+#endif
             continue;
 
           if (Command) {
diff -ur control-0.0.2a/state.c control-0.0.2a-patched/state.c
--- control-0.0.2a/state.c	2004-07-02 21:24:22.000000000 +0200
+++ control-0.0.2a-patched/state.c	2006-01-08 18:08:10.000000000 +0100
@@ -69,7 +69,11 @@
 // The given DVB device has started recording Name. Name is the name of the
 // recording, without any directory path.
 // If Name is NULL, the recording has ended.
+#if VDRVERSNUM >= 10338
+void cCtrlState::Recording(const cDevice *Device, const char *Name, const char *FileName, bool On) {
+#else
 void cCtrlState::Recording(const cDevice *Device, const char *Name) {
+#endif	
 //printf("Recording %i, %s", Device->CardIndex(), Name );
 }
 
@@ -79,7 +83,11 @@
 // recording, without any directory path. In case of a player that can't provide
 // a name, Name can be a string that identifies the player type (like, e.g., "DVD").
 // If Name is NULL, the replay has ended.
+#if VDRVERSNUM >= 10338
+void cCtrlState::Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) {
+#else
 void cCtrlState::Replaying(const cControl *Control, const char *Name) {
+#endif	
 //printf("Replaying %s", Name );
 }
 
diff -ur control-0.0.2a/state.h control-0.0.2a-patched/state.h
--- control-0.0.2a/state.h	2004-07-02 21:24:22.000000000 +0200
+++ control-0.0.2a-patched/state.h	2006-01-08 18:06:55.000000000 +0100
@@ -60,8 +60,13 @@
 // cStatus
 protected:
   virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber);
+#if VDRVERSNUM >= 10338
+  virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On);
+  virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On);
+#else
   virtual void Recording(const cDevice *Device, const char *Name);
   virtual void Replaying(const cControl *Control, const char *Name);
+#endif
   virtual void SetVolume(int Volume, bool Absolute);
   virtual void OsdClear();
   virtual void OsdTitle(const char *Title);