kopia lustrzana https://github.com/f4exb/sdrangel
				
				
				
			Windows: MSVC2017: changes in qrtplib
							rodzic
							
								
									cdacf51bfb
								
							
						
					
					
						commit
						f97728c4e9
					
				|  | @ -84,7 +84,11 @@ | |||
| 
 | ||||
| // No SRTP support
 | ||||
| 
 | ||||
| #ifdef _MSC_VER | ||||
| #define RTP_HAVE_QUERYPERFORMANCECOUNTER | ||||
| #else | ||||
| #define RTP_HAVE_CLOCK_GETTIME | ||||
| #endif | ||||
| 
 | ||||
| #define RTP_HAVE_POLL | ||||
| 
 | ||||
|  |  | |||
|  | @ -40,7 +40,11 @@ | |||
| #include "rtprandomrand48.h" | ||||
| 
 | ||||
| #include <time.h> | ||||
| #ifdef _MSC_VER | ||||
| #include "Windows.h" | ||||
| #else | ||||
| #include <unistd.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <QDateTime> | ||||
| 
 | ||||
|  | @ -50,7 +54,11 @@ namespace qrtplib | |||
| uint32_t RTPRandom::PickSeed() | ||||
| { | ||||
|     uint32_t x; | ||||
| #ifdef _MSC_VER | ||||
|     x = GetCurrentProcessId(); | ||||
| #else | ||||
|     x = (uint32_t) getpid(); | ||||
| #endif | ||||
|     QDateTime currentDateTime = QDateTime::currentDateTime(); | ||||
|     x += currentDateTime.toTime_t(); | ||||
| #if defined(WIN32) | ||||
|  |  | |||
|  | @ -49,7 +49,6 @@ | |||
| #endif // RTP_SUPPORT_SENDAPP
 | ||||
| #include "rtpinternalutils.h" | ||||
| 
 | ||||
| #include <unistd.h> | ||||
| #include <stdlib.h> | ||||
| 
 | ||||
| #include <QHostInfo> | ||||
|  | @ -1143,8 +1142,9 @@ int RTPSession::ProcessPolledData() | |||
|     return 0; | ||||
| } | ||||
| 
 | ||||
| int RTPSession::CreateCNAME(uint8_t *buffer, std::size_t *bufferlength, bool resolve __attribute__((unused))) | ||||
| int RTPSession::CreateCNAME(uint8_t *buffer, std::size_t *bufferlength, bool resolve) | ||||
| { | ||||
|     (void) resolve; | ||||
|     buffer[*bufferlength - 1] = 0; | ||||
| 
 | ||||
|     std::size_t offset = strlen((const char *) buffer); | ||||
|  |  | |||
|  | @ -67,13 +67,15 @@ RTPSessionParams::RTPSessionParams() : | |||
|     predefinedssrc = 0; | ||||
| } | ||||
| 
 | ||||
| int RTPSessionParams::SetUsePollThread(bool usethread __attribute__((unused))) | ||||
| int RTPSessionParams::SetUsePollThread(bool usethread) | ||||
| { | ||||
|     (void) usethread; | ||||
|     return ERR_RTP_NOTHREADSUPPORT; | ||||
| } | ||||
| 
 | ||||
| int RTPSessionParams::SetNeedThreadSafety(bool __attribute__((unused))) | ||||
| int RTPSessionParams::SetNeedThreadSafety(bool x) | ||||
| { | ||||
|     (void) x; | ||||
|     return ERR_RTP_NOTHREADSUPPORT; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -44,6 +44,8 @@ | |||
| #include <sys/time.h> | ||||
| #include <time.h> | ||||
| #include <errno.h> | ||||
| #else | ||||
| #include "Windows.h" | ||||
| #endif // RTP_HAVE_QUERYPERFORMANCECOUNTER
 | ||||
| 
 | ||||
| #include "export.h" | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 f4exb
						f4exb