packages: dss/dss.spec, dss/dss-x86_64.patch (NEW), dss/dss.patch (NEW) - b...

glen glen at pld-linux.org
Sun Aug 1 14:59:27 CEST 2010


Author: glen                         Date: Sun Aug  1 12:59:26 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- build fixes from mailinglist

---- Files affected:
packages/dss:
   dss.spec (1.1 -> 1.2) , dss-x86_64.patch (NONE -> 1.1)  (NEW), dss.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/dss/dss.spec
diff -u packages/dss/dss.spec:1.1 packages/dss/dss.spec:1.2
--- packages/dss/dss.spec:1.1	Sun Aug  1 14:56:41 2010
+++ packages/dss/dss.spec	Sun Aug  1 14:59:21 2010
@@ -7,6 +7,8 @@
 Group:		Applications
 Source0:	http://dss.macosforge.org/downloads/DarwinStreamingSrvr%{version}-Source.tar
 # Source0-md5:	ca676691db8417d05121699c0ca3d549
+Patch0:		%{name}.patch
+Patch1:		%{name}-x86_64.patch
 URL:		http://dss.macosforge.org/
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -97,6 +99,8 @@
 
 %prep
 %setup -q -n DarwinStreamingSrvr%{version}-Source
+%patch0 -p1
+%patch1 -p1
 
 # patch streamingadminserver.pl
 %{__sed} -i -e  "s|/usr/local/|/usr/|g" WebAdmin/src/streamingadminserver.pl
@@ -152,5 +156,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2010/08/01 12:59:21  glen
+- build fixes from mailinglist
+
 Revision 1.1  2010/08/01 12:56:41  glen
 - new, based on http://www.abrahamsson.com/DarwinStreamingServer-6.0.3-2.src.rpm

================================================================
Index: packages/dss/dss-x86_64.patch
diff -u /dev/null packages/dss/dss-x86_64.patch:1.1
--- /dev/null	Sun Aug  1 14:59:27 2010
+++ packages/dss/dss-x86_64.patch	Sun Aug  1 14:59:21 2010
@@ -0,0 +1,4051 @@
+http://lists.apple.com/archives/streaming-server-dev/2008/May/msg00050.html
+http://www.abrahamsson.com/dss-6.0.3-x86_64.patch
+
+diff -ur DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTSSModuleUtils.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APICommonCode/QTSSModuleUtils.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTSSModuleUtils.cpp	2008-05-06 01:28:57.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APICommonCode/QTSSModuleUtils.cpp	2008-05-30 23:30:13.000000000 +0200
+@@ -29,6 +29,7 @@
+                     
+ */
+ 
++#include <byteswap.h>
+ #include "QTSSModuleUtils.h"
+ #include "QTSS_Private.h"
+ 
+@@ -282,7 +283,7 @@
+         RTPMetaInfoPacket::FieldName* theFieldName = (RTPMetaInfoPacket::FieldName*)theHeader.Ptr;
+         ::memcpy (&fieldNameValue, theFieldName, sizeof(UInt16));
+ 
+-        RTPMetaInfoPacket::FieldIndex theFieldIndex = RTPMetaInfoPacket::GetFieldIndexForName(ntohs(fieldNameValue));
++        RTPMetaInfoPacket::FieldIndex theFieldIndex = RTPMetaInfoPacket::GetFieldIndexForName(bswap_16(fieldNameValue));
+         
+         //
+         // This field is not supported (not in the field ID array), so
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSAdminModule/AdminElementNode.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSAdminModule/AdminElementNode.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSAdminModule/AdminElementNode.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSAdminModule/AdminElementNode.cpp	2008-05-30 23:06:56.000000000 +0200
+@@ -934,7 +934,7 @@
+         fFieldOSRefPtrs[index] = NEW OSRef(); Assert(fFieldOSRefPtrs[index] != NULL); ElementNode_InsertPtr(fFieldOSRefPtrs[index],"ElementNode::GetOSRef NEW OSRef() fFieldOSRefPtrs ");   
+         GetNameSPL(index,&theName); Assert(theName.Len != 0);
+         //qtss_printf("ElementNode::GetOSRef index = %"_S32BITARG_" name = %s \n", index, theName.Ptr);
+-        fFieldOSRefPtrs[index]->Set(theName,(void *) index);
++        fFieldOSRefPtrs[index]->Set(theName,(void *)intptr_t(index));
+         if (0 != theName.Len && NULL != theName.Ptr) //return the ptr else NULL
+             resultPtr = fFieldOSRefPtrs[index];
+     }
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSFileModule/QTSSFileModule.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSFileModule/QTSSFileModule.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSFileModule/QTSSFileModule.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSFileModule/QTSSFileModule.cpp	2008-05-30 23:30:28.000000000 +0200
+@@ -31,6 +31,7 @@
+ 
+ */
+ 
++#include <byteswap.h>
+ #include <string.h>
+ 
+ #include "QTSSFileModule.h"
+@@ -190,7 +191,7 @@
+ 
+ inline UInt16 GetPacketSequenceNumber(void * packetDataPtr)
+ {
+-    return ntohs( ((UInt16*)packetDataPtr)[1]);
++    return bswap_16( ((UInt16*)packetDataPtr)[1]);
+ }
+ 
+ inline UInt16 GetLastPacketSeqNum(QTSS_Object stream)
+@@ -218,18 +219,18 @@
+ 
+ inline void SetPacketSequenceNumber(UInt16 newSequenceNumber, void * packetDataPtr)
+ {
+-    ((UInt16*)packetDataPtr)[1] = htons(newSequenceNumber);
++    ((UInt16*)packetDataPtr)[1] = bswap_16(newSequenceNumber);
+ }
+ 
+ 
+ inline UInt32 GetPacketTimeStamp(void * packetDataPtr)
+ {
+-    return ntohl( ((UInt32*)packetDataPtr)[1]);
++    return bswap_32( ((UInt32*)packetDataPtr)[1]);
+ }
+ 
+ inline void SetPacketTimeStamp(UInt32 newTimeStamp, void * packetDataPtr)
+ {
+-    ((UInt32*)packetDataPtr)[1] = htonl(newTimeStamp);
++    ((UInt32*)packetDataPtr)[1] = bswap_32(newTimeStamp);
+ }
+ 
+ inline UInt32 CalculatePauseTimeStamp(UInt32 timescale, SInt64 totalPauseTime, UInt32 currentTimeStamp)
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp	2008-05-30 23:31:23.000000000 +0200
+@@ -30,6 +30,7 @@
+ 
+ 
+ #ifndef __Win32__
++#include <byteswap.h>
+ #include <unistd.h>
+ #include <dirent.h>
+ #endif
+@@ -1068,7 +1069,7 @@
+        if( rmra == NULL )
+          return NULL;
+ 
+-       rmraLen = htonl(rmraLen);
++       rmraLen = bswap_32(rmraLen);
+ 
+        ::memcpy(&rmra[0], &rmraLen, 4);
+        ::memcpy(&rmra[1], "rmra", 4);
+@@ -1076,20 +1077,20 @@
+ 
+        // Make the MOOV
+ 
+-       *moovLen = ntohl(rmraLen) + 8;
++       *moovLen = bswap_32(rmraLen) + 8;
+        moov = NEW UInt32[*moovLen];
+        if( moov == NULL )
+          return NULL;
+ 
+-       *moovLen = htonl(*moovLen);
++       *moovLen = bswap_32(*moovLen);
+ 
+        ::memcpy(&moov[0], moovLen, 4);
+        ::memcpy(&moov[1], "moov", 4);
+-       ::memcpy((char *)moov + 8, rmra, ntohl(rmraLen));
++       ::memcpy((char *)moov + 8, rmra, bswap_32(rmraLen));
+ 
+        delete rmra;
+ 
+-       *moovLen = ntohl(*moovLen);
++       *moovLen = bswap_32(*moovLen);
+ 
+        // moov needs to be deleted by the calling function
+        return moov;
+@@ -1099,8 +1100,8 @@
+ {
+       UInt32 *rdrf, rdrfLen, *rmdr, rmdrLen, *rmda, zero, size;
+ 
+-      zero = htonl(0); // Okay, this is silly ???
+-      rate = htonl(rate);
++      zero = bswap_32(0); // Okay, this is silly ???
++      rate = bswap_32(rate);
+ 
+       // Make the RDRF
+       size = ::strlen(url) + 1;
+@@ -1109,8 +1110,8 @@
+       if( rdrf == NULL )
+          return NULL;
+ 
+-      rdrfLen = htonl(rdrfLen);
+-      size = htonl(size);
++      rdrfLen = bswap_32(rdrfLen);
++      size = bswap_32(size);
+ 
+       ::memcpy(&rdrf[0], &rdrfLen, 4);
+       ::memcpy(&rdrf[1], "rdrf", 4);
+@@ -1125,7 +1126,7 @@
+       if( rmdr == NULL )
+          return NULL;
+ 
+-      rmdrLen = htonl(rmdrLen);
++      rmdrLen = bswap_32(rmdrLen);
+       
+       ::memcpy(&rmdr[0], &rmdrLen, 4);
+       ::memcpy(&rmdr[1], "rmdr", 4);
+@@ -1134,22 +1135,22 @@
+ 
+       // Make the RMDA
+ 
+-      *rmdaLen = ntohl(rdrfLen) + ntohl(rmdrLen) + 8;
++      *rmdaLen = bswap_32(rdrfLen) + bswap_32(rmdrLen) + 8;
+       rmda = NEW UInt32[*rmdaLen];
+       if( rmda == NULL )
+          return NULL;
+ 
+-      *rmdaLen = htonl(*rmdaLen);
++      *rmdaLen = bswap_32(*rmdaLen);
+ 
+       ::memcpy(&rmda[0], rmdaLen, 4);
+       ::memcpy(&rmda[1], "rmda", 4);
+-      ::memcpy((char *)rmda + 8, rmdr, ntohl(rmdrLen));
+-      ::memcpy((char *)rmda + 8 + ntohl(rmdrLen), rdrf, ntohl(rdrfLen));
++      ::memcpy((char *)rmda + 8, rmdr, bswap_32(rmdrLen));
++      ::memcpy((char *)rmda + 8 + bswap_32(rmdrLen), rdrf, bswap_32(rdrfLen));
+ 
+       delete rdrf;
+       delete rmdr;
+ 
+-      *rmdaLen = ntohl(*rmdaLen);
++      *rmdaLen = bswap_32(*rmdaLen);
+ 
+       // rmda needs to be deleted by the calling function
+       return rmda;
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSProxyModule/QTSSProxyModule.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSProxyModule/QTSSProxyModule.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSProxyModule/QTSSProxyModule.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSProxyModule/QTSSProxyModule.cpp	2008-05-30 23:31:46.000000000 +0200
+@@ -36,6 +36,7 @@
+ #ifndef __Win32__
+ //
+ // For gethostbyname
++#include <byteswap.h>
+ #include <netdb.h>
+ #endif
+ 
+@@ -357,7 +358,7 @@
+         
+         UInt32 theIPAddr = 0;
+         if (theHostent != NULL)
+-            theIPAddr = ntohl(*(UInt32*)(theHostent->h_addr_list[0]));
++            theIPAddr = bswap_32(*(UInt32*)(theHostent->h_addr_list[0]));
+         else
+             theIPAddr = SocketUtils::ConvertStringToAddr(theDNSName);
+             
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/QTSSReflectorModule.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/QTSSReflectorModule.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/QTSSReflectorModule.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/QTSSReflectorModule.cpp	2008-05-30 23:32:02.000000000 +0200
+@@ -31,6 +31,7 @@
+     
+ */
+ 
++#include <byteswap.h>
+ #include "QTSSReflectorModule.h"
+ #include "QTSSModuleUtils.h"
+ #include "ReflectorSession.h"
+@@ -654,7 +655,7 @@
+ 
+     UInt16  packetDataLen;
+     memcpy(&packetDataLen,&packetData[2],2);
+-    packetDataLen = ntohs(packetDataLen);
++    packetDataLen = bswap_16(packetDataLen);
+     
+     char*   rtpPacket = &packetData[4];
+     
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorSession.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorSession.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorSession.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorSession.cpp	2008-05-30 23:32:26.000000000 +0200
+@@ -32,6 +32,7 @@
+ */
+ 
+ 
++#include <byteswap.h>
+ #include "ReflectorSession.h"
+ #include "RTCPPacket.h"
+ #include "SocketUtils.h"
+@@ -283,7 +284,7 @@
+         char theIPAddrBuf[20];
+         StrPtrLen theIPAddr(theIPAddrBuf, 20);
+         struct in_addr theAddr;
+-        theAddr.s_addr = htonl(fSourceInfo->GetStreamInfo(0)->fSrcIPAddr);
++        theAddr.s_addr = bswap_32(fSourceInfo->GetStreamInfo(0)->fSrcIPAddr);
+         SocketUtils::ConvertAddrToString(theAddr, &theIPAddr);
+         fFormatter.Put(theIPAddr);
+     }
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorStream.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorStream.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorStream.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorStream.cpp	2008-05-30 23:32:33.000000000 +0200
+@@ -31,6 +31,7 @@
+ 
+ */
+ 
++#include <byteswap.h>
+ #include "ReflectorStream.h"
+ #include "QTSSModuleUtils.h"
+ #include "OSMemory.h"
+@@ -162,31 +163,31 @@
+     
+     //write the RR (just header + ssrc)
+     UInt32* theRRWriter = (UInt32*)&fReceiverReportBuffer[0];
+-    *theRRWriter = htonl(0x80c90001);
++    *theRRWriter = bswap_32(0x80c90001);
+     theRRWriter++;
+-    *theRRWriter = htonl(theSsrc);
++    *theRRWriter = bswap_32(theSsrc);
+     theRRWriter++;
+ 
+     //SDES length is the length of the CName, plus 2 32bit words, minus 1
+-    *theRRWriter = htonl(0x81ca0000 + (cNameLen >> 2) + 1);
++    *theRRWriter = bswap_32(0x81ca0000 + (cNameLen >> 2) + 1);
+     theRRWriter++;
+-    *theRRWriter = htonl(theSsrc);
++    *theRRWriter = bswap_32(theSsrc);
+     theRRWriter++;
+     ::memcpy(theRRWriter, theTempCName, cNameLen);
+     theRRWriter += cNameLen >> 2;
+     
+     //APP packet format, QTSS specific stuff
+-    *theRRWriter = htonl(0x80cc0008);
++    *theRRWriter = bswap_32(0x80cc0008);
+     theRRWriter++;
+-    *theRRWriter = htonl(theSsrc);
++    *theRRWriter = bswap_32(theSsrc);
+     theRRWriter++;
+-    *theRRWriter = htonl(FOUR_CHARS_TO_INT('Q','T','S','S'));
++    *theRRWriter = bswap_32(FOUR_CHARS_TO_INT('Q','T','S','S'));
+     theRRWriter++;
+-    *theRRWriter = htonl(0);
++    *theRRWriter = bswap_32(0);
+     theRRWriter++;
+-    *theRRWriter = htonl(0x00000004);
++    *theRRWriter = bswap_32(0x00000004);
+     theRRWriter++;
+-    *theRRWriter = htonl(0x6579000c);
++    *theRRWriter = bswap_32(0x6579000c);
+     theRRWriter++;
+     
+     fEyeLocation = theRRWriter;
+@@ -474,11 +475,11 @@
+     
+     UInt32 theEyeCount = this->GetEyeCount();    
+     UInt32* theEyeWriter = fEyeLocation;
+-    *theEyeWriter = htonl(theEyeCount) & 0x7fffffff;//no idea why we do this!
++    *theEyeWriter = bswap_32(theEyeCount) & 0x7fffffff;//no idea why we do this!
+     theEyeWriter++;
+-    *theEyeWriter = htonl(theEyeCount) & 0x7fffffff;
++    *theEyeWriter = bswap_32(theEyeCount) & 0x7fffffff;
+     theEyeWriter++;
+-    *theEyeWriter = htonl(0) & 0x7fffffff;
++    *theEyeWriter = bswap_32(0) & 0x7fffffff;
+     
+     //send the packet to the multicast RTCP addr & port for this stream
+     (void)fSockets->GetSocketB()->SendTo(fDestRTCPAddr, fDestRTCPPort, fReceiverReportBuffer, fReceiverReportSize);
+@@ -707,7 +708,7 @@
+     
+     //The RTP seq number is the second short of the packet
+     UInt16* seqNumPtr = (UInt16*)inPacket->Ptr;
+-    return ntohs(seqNumPtr[1]);
++    return bswap_16(seqNumPtr[1]);
+ }
+ 
+ 
+@@ -1460,7 +1461,7 @@
+         if (theSender == NULL)
+         {   
+             //UInt16* theSeqNumberP = (UInt16*)thePacket->fPacketPtr.Ptr;
+-            //qtss_printf("ReflectorSocket::ProcessPacket no sender found for packet! sequence number=%d\n",ntohs(theSeqNumberP[1]));
++            //qtss_printf("ReflectorSocket::ProcessPacket no sender found for packet! sequence number=%d\n",bswap_16(theSeqNumberP[1]));
+             fFreeQueue.EnQueue(&thePacket->fQueueElem); // don't process the packet
+             done = true;
+             break;
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorStream.h DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorStream.h
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorStream.h	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorStream.h	2008-05-30 23:32:36.000000000 +0200
+@@ -37,6 +37,7 @@
+ #ifndef _REFLECTOR_STREAM_H_
+ #define _REFLECTOR_STREAM_H_
+ 
++#include <byteswap.h>
+ #include "QTSS.h"
+ 
+ #include "IdleTask.h"
+@@ -121,12 +122,12 @@
+                 
+     UInt32* theSsrcPtr = (UInt32*)fPacketPtr.Ptr;
+     if (isRTCP)// RTCP 
+-        return ntohl(theSsrcPtr[1]); 
++        return bswap_32(theSsrcPtr[1]); 
+             
+     if (fPacketPtr.Len < 12)
+         return 0;
+     
+-    return ntohl(theSsrcPtr[2]);  // RTP SSRC
++    return bswap_32(theSsrcPtr[2]);  // RTP SSRC
+ }
+ 
+ UInt32 ReflectorPacket::GetPacketRTPTime()
+@@ -138,13 +139,13 @@
+         //The RTP timestamp number is the second long of the packet
+         if (fPacketPtr.Ptr == NULL || fPacketPtr.Len < 8)
+             return 0;
+-        timestamp = ntohl( ((UInt32*)fPacketPtr.Ptr)[1]);
++        timestamp = bswap_32( ((UInt32*)fPacketPtr.Ptr)[1]);
+     }
+     else
+     {
+         if (fPacketPtr.Ptr == NULL || fPacketPtr.Len < 20)
+             return 0;
+-        timestamp = ntohl( ((UInt32*)fPacketPtr.Ptr)[4]);
++        timestamp = bswap_32( ((UInt32*)fPacketPtr.Ptr)[4]);
+     }
+     return timestamp;
+ }
+@@ -156,7 +157,7 @@
+    if (fPacketPtr.Ptr == NULL || fPacketPtr.Len < 4 || fIsRTCP)
+         return 0;
+      
+-    UInt16 sequence = ntohs( ((UInt16*)fPacketPtr.Ptr)[1]); //The RTP sequenc number is the second short of the packet
++    UInt16 sequence = bswap_16( ((UInt16*)fPacketPtr.Ptr)[1]); //The RTP sequenc number is the second short of the packet
+     return sequence;
+ }
+ 
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RelayOutput.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RelayOutput.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RelayOutput.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RelayOutput.cpp	2008-05-30 23:32:47.000000000 +0200
+@@ -31,6 +31,7 @@
+ 
+ */
+ 
++#include <byteswap.h>
+ #include "RelayOutput.h"
+ 
+ #include "OSMemory.h"
+@@ -234,7 +235,7 @@
+     char theIPAddrBuf[20];
+     StrPtrLen theIPAddr(theIPAddrBuf, 20);
+     struct in_addr theAddr;
+-    theAddr.s_addr = htonl(fOutputInfo.fDestAddr);
++    theAddr.s_addr = bswap_32(fOutputInfo.fDestAddr);
+     SocketUtils::ConvertAddrToString(theAddr, &theIPAddr);
+ 
+     // Begin writing the HTML
+@@ -538,14 +539,14 @@
+     StrPtrLen theIPAddr(theIPAddrBuf, 20);
+     
+     struct in_addr theDestAddr;     // output destination address
+-    theDestAddr.s_addr = htonl(fOutputInfo.fDestAddr);
++    theDestAddr.s_addr = bswap_32(fOutputInfo.fDestAddr);
+     SocketUtils::ConvertAddrToString(theDestAddr, &theIPAddr);  
+     
+     theErr = QTSS_SetValue (fRelayOutputObject, sOutputDestAddr, 0, (void*)theIPAddr.Ptr, theIPAddr.Len);
+     Assert(theErr == QTSS_NoErr);
+     
+     struct in_addr theLocalAddr;        // output local address
+-    theLocalAddr.s_addr = htonl(fOutputInfo.fLocalAddr);
++    theLocalAddr.s_addr = bswap_32(fOutputInfo.fLocalAddr);
+     SocketUtils::ConvertAddrToString(theLocalAddr, &theIPAddr); 
+     
+     theErr = QTSS_SetValue (fRelayOutputObject, sOutputLocalAddr, 0, (void*)theIPAddr.Ptr, theIPAddr.Len);
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RelaySession.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RelaySession.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RelaySession.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RelaySession.cpp	2008-05-30 23:33:05.000000000 +0200
+@@ -32,6 +32,7 @@
+ */
+ 
+ 
++#include <byteswap.h>
+ #include "RelaySession.h"
+ #include "QTSSModuleUtils.h"
+ #include "SocketUtils.h"
+@@ -189,14 +190,14 @@
+     StrPtrLen theIPAddr(theIPAddrBuf, 20);
+     
+     struct in_addr theSrcAddr;      // source ip address
+-    theSrcAddr.s_addr = htonl(inInfo->GetStreamInfo(0)->fSrcIPAddr);
++    theSrcAddr.s_addr = bswap_32(inInfo->GetStreamInfo(0)->fSrcIPAddr);
+     SocketUtils::ConvertAddrToString(theSrcAddr, &theIPAddr);   
+     
+     theErr = QTSS_SetValue (fRelaySessionObject, sSourceIPAddr, 0, (void*)theIPAddr.Ptr, theIPAddr.Len);
+     Assert(theErr == QTSS_NoErr);
+     
+     struct in_addr theDestAddr;     // dest (of source) ip address
+-    theDestAddr.s_addr = htonl(inInfo->GetStreamInfo(0)->fDestIPAddr);
++    theDestAddr.s_addr = bswap_32(inInfo->GetStreamInfo(0)->fDestIPAddr);
+     SocketUtils::ConvertAddrToString(theDestAddr, &theIPAddr);
+     
+     theErr = QTSS_SetValue (fRelaySessionObject, sSourceInIPAddr, 0, (void*)theIPAddr.Ptr, theIPAddr.Len);
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RTPSessionOutput.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RTPSessionOutput.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RTPSessionOutput.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RTPSessionOutput.cpp	2008-05-30 23:34:26.000000000 +0200
+@@ -31,6 +31,8 @@
+ */
+ 
+ 
++#include <byteswap.h>
++#include <byteswap.h>
+ #include "RTPSessionOutput.h"
+ #include "ReflectorStream.h"
+ 
+@@ -442,18 +444,18 @@
+     //printf("rtptime offset time =%f in scale =%"_U32BITARG_"\n", rtpTimeFromStart, rtpTimeFromStartInScale );
+ 
+     theReport += 2; // point to the rtp time stamp of "now" synched and scaled in stream time
+-    *theReport = htonl(baseTimeStamp + rtpTimeFromStartInScale); 
++    *theReport = bswap_32(baseTimeStamp + rtpTimeFromStartInScale); 
+     
+     theLen = sizeof(UInt32);                   
+     UInt32 packetCount = 0;
+     (void) QTSS_GetValue(*theStreamPtr, sStreamPacketCountAttr, 0, &packetCount,&theLen);
+     theReport += 1; // point to the rtp packets sent
+-    *theReport = htonl(ntohl(*theReport) * 2); 
++    *theReport = bswap_32(bswap_32(*theReport) * 2); 
+         
+     UInt32 byteCount = 0;
+     (void) QTSS_GetValue(*theStreamPtr, sStreamByteCountAttr, 0, &byteCount,&theLen);
+     theReport += 1; // point to the rtp payload bytes sent
+-    *theReport = htonl(ntohl(*theReport) * 2); 
++    *theReport = bswap_32(bswap_32(*theReport) * 2); 
+         
+     return QTSS_NoErr;
+ }
+@@ -667,7 +669,7 @@
+     
+     //The RTP seq number is the second short of the packet
+     UInt16* seqNumPtr = (UInt16*)inPacket->Ptr;
+-    return ntohs(seqNumPtr[1]);
++    return bswap_16(seqNumPtr[1]);
+ }
+ 
+ void RTPSessionOutput::SetPacketSeqNumber(StrPtrLen* inPacket, UInt16 inSeqNumber)
+@@ -677,7 +679,7 @@
+ 
+     //The RTP seq number is the second short of the packet
+     UInt16* seqNumPtr = (UInt16*)inPacket->Ptr;
+-    seqNumPtr[1] = htons(inSeqNumber);
++    seqNumPtr[1] = bswap_16(inSeqNumber);
+ }
+ 
+ // this routine is not used
+diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RTSPSourceInfo.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RTSPSourceInfo.cpp
+--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RTSPSourceInfo.cpp	2008-05-06 01:28:58.000000000 +0200
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RTSPSourceInfo.cpp	2008-05-30 23:34:07.000000000 +0200
+@@ -31,6 +31,7 @@
+ 
+ */
+ 
++#include <byteswap.h>
+ #include "RTSPSourceInfo.h"
+ #include "StringParser.h"
+ #include "SDPSourceInfo.h"
+@@ -384,7 +385,7 @@
+                     StrPtrLen temp(buff);
+                 
+                     struct in_addr theIPAddr;
+-                    theIPAddr.s_addr = htonl(ipAddr);
++                    theIPAddr.s_addr = bswap_32(ipAddr);
+                     SocketUtils::ConvertAddrToString(theIPAddr, &temp);
+                    
+                     qtss_sprintf(ipStr, "c=IN IP4 %s", buff);
+diff -ur DarwinStreamingSrvr6.0.3-Source/Buildit DarwinStreamingSrvr6.0.3-Source.x86_64/Buildit
+--- DarwinStreamingSrvr6.0.3-Source/Buildit	2008-03-26 01:42:48.000000000 +0100
++++ DarwinStreamingSrvr6.0.3-Source.x86_64/Buildit	2008-05-31 10:40:58.000000000 +0200
+@@ -65,14 +65,14 @@
+ case $PLAT in
+ 
+ 	Linux.ppc)
+-        echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform"
++        	echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform"
+ 		CPLUS=gcc
+ 		CCOMP=gcc
+ 		LINKER='gcc'
+  		MAKE=make
+  		
+ 		COMPILER_FLAGS="-D_REENTRANT -D__USE_POSIX -D__linuxppc__ -pipe"
+-        INCLUDE_FLAG="-include"
++        	INCLUDE_FLAG="-include"
+ 		
+ 		CORE_LINK_LIBS="-lpthread -ldl -lstdc++ -lm -lcrypt"
+ 
+@@ -85,16 +85,39 @@
+ 		fi
+ 		;;		
+ 
++	Linux.i386 | \
++	Linux.i486 | \
+ 	Linux.i586 | \
+ 	Linux.i686)
+-        echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform"
++	        echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform"
+ 		CPLUS=gcc
+ 		CCOMP=gcc
+ 		LINKER='gcc'
+  		MAKE=make
+  		
+ 		COMPILER_FLAGS="-D_REENTRANT -D__USE_POSIX -D__linux__ -pipe"
+-        INCLUDE_FLAG="-include"
++		INCLUDE_FLAG="-include"
++		
++		CORE_LINK_LIBS="-lpthread -ldl -lstdc++ -lm -lcrypt"
++
++		SHARED=-shared
++		MODULE_LIBS=
++		
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/dss/dss.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list