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
|
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/APICommonCode/QTAccessFile.cpp DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTAccessFile.cpp
--- DarwinStreamingSrvr6.0.3-Source.orig/APICommonCode/QTAccessFile.cpp 2008-05-06 01:28:57.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTAccessFile.cpp 2008-05-24 03:23:13.000000000 +0200
@@ -46,7 +46,9 @@
#include <grp.h>
+#ifdef __MacOSX__
#include <membership.h>
+#endif
#include <pwd.h>
#include <signal.h>
#include <unistd.h>
@@ -613,6 +615,7 @@
bool DSAccessFile::CheckGroupMembership(const char* inUsername, const char* inGroupName)
{
+#ifdef __MacOSX__
// In Tiger, group membership is painfully simple: we ask memberd for it!
struct passwd *user = NULL;
struct group *group = NULL;
@@ -641,6 +644,9 @@
if ( mbr_check_membership(userID, groupID, &isMember) )
return false;
return (bool)isMember;
+#else
+ return true;
+#endif
}
Bool16 DSAccessFile::ValidUser( char*userName, void* extraDataPtr)
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSHeaders.h DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h
--- DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSHeaders.h 2008-05-06 01:28:59.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h 2008-05-24 02:05:15.000000000 +0200
@@ -120,7 +120,6 @@
#elif __linux__ || __linuxppc__ || __FreeBSD__
-
/* Defines */
#define _64BITARG_ "q"
#define _S64BITARG_ "lld"
@@ -128,9 +127,13 @@
#if __LP64__
#define _S32BITARG_ "d"
#define _U32BITARG_ "u"
+ #define _SPOINTERSIZEARG_ _S64BITARG_
+ #define _UPOINTERSIZEARG_ _U64BITARG_
#else
- #define _S32BITARG_ "ld"
- #define _U32BITARG_ "lu"
+ #define _S32BITARG_ "d"
+ #define _U32BITARG_ "u"
+ #define _SPOINTERSIZEARG_ _S32BITARG_
+ #define _UPOINTERSIZEARG_ _U32BITARG_
#endif
/* paths */
@@ -141,6 +144,7 @@
/* Includes */
#include <sys/types.h>
+ #include <stdint.h>
/* Constants */
#define QT_TIME_TO_LOCAL_TIME (-2082844800)
@@ -149,14 +153,14 @@
/* Typedefs */
typedef signed long PointerSizedInt;
typedef unsigned long PointerSizedUInt;
- typedef unsigned char UInt8;
- typedef signed char SInt8;
- typedef unsigned short UInt16;
- typedef signed short SInt16;
- typedef unsigned int UInt32;
- typedef signed int SInt32;
- typedef signed int int SInt64;
- typedef unsigned int int UInt64;
+ typedef uint8_t UInt8;
+ typedef int8_t SInt8;
+ typedef uint16_t UInt16;
+ typedef int16_t SInt16;
+ typedef uint32_t UInt32;
+ typedef int32_t SInt32;
+ typedef int64_t SInt64;
+ typedef uint64_t UInt64;
typedef float Float32;
typedef double Float64;
typedef UInt16 Bool16;
@@ -177,11 +181,14 @@
#define TW0_CHARS_TO_INT( c1, c2 ) ( c1 << 8 | c2 )
+ #define kSInt16_Max USHRT_MAX
+ #define kUInt16_Max USHRT_MAX
+ #define kSInt32_Max LONG_MAX
+ #define kUInt32_Max ULONG_MAX
-
-
-
+ #define kSInt64_Max LONG_LONG_MAX
+ #define kUInt64_Max ULONG_LONG_MAX
#elif __Win32__
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSRef.h DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSRef.h
--- DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSRef.h 2008-05-06 01:28:59.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSRef.h 2008-05-23 22:28:51.000000000 +0200
@@ -45,6 +45,7 @@
#include "StrPtrLen.h"
#include "OSHashTable.h"
#include "OSCond.h"
+#include "OSHeaders.h"
class OSRefKey;
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX
--- DarwinStreamingSrvr6.0.3-Source.orig/Makefile.POSIX 2007-11-16 06:17:59.000000000 +0100
+++ DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX 2008-05-24 07:19:34.000000000 +0200
@@ -42,7 +42,6 @@
CCFLAGS += -IRTPMetaInfoLib
CCFLAGS += -IPrefsSourceLib
CCFLAGS += -IServer.tproj
-
# EACH DIRECTORY WITH A STATIC LIBRARY MUST BE APPENDED IN THIS MANNER TO THE LINKOPTS
LINKOPTS = -LCommonUtilitiesLib
@@ -52,38 +51,42 @@
CFILES = CommonUtilitiesLib/daemon.c
-CPPFILES = Server.tproj/QTSSExpirationDate.cpp\
+CPPFILES = Server.tproj/GenerateXMLPrefs.cpp \
+ Server.tproj/main.cpp \
Server.tproj/QTSSCallbacks.cpp \
- Server.tproj/QTSSDictionary.cpp\
Server.tproj/QTSSDataConverter.cpp \
+ Server.tproj/QTSSDictionary.cpp \
Server.tproj/QTSSErrorLogModule.cpp \
- Server.tproj/QTSSMessages.cpp\
+ Server.tproj/QTSServer.cpp \
+ Server.tproj/QTSServerInterface.cpp \
+ Server.tproj/QTSServerPrefs.cpp \
+ Server.tproj/QTSSExpirationDate.cpp \
+ Server.tproj/QTSSFile.cpp \
+ Server.tproj/QTSSMessages.cpp \
Server.tproj/QTSSModule.cpp \
- Server.tproj/QTSServerPrefs.cpp\
- Server.tproj/QTSSSocket.cpp\
- Server.tproj/QTSSFile.cpp\
Server.tproj/QTSSPrefs.cpp \
- Server.tproj/QTSServer.cpp\
- Server.tproj/QTSServerInterface.cpp \
- Server.tproj/RTCPTask.cpp\
- Server.tproj/RTPSession.cpp \
- Server.tproj/RTPPacketResender.cpp \
+ Server.tproj/QTSSSocket.cpp \
+ Server.tproj/QTSSUserProfile.cpp \
+ Server.tproj/RTCPTask.cpp \
Server.tproj/RTPBandwidthTracker.cpp \
Server.tproj/RTPOverbufferWindow.cpp \
- Server.tproj/RTPSessionInterface.cpp\
+ Server.tproj/RTPPacketResender.cpp \
+ Server.tproj/RTPSession3GPP.cpp \
+ Server.tproj/RTPSession.cpp \
+ Server.tproj/RTPSessionInterface.cpp \
+ Server.tproj/RTPStream3gpp.cpp \
Server.tproj/RTPStream.cpp \
- Server.tproj/RTSPProtocol.cpp\
+ Server.tproj/RTSPProtocol.cpp \
+ Server.tproj/RTSPRequest3GPP.cpp \
Server.tproj/RTSPRequest.cpp \
- Server.tproj/RTSPRequestInterface.cpp\
+ Server.tproj/RTSPRequestInterface.cpp \
Server.tproj/RTSPRequestStream.cpp \
- Server.tproj/RTSPResponseStream.cpp\
+ Server.tproj/RTSPResponseStream.cpp \
+ Server.tproj/RTSPSession3GPP.cpp \
Server.tproj/RTSPSession.cpp \
- Server.tproj/RTSPSessionInterface.cpp\
- Server.tproj/main.cpp \
+ Server.tproj/RTSPSessionInterface.cpp \
Server.tproj/RunServer.cpp \
- Server.tproj/GenerateXMLPrefs.cpp \
- Server.tproj/QTSSUserProfile.cpp\
- PrefsSourceLib/FilePrefsSource.cpp\
+ PrefsSourceLib/FilePrefsSource.cpp \
PrefsSourceLib/XMLPrefsParser.cpp \
PrefsSourceLib/XMLParser.cpp \
OSMemoryLib/OSMemory.cpp \
@@ -91,17 +94,20 @@
RTSPClientLib/ClientSocket.cpp \
HTTPUtilitiesLib/HTTPProtocol.cpp \
HTTPUtilitiesLib/HTTPRequest.cpp \
- RTCPUtilitiesLib/RTCPAPPPacket.cpp\
+ RTCPUtilitiesLib/RTCPAckPacket.cpp \
+ RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \
+ RTCPUtilitiesLib/RTCPAPPPacket.cpp \
+ RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \
RTCPUtilitiesLib/RTCPPacket.cpp \
- RTCPUtilitiesLib/RTCPSRPacket.cpp\
- RTCPUtilitiesLib/RTCPAckPacket.cpp\
- RTPMetaInfoLib/RTPMetaInfoPacket.cpp\
+ RTCPUtilitiesLib/RTCPSRPacket.cpp \
+ RTPMetaInfoLib/RTPMetaInfoPacket.cpp \
APIStubLib/QTSS_Private.cpp \
APICommonCode/QTSSModuleUtils.cpp\
APICommonCode/QTSSRollingLog.cpp \
APICommonCode/SDPSourceInfo.cpp \
APICommonCode/SourceInfo.cpp \
APICommonCode/QTAccessFile.cpp \
+ APICommonCode/QTSS3GPPModuleUtils.cpp \
SafeStdLib/InternalStdLib.cpp \
APIModules/QTSSAccessLogModule/QTSSAccessLogModule.cpp \
APIModules/QTSSFileModule/QTSSFileModule.cpp \
@@ -129,7 +135,7 @@
APIModules/QTSSAccessModule/QTSSAccessModule.cpp \
APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp \
APIModules/QTSSAccessModule/AccessChecker.cpp
-
+
# CCFLAGS += $(foreach dir,$(HDRS),-I$(dir))
LIBFILES = QTFileLib/libQTFileLib.a \
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/RTSPClientLib/PlayerSimulator.h DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/PlayerSimulator.h
--- DarwinStreamingSrvr6.0.3-Source.orig/RTSPClientLib/PlayerSimulator.h 2008-05-06 01:29:00.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/PlayerSimulator.h 2008-05-24 02:08:45.000000000 +0200
@@ -31,7 +31,7 @@
#ifndef _PLAYERSIMULATOR_H_
#define _PLAYERSIMULATOR_H_
-#include "SafeStdLib.h""
+#include "SafeStdLib.h"
#include "OSHeaders.h"
#include "OS.h"
#include "SVector.h"
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSSErrorLogModule.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSSErrorLogModule.cpp
--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSSErrorLogModule.cpp 2008-05-06 01:28:59.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSSErrorLogModule.cpp 2008-05-24 02:58:48.000000000 +0200
@@ -265,7 +265,11 @@
sDupErrorStringCount = 0;
}
- ::strlcpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString));
+#if __MacOSX__
+ strlcpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString));
+#else
+ strncpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString) -1);
+#endif
}
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSServer.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServer.cpp
--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSServer.cpp 2008-05-06 01:28:59.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServer.cpp 2008-05-24 07:24:39.000000000 +0200
@@ -70,7 +70,9 @@
#include "QTSSAdminModule.h"
#include "QTSSAccessModule.h"
#include "QTSSMP3StreamingModule.h"
+#if __MacOSX__
#include "QTSSDSAuthModule.h"
+#endif
#if MEMORY_DEBUGGING
#include "QTSSWebDebugModule.h"
#endif
@@ -85,7 +87,7 @@
#include "RTCPTask.h"
#include "QTSSFile.h"
-#include "RTPStream3GPP.h"
+#include "RTPStream3gpp.h"
#include "RTSPRequest3GPP.h"
// CLASS DEFINITIONS
@@ -680,9 +682,11 @@
(void)AddModule(theWebDebug);
#endif
+#if __MacOSX__
QTSSModule* theQTSSDSAuthModule = new QTSSModule("QTSSDSAuthModule");
(void)theQTSSDSAuthModule->SetupModule(&sCallbacks, &QTSSDSAuthModule_Main);
(void)AddModule(theQTSSDSAuthModule);
+#endif
QTSSModule* theQTACCESSmodule = new QTSSModule("QTSSAccessModule");
(void)theQTACCESSmodule->SetupModule(&sCallbacks, &QTSSAccessModule_Main);
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPSession.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPSession.cpp
--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPSession.cpp 2008-05-06 01:28:59.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPSession.cpp 2008-05-24 02:39:34.000000000 +0200
@@ -38,7 +38,7 @@
#include "RTSPProtocol.h"
#include "QTSServerInterface.h"
#include "QTSS.h"
-#include "RTSPRequest3gpp.h"
+#include "RTSPRequest3GPP.h"
#include "OS.h"
#include "OSMemory.h"
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream3gpp.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream3gpp.cpp
--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream3gpp.cpp 2008-05-06 01:28:59.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream3gpp.cpp 2008-05-24 02:48:52.000000000 +0200
@@ -34,7 +34,7 @@
#include "RTPStream.h"
#include "RTPStream3gpp.h"
#include "RTPSessionInterface.h"
-#include "RTSPRequest3gpp.h"
+#include "RTSPRequest3GPP.h"
#include "RTCPAPPNADUPacket.h"
#if DEBUG
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream.h DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.h
--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream.h 2008-05-06 01:28:59.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.h 2008-05-24 02:36:24.000000000 +0200
@@ -57,7 +57,7 @@
#include "RTCPPacket.h"
-#include "RTSPRequest3gpp.h"
+#include "RTSPRequest3GPP.h"
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTSPRequest3GPP.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequest3GPP.cpp
--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTSPRequest3GPP.cpp 2008-05-06 01:28:59.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequest3GPP.cpp 2008-05-24 02:49:26.000000000 +0200
@@ -32,7 +32,7 @@
*/
-#include "RTSPRequest3gpp.h"
+#include "RTSPRequest3GPP.h"
#include "RTSPProtocol.h"
#include "QTSServerInterface.h"
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX
--- DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/Makefile.POSIX 2007-11-16 06:17:36.000000000 +0100
+++ DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX 2008-05-24 02:32:03.000000000 +0200
@@ -17,6 +17,7 @@
CCFLAGS += -I..
CCFLAGS += -I../OSMemoryLib
CCFLAGS += -I../RTSPClientLib
+CCFLAGS += -I../RTCPUtilitiesLib
CCFLAGS += -I../APICommonCode
CCFLAGS += -I../CommonUtilitiesLib
CCFLAGS += -I../PrefsSourceLib
@@ -36,6 +37,12 @@
../RTSPClientLib/ClientSocket.cpp \
../RTSPClientLib/RTSPClient.cpp \
../RTSPClientLib/ClientSession.cpp \
+ ../RTCPUtilitiesLib/RTCPAckPacket.cpp \
+ ../RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \
+ ../RTCPUtilitiesLib/RTCPAPPPacket.cpp \
+ ../RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \
+ ../RTCPUtilitiesLib/RTCPPacket.cpp \
+ ../RTCPUtilitiesLib/RTCPSRPacket.cpp \
../PrefsSourceLib/FilePrefsSource.cpp \
../APICommonCode/SDPSourceInfo.cpp \
../APICommonCode/SourceInfo.cpp \
diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/StreamingLoadTool.cpp DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp
--- DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/StreamingLoadTool.cpp 2008-05-06 01:28:57.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp 2008-05-24 02:22:13.000000000 +0200
@@ -743,7 +743,7 @@
bitsReceived += .5;
- printf("%5lu %6lu %8lu %6lu %6lu %6lu %9.0fk\n",
+ printf("%5"_U32BITARG_" %6"_U32BITARG_" %8"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %9.0fk\n",
ClientSession:: GetActiveConnections (),
ClientSession:: GetPlayingConnections (),
ClientSession:: GetConnectionAttempts (),
@@ -811,7 +811,7 @@
if (sLog != NULL)
::fclose(sLog);
- printf("%5lu %6lu %8lu %6lu %6lu %6lu %9.0fk\n",
+ printf("%5"_U32BITARG_" %6"_U32BITARG_" %8"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %9.0fk\n",
ClientSession:: GetActiveConnections (),
ClientSession:: GetPlayingConnections (),
ClientSession:: GetConnectionAttempts (),
|