summaryrefslogtreecommitdiffstats
path: root/xbmc-10-hdhomerun.patch
blob: 4ca61d71a203e2772c129ab0fbdc9b3ef3a0b540 (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
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
130
131
132
133
134
135
136
--- xbmc-10/Makefile.in.orig	2010-07-19 02:04:32.002268864 -0400
+++ xbmc-10/Makefile.in	2010-07-19 02:06:30.185143439 -0400
@@ -94,7 +94,6 @@
 LIB_DIRS=\
 	xbmc/lib/cximage-6.0 \
 	xbmc/lib/libexif \
-	xbmc/lib/libhdhomerun \
 	xbmc/lib/libid3tag \
 	xbmc/lib/libapetag \
 	xbmc/lib/libPython/linux \
@@ -340,8 +339,6 @@
 endif
 libexif: dllloader
 	$(MAKE) -C xbmc/lib/libexif
-libhdhomerun: dllloader
-	$(MAKE) -C xbmc/lib/libhdhomerun
 libid3tag: dllloader
 	$(MAKE) -C xbmc/lib/libid3tag
 papcodecs: dllloader dvdpcodecs
@@ -371,9 +368,9 @@
 
 codecs: papcodecs dvdpcodecs
 ifeq ($(findstring osx,$(ARCH)), osx)
-libs: libhdhomerun libid3tag imagelib libexif python system/libcpluff-$(ARCH).so system/players/paplayer/libmodplug-$(ARCH).so
+libs: libid3tag imagelib libexif python system/libcpluff-$(ARCH).so system/players/paplayer/libmodplug-$(ARCH).so
 else
-libs: libhdhomerun libid3tag imagelib libexif python system/libcpluff-$(ARCH).so
+libs: libid3tag imagelib libexif python system/libcpluff-$(ARCH).so
 endif
 externals: codecs libs python visualizations screensavers
 
--- xbmc-10/xbmc/FileSystem/HDHomeRun.h.orig	2010-01-31 20:58:58.000000000 -0500
+++ xbmc-10/xbmc/FileSystem/HDHomeRun.h	2010-07-19 02:17:38.913394783 -0400
@@ -22,7 +22,7 @@
 
 #include "IDirectory.h"
 #include "DynamicDll.h"
-#include "lib/libhdhomerun/hdhomerun.h"
+#include <hdhomerun/hdhomerun.h>
 #include "FileSystem/IFile.h"
 
 class DllHdHomeRunInterface
@@ -44,31 +44,57 @@
 
 class DllHdHomeRun : public DllDynamic, public DllHdHomeRunInterface
 {
-  DECLARE_DLL_WRAPPER(DllHdHomeRun, DLL_PATH_LIBHDHOMERUN)
-  DEFINE_METHOD5(int, discover_find_devices_custom, (uint32_t p1, uint32_t p2, uint32_t p3, struct hdhomerun_discover_device_t p4[], int p5))
-  DEFINE_METHOD2(struct hdhomerun_device_t*, device_create_from_str, (const char* p1, struct hdhomerun_debug_t *p2))
-  DEFINE_METHOD1(void, device_destroy, (struct hdhomerun_device_t* p1))
-  DEFINE_METHOD1(int, device_stream_start, (struct hdhomerun_device_t* p1))
-  DEFINE_METHOD3(uint8_t*, device_stream_recv, (struct hdhomerun_device_t* p1, unsigned int p2, unsigned int* p3))
-  DEFINE_METHOD1(void, device_stream_stop, (struct hdhomerun_device_t* p1))
-  DEFINE_METHOD2(int, device_set_tuner_channel, (struct hdhomerun_device_t *p1, const char *p2))
-  DEFINE_METHOD2(int, device_set_tuner_program, (struct hdhomerun_device_t *p1, const char *p2))
-  DEFINE_METHOD2(int, device_set_tuner_from_str, (struct hdhomerun_device_t *p1, const char *p2))
-  DEFINE_METHOD2(void, device_set_tuner, (struct hdhomerun_device_t *p1, unsigned int p2))
-  DEFINE_METHOD3(int, device_get_tuner_status, (struct hdhomerun_device_t *p1, char **p2, struct hdhomerun_tuner_status_t *p3));
-  BEGIN_METHOD_RESOLVE()
-    RESOLVE_METHOD_RENAME(hdhomerun_discover_find_devices_custom, discover_find_devices_custom)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_create_from_str, device_create_from_str)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_destroy, device_destroy)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_stream_start, device_stream_start)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_stream_recv, device_stream_recv)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_stream_stop, device_stream_stop)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_channel, device_set_tuner_channel)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_program, device_set_tuner_program)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_from_str, device_set_tuner_from_str)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner, device_set_tuner)
-    RESOLVE_METHOD_RENAME(hdhomerun_device_get_tuner_status, device_get_tuner_status)
-  END_METHOD_RESOLVE()
+public:
+  virtual ~DllHdHomeRun () {};
+
+  virtual int discover_find_devices_custom (uint32_t p1, uint32_t p2, uint32_t p3, struct hdhomerun_discover_device_t p4[], int p5)
+      { return ::hdhomerun_discover_find_devices_custom (p1, p2, p3, p4, p5); }
+
+  virtual struct hdhomerun_device_t *device_create_from_str (const char* p1, struct hdhomerun_debug_t *p2)
+      { return ::hdhomerun_device_create_from_str (p1, p2); }
+
+  virtual void device_destroy (struct hdhomerun_device_t* p1)
+      { ::hdhomerun_device_destroy (p1); }
+
+  virtual int device_stream_start (struct hdhomerun_device_t* p1)
+      { return ::hdhomerun_device_stream_start (p1); }
+
+
+  virtual uint8_t *device_stream_recv (struct hdhomerun_device_t* p1, unsigned int p2, unsigned int* p3)
+      { 
+        uint8_t *retval;
+
+        size_t tmp = *p3;
+        retval = ::hdhomerun_device_stream_recv (p1, p2, &tmp);
+        *p3 = tmp;
+
+        return retval;
+      }
+
+  virtual void device_stream_stop (struct hdhomerun_device_t* p1)
+      { ::hdhomerun_device_stream_stop (p1); }
+
+  virtual int device_set_tuner_channel (struct hdhomerun_device_t *p1, const char *p2)
+      { return ::hdhomerun_device_set_tuner_channel (p1, p2); }
+
+  virtual int device_set_tuner_program (struct hdhomerun_device_t *p1, const char *p2)
+      { return ::hdhomerun_device_set_tuner_program (p1, p2); }
+
+
+  virtual int device_set_tuner_from_str (struct hdhomerun_device_t *p1, const char *p2)
+      { return ::hdhomerun_device_set_tuner_from_str (p1, p2); }
+
+
+  virtual void device_set_tuner (struct hdhomerun_device_t *p1, unsigned int p2)
+      { ::hdhomerun_device_set_tuner (p1, p2); }
+
+  virtual int device_get_tuner_status (struct hdhomerun_device_t *p1, char **p2, struct hdhomerun_tuner_status_t *p3)
+      { return ::hdhomerun_device_get_tuner_status (p1, p2, p3); }
+
+  // DLL faking.
+  virtual bool ResolveExports() { return true; }
+  virtual bool Load() { return true; }
+  virtual void Unload() {}
 };
 
 namespace XFILE

--- xbmc-10/configure.in.orig	2010-07-19 02:11:59.114393341 -0400
+++ xbmc-10/configure.in	2010-07-19 02:12:07.951143138 -0400
@@ -1348,7 +1348,6 @@
     xbmc/lib/libRTV/Makefile \
     xbmc/lib/libexif/Makefile \
     xbmc/lib/libXDAAP/Makefile \
-    xbmc/lib/libhdhomerun/Makefile \
     xbmc/lib/libhttpapi/Makefile \
     lib/jsoncpp/jsoncpp/src/lib_json/Makefile \
     xbmc/lib/libjsonrpc/Makefile \