summaryrefslogtreecommitdiffstats
path: root/abs/extra/kodi-addon-pvr-mythtv-git/p8-platform.patch
blob: 87fb73f9165ab7dd3ebf52c95c6c212ae2a9dbe7 (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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
From 5aaf171deb1e31c7e3df173d109eb114499e5f45 Mon Sep 17 00:00:00 2001
From: "h.udo" <hudokkow@gmail.com>
Date: Wed, 6 Jan 2016 15:08:54 +0000
Subject: [PATCH 1/2] [src] Update to p8-platform

---
 src/categories.cpp                         |  2 +-
 src/cppmyth/MythScheduleHelper75.cpp       |  2 +-
 src/cppmyth/MythScheduleHelperNoHelper.cpp | 10 +++++-----
 src/cppmyth/MythScheduleHelperNoHelper.h   |  2 +-
 src/cppmyth/MythScheduleManager.cpp        |  2 +-
 src/cppmyth/MythScheduleManager.h          |  4 ++--
 src/demux.cpp                              |  4 ++--
 src/demux.h                                | 12 ++++++------
 src/demuxer/tsDemuxer.cpp                  | 26 +++++++++++++-------------
 src/demuxer/tsDemuxer.h                    |  4 ++--
 src/fileOps.cpp                            |  2 +-
 src/fileOps.h                              |  8 ++++----
 src/filestreaming.cpp                      |  2 +-
 src/pvrclient-mythtv.cpp                   |  2 +-
 src/pvrclient-mythtv.h                     |  8 ++++----
 src/tools.h                                |  2 +-
 16 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/src/categories.cpp b/src/categories.cpp
index 1a10f9c..03d1867 100644
--- a/src/categories.cpp
+++ b/src/categories.cpp
@@ -22,7 +22,7 @@
 
 #include "categories.h"
 #include "client.h"
-#include <platform/os.h>
+#include <p8-platform/os.h>
 
 #define CATEGORIES_FILENAME       "eit_categories.txt"
 #define CATEGORIES_MAXLINESIZE    255
diff --git a/src/cppmyth/MythScheduleHelper75.cpp b/src/cppmyth/MythScheduleHelper75.cpp
index 58f0a87..be8beb9 100644
--- a/src/cppmyth/MythScheduleHelper75.cpp
+++ b/src/cppmyth/MythScheduleHelper75.cpp
@@ -34,7 +34,7 @@ using namespace ADDON;
 
 MythTimerTypeList MythScheduleHelper75::GetTimerTypes() const
 {
-  PLATFORM::CLockObject lock(m_lock);
+  P8PLATFORM::CLockObject lock(m_lock);
   if (!m_timerTypeListInit)
   {
     m_timerTypeListInit = true;
diff --git a/src/cppmyth/MythScheduleHelperNoHelper.cpp b/src/cppmyth/MythScheduleHelperNoHelper.cpp
index 26358fc..751b895 100644
--- a/src/cppmyth/MythScheduleHelperNoHelper.cpp
+++ b/src/cppmyth/MythScheduleHelperNoHelper.cpp
@@ -40,7 +40,7 @@ MythScheduleHelperNoHelper::MythScheduleHelperNoHelper()
 
 MythTimerTypeList MythScheduleHelperNoHelper::GetTimerTypes() const
 {
-  PLATFORM::CLockObject lock(m_lock);
+  P8PLATFORM::CLockObject lock(m_lock);
   return m_timerTypeList;
 }
 
@@ -103,7 +103,7 @@ static inline uint32_t expiration_key(const MythScheduleHelperNoHelper::RuleExpi
 
 int MythScheduleHelperNoHelper::GetRuleExpirationId(const RuleExpiration& expiration) const
 {
-  PLATFORM::CLockObject lock(m_lock);
+  P8PLATFORM::CLockObject lock(m_lock);
   if (!m_expirationByKeyInit)
   {
     m_expirationByKeyInit = true;
@@ -119,7 +119,7 @@ int MythScheduleHelperNoHelper::GetRuleExpirationId(const RuleExpiration& expira
 
 MythScheduleHelperNoHelper::RuleExpiration MythScheduleHelperNoHelper::GetRuleExpiration(int id) const
 {
-  PLATFORM::CLockObject lock(m_lock);
+  P8PLATFORM::CLockObject lock(m_lock);
   static RuleExpiration _empty(false, 0, false);
   RuleExpirationMap::const_iterator it = GetRuleExpirationMap().find(id);
   if (it != m_expirationMap.end())
@@ -129,7 +129,7 @@ MythScheduleHelperNoHelper::RuleExpiration MythScheduleHelperNoHelper::GetRuleEx
 
 int MythScheduleHelperNoHelper::GetRuleRecordingGroupId(const std::string& name) const
 {
-  PLATFORM::CLockObject lock(m_lock);
+  P8PLATFORM::CLockObject lock(m_lock);
   if (!m_recGroupByNameInit)
   {
     m_recGroupByNameInit = true;
@@ -145,7 +145,7 @@ int MythScheduleHelperNoHelper::GetRuleRecordingGroupId(const std::string& name)
 
 std::string MythScheduleHelperNoHelper::GetRuleRecordingGroupName(int id) const
 {
-  PLATFORM::CLockObject lock(m_lock);
+  P8PLATFORM::CLockObject lock(m_lock);
   static std::string _empty = "";
   if (!m_recGroupByIdInit)
   {
diff --git a/src/cppmyth/MythScheduleHelperNoHelper.h b/src/cppmyth/MythScheduleHelperNoHelper.h
index 686c770..e3ec012 100644
--- a/src/cppmyth/MythScheduleHelperNoHelper.h
+++ b/src/cppmyth/MythScheduleHelperNoHelper.h
@@ -73,7 +73,7 @@ class MythScheduleHelperNoHelper : public MythScheduleManager::VersionHelper
   virtual const MythTimerType::AttributeList& GetRuleExpirationNameList() const;
   virtual const MythTimerType::AttributeList& GetRuleRecordingGroupList() const;
 
-  mutable PLATFORM::CMutex m_lock;
+  mutable P8PLATFORM::CMutex m_lock;
 
   mutable bool                            m_timerTypeListInit;
   mutable MythTimerTypeList               m_timerTypeList;
diff --git a/src/cppmyth/MythScheduleManager.cpp b/src/cppmyth/MythScheduleManager.cpp
index 3381496..7466ac6 100644
--- a/src/cppmyth/MythScheduleManager.cpp
+++ b/src/cppmyth/MythScheduleManager.cpp
@@ -32,7 +32,7 @@
 #include <math.h>
 
 using namespace ADDON;
-using namespace PLATFORM;
+using namespace P8PLATFORM;
 
 enum
 {
diff --git a/src/cppmyth/MythScheduleManager.h b/src/cppmyth/MythScheduleManager.h
index 00b0b6b..3106c2d 100644
--- a/src/cppmyth/MythScheduleManager.h
+++ b/src/cppmyth/MythScheduleManager.h
@@ -26,7 +26,7 @@
 #include "MythChannel.h"
 
 #include <kodi/xbmc_pvr_types.h>
-#include <platform/threads/mutex.h>
+#include <p8-platform/threads/mutex.h>
 
 #include <vector>
 #include <list>
@@ -209,7 +209,7 @@ class MythScheduleManager
   static uint32_t MakeIndex(const MythRecordingRule& rule);
 
 private:
-  mutable PLATFORM::CMutex m_lock;
+  mutable P8PLATFORM::CMutex m_lock;
   Myth::Control *m_control;
 
   int m_protoVersion;
diff --git a/src/demux.cpp b/src/demux.cpp
index 452f786..98243fb 100644
--- a/src/demux.cpp
+++ b/src/demux.cpp
@@ -20,7 +20,7 @@
  *
  */
 
-#include <platform/os.h>
+#include <p8-platform/os.h>
 #include <kodi/libXBMC_pvr.h>
 #include <kodi/xbmc_codec_types.h>
 
@@ -34,7 +34,7 @@
 #define READAV_TIMEOUT          10000                     // 10 secs
 
 using namespace ADDON;
-using namespace PLATFORM;
+using namespace P8PLATFORM;
 
 void DemuxLog(int level, char *msg)
 {
diff --git a/src/demux.h b/src/demux.h
index f86e27a..b84c1bc 100644
--- a/src/demux.h
+++ b/src/demux.h
@@ -25,9 +25,9 @@
 #include "client.h"
 
 #include <mythstream.h>
-#include <platform/threads/threads.h>
-#include <platform/threads/mutex.h>
-#include <platform/util/buffer.h>
+#include <p8-platform/threads/threads.h>
+#include <p8-platform/threads/mutex.h>
+#include <p8-platform/util/buffer.h>
 #include <kodi/xbmc_stream_utils.hpp>
 
 #include <map>
@@ -35,7 +35,7 @@
 
 #define AV_BUFFER_SIZE          131072
 
-class Demux : public TSDemux::TSDemuxer, PLATFORM::CThread
+class Demux : public TSDemux::TSDemuxer, P8PLATFORM::CThread
 {
 public:
   Demux(Myth::Stream *file);
@@ -56,8 +56,8 @@ class Demux : public TSDemux::TSDemuxer, PLATFORM::CThread
 private:
   Myth::Stream *m_file;
   uint16_t m_channel;
-  PLATFORM::SyncedBuffer<DemuxPacket*> m_demuxPacketBuffer;
-  PLATFORM::CMutex m_mutex;
+  P8PLATFORM::SyncedBuffer<DemuxPacket*> m_demuxPacketBuffer;
+  P8PLATFORM::CMutex m_mutex;
   ADDON::XbmcStreamProperties m_streams;
 
   bool get_stream_data(TSDemux::STREAM_PKT* pkt);
diff --git a/src/demuxer/tsDemuxer.cpp b/src/demuxer/tsDemuxer.cpp
index 00e40c1..fc283a8 100644
--- a/src/demuxer/tsDemuxer.cpp
+++ b/src/demuxer/tsDemuxer.cpp
@@ -56,7 +56,7 @@ AVContext::AVContext(TSDemuxer* const demux, uint64_t pos, uint16_t channel)
 
 void AVContext::Reset(void)
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   pid = 0xffff;
   transport_error = false;
@@ -75,7 +75,7 @@ uint16_t AVContext::GetPID() const
 
 PACKET_TYPE AVContext::GetPIDType() const
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   if (packet)
     return packet->packet_type;
@@ -84,7 +84,7 @@ PACKET_TYPE AVContext::GetPIDType() const
 
 uint16_t AVContext::GetPIDChannel() const
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   if (packet)
     return packet->channel;
@@ -93,7 +93,7 @@ uint16_t AVContext::GetPIDChannel() const
 
 bool AVContext::HasPIDStreamData() const
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   // PES packets append frame buffer of elementary stream until next start of unit
   // On new unit start, flag is held
@@ -109,7 +109,7 @@ bool AVContext::HasPIDPayload() const
 
 ElementaryStream* AVContext::GetPIDStream()
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   if (packet && packet->packet_type == PACKET_TYPE_PES)
     return packet->stream;
@@ -118,7 +118,7 @@ ElementaryStream* AVContext::GetPIDStream()
 
 std::vector<ElementaryStream*> AVContext::GetStreams()
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   std::vector<ElementaryStream*> v;
   for (std::map<uint16_t, Packet>::iterator it = packets.begin(); it != packets.end(); ++it)
@@ -129,7 +129,7 @@ std::vector<ElementaryStream*> AVContext::GetStreams()
 
 void AVContext::StartStreaming(uint16_t pid)
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   std::map<uint16_t, Packet>::iterator it = packets.find(pid);
   if (it != packets.end())
@@ -138,7 +138,7 @@ void AVContext::StartStreaming(uint16_t pid)
 
 void AVContext::StopStreaming(uint16_t pid)
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   std::map<uint16_t, Packet>::iterator it = packets.find(pid);
   if (it != packets.end())
@@ -147,7 +147,7 @@ void AVContext::StopStreaming(uint16_t pid)
 
 ElementaryStream* AVContext::GetStream(uint16_t pid) const
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   std::map<uint16_t, Packet>::const_iterator it = packets.find(pid);
   if (it != packets.end())
@@ -157,7 +157,7 @@ ElementaryStream* AVContext::GetStream(uint16_t pid) const
 
 uint16_t AVContext::GetChannel(uint16_t pid) const
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   std::map<uint16_t, Packet>::const_iterator it = packets.find(pid);
   if (it != packets.end())
@@ -167,7 +167,7 @@ uint16_t AVContext::GetChannel(uint16_t pid) const
 
 void AVContext::ResetPackets()
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   for (std::map<uint16_t, Packet>::iterator it = packets.begin(); it != packets.end(); ++it)
   {
@@ -391,7 +391,7 @@ uint64_t AVContext::GetPosition() const
  */
 int AVContext::ProcessTSPacket()
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   int ret = AVCONTEXT_CONTINUE;
   std::map<uint16_t, Packet>::iterator it;
@@ -516,7 +516,7 @@ int AVContext::ProcessTSPacket()
  */
 int AVContext::ProcessTSPayload()
 {
-  PLATFORM::CLockObject lock(mutex);
+  P8PLATFORM::CLockObject lock(mutex);
 
   if (!this->packet)
     return AVCONTEXT_CONTINUE;
diff --git a/src/demuxer/tsDemuxer.h b/src/demuxer/tsDemuxer.h
index 2efbb58..ebb779e 100644
--- a/src/demuxer/tsDemuxer.h
+++ b/src/demuxer/tsDemuxer.h
@@ -24,7 +24,7 @@
 
 #include "tsPacket.h"
 #include "elementaryStream.h"
-#include <platform/threads/mutex.h>
+#include <p8-platform/threads/mutex.h>
 
 #include <map>
 #include <vector>
@@ -102,7 +102,7 @@ namespace TSDemux
     int parse_ts_pes();
 
     // Critical section
-    mutable PLATFORM::CMutex mutex;
+    mutable P8PLATFORM::CMutex mutex;
 
     // AV stream owner
     TSDemuxer* m_demux;
diff --git a/src/fileOps.cpp b/src/fileOps.cpp
index 80d6462..71a71f9 100644
--- a/src/fileOps.cpp
+++ b/src/fileOps.cpp
@@ -34,7 +34,7 @@
 #define FILEOPS_RECORDING_DUMMY_ICON  "recording.png"
 
 using namespace ADDON;
-using namespace PLATFORM;
+using namespace P8PLATFORM;
 
 FileOps::FileOps(FileConsumer *consumer, const std::string& server, unsigned wsapiport, const std::string& wsapiSecurityPin)
 : CThread()
diff --git a/src/fileOps.h b/src/fileOps.h
index 58081f4..90c023b 100644
--- a/src/fileOps.h
+++ b/src/fileOps.h
@@ -25,7 +25,7 @@
 #include "cppmyth/MythProgramInfo.h"
 
 #include <mythwsapi.h>
-#include <platform/threads/threads.h>
+#include <p8-platform/threads/threads.h>
 
 #include <string>
 #include <vector>
@@ -39,7 +39,7 @@ class FileConsumer
   virtual void HandleCleanedCache() = 0;
 };
 
-class FileOps : public PLATFORM::CThread
+class FileOps : public P8PLATFORM::CThread
 {
 public:
   enum FileType
@@ -152,7 +152,7 @@ class FileOps : public PLATFORM::CThread
     int             m_errorCount;
   };
 
-  PLATFORM::CMutex m_lock;
-  PLATFORM::CEvent m_queueContent;
+  P8PLATFORM::CMutex m_lock;
+  P8PLATFORM::CEvent m_queueContent;
   std::list<FileOps::JobItem> m_jobQueue;
 };
diff --git a/src/filestreaming.cpp b/src/filestreaming.cpp
index d25680e..eeaa672 100644
--- a/src/filestreaming.cpp
+++ b/src/filestreaming.cpp
@@ -22,7 +22,7 @@
 
 #include "filestreaming.h"
 #include "client.h"
-#include <platform/os.h>
+#include <p8-platform/os.h>
 
 #define MAX_READ_SIZE  131072
 
diff --git a/src/pvrclient-mythtv.cpp b/src/pvrclient-mythtv.cpp
index 5901d55..f0ed353 100644
--- a/src/pvrclient-mythtv.cpp
+++ b/src/pvrclient-mythtv.cpp
@@ -31,7 +31,7 @@
 #include <cassert>
 
 using namespace ADDON;
-using namespace PLATFORM;
+using namespace P8PLATFORM;
 
 PVRClientMythTV::PVRClientMythTV()
 : m_connectionError(CONN_ERROR_NO_ERROR)
diff --git a/src/pvrclient-mythtv.h b/src/pvrclient-mythtv.h
index e9efc64..561fee3 100644
--- a/src/pvrclient-mythtv.h
+++ b/src/pvrclient-mythtv.h
@@ -28,7 +28,7 @@
 #include "filestreaming.h"
 
 #include <kodi/xbmc_pvr_types.h>
-#include <platform/threads/mutex.h>
+#include <p8-platform/threads/mutex.h>
 #include <mythsharedptr.h>
 #include <mythcontrol.h>
 #include <mytheventhandler.h>
@@ -162,7 +162,7 @@ class PVRClientMythTV : public Myth::EventSubscriber, FileConsumer
   // Backend
   FileOps *m_fileOps;
   MythScheduleManager *m_scheduleManager;
-  PLATFORM::CMutex m_lock;
+  P8PLATFORM::CMutex m_lock;
 
   // Categories
   Categories m_categories;
@@ -182,7 +182,7 @@ class PVRClientMythTV : public Myth::EventSubscriber, FileConsumer
   PVRChannelGroupMap m_PVRChannelGroups;
   typedef std::map<unsigned int, unsigned int> PVRChannelMap;
   PVRChannelMap m_PVRChannelUidById;
-  mutable PLATFORM::CMutex m_channelsLock;
+  mutable P8PLATFORM::CMutex m_channelsLock;
   int FillChannelsAndChannelGroups();
   MythChannel FindChannel(uint32_t channelId) const;
   int FindPVRChannelUid(uint32_t channelId) const;
@@ -192,7 +192,7 @@ class PVRClientMythTV : public Myth::EventSubscriber, FileConsumer
 
   // Recordings
   ProgramInfoMap m_recordings;
-  mutable PLATFORM::CMutex m_recordingsLock;
+  mutable P8PLATFORM::CMutex m_recordingsLock;
   unsigned m_recordingChangePinCount;
   bool m_recordingsAmountChange;
   int m_recordingsAmount;
diff --git a/src/tools.h b/src/tools.h
index 45666bf..7ad3af9 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -21,7 +21,7 @@
  *
  */
 
-#include <platform/os.h>
+#include <p8-platform/os.h>
 #include <math.h>
 
 #ifdef __WINDOWS__

From 960830c023c74b54883ed558763275877088be90 Mon Sep 17 00:00:00 2001
From: "h.udo" <hudokkow@gmail.com>
Date: Wed, 6 Jan 2016 15:21:40 +0000
Subject: [PATCH 2/2] [cmake] Update to p8-platform

---
 CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 79d1b98..95fdbbb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,10 +9,10 @@ enable_language(C)
 
 find_package(kodi REQUIRED)
 find_package(kodiplatform REQUIRED)
-find_package(platform REQUIRED)
+find_package(p8-platform REQUIRED)
 
 include_directories(${kodiplatform_INCLUDE_DIRS}
-                    ${platform_INCLUDE_DIRS}
+                    ${p8-platform_INCLUDE_DIRS}
                     ${KODI_INCLUDE_DIR}
                     ${PROJECT_SOURCE_DIR}/lib/cppmyth/src)
 
@@ -54,7 +54,7 @@ set(MYTHTV_SOURCES src/avinfo.cpp
 
 add_subdirectory(lib/cppmyth)
 
-set(DEPLIBS ${platform_LIBRARIES} cppmyth)
+set(DEPLIBS ${p8-platform_LIBRARIES} cppmyth)
 if(WIN32)
   list(APPEND DEPLIBS ws2_32)
 else()