mirror of
				https://github.com/ossrs/srs.git
				synced 2025-03-09 15:49:59 +00:00 
			
		
		
		
	Upgrade libsrt to v1.5.3. v5.0.183 v6.0.81 (#3808)
fix https://github.com/ossrs/srs/issues/3155 Build srt-1-fit fails with `standard attributes in middle of decl-specifiers` on GCC 12,Arch Linux. See https://github.com/Haivision/srt/releases/tag/v1.5.3
This commit is contained in:
		
							parent
							
								
									f9bba0a9b0
								
							
						
					
					
						commit
						c5e067fb0b
					
				
					 94 changed files with 5974 additions and 6273 deletions
				
			
		
							
								
								
									
										43
									
								
								trunk/3rdparty/srt-1-fit/srtcore/socketconfig.h
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										43
									
								
								trunk/3rdparty/srt-1-fit/srtcore/socketconfig.h
									
										
									
									
										vendored
									
									
								
							|  | @ -91,19 +91,27 @@ struct CSrtMuxerConfig | |||
|     int iUDPSndBufSize; // UDP sending buffer size
 | ||||
|     int iUDPRcvBufSize; // UDP receiving buffer size
 | ||||
| 
 | ||||
|     bool operator==(const CSrtMuxerConfig& other) const | ||||
|     // NOTE: this operator is not reversable. The syntax must use:
 | ||||
|     //  muxer_entry == socket_entry
 | ||||
|     bool isCompatWith(const CSrtMuxerConfig& other) const | ||||
|     { | ||||
| #define CEQUAL(field) (field == other.field) | ||||
|         return CEQUAL(iIpTTL) | ||||
|             && CEQUAL(iIpToS) | ||||
|             && CEQUAL(iIpV6Only) | ||||
|             && CEQUAL(bReuseAddr) | ||||
| #ifdef SRT_ENABLE_BINDTODEVICE | ||||
|             && CEQUAL(sBindToDevice) | ||||
| #endif | ||||
|             && CEQUAL(iUDPSndBufSize) | ||||
|             && CEQUAL(iUDPRcvBufSize); | ||||
|             && CEQUAL(iUDPRcvBufSize) | ||||
|             && (other.iIpV6Only == -1 || CEQUAL(iIpV6Only)) | ||||
|             // NOTE: iIpV6Only is not regarded because
 | ||||
|             // this matches only in case of IPv6 with "any" address.
 | ||||
|             // And this aspect must be checked separately because here
 | ||||
|             // this procedure has no access to neither the address,
 | ||||
|             // nor the IP version (family).
 | ||||
| #undef CEQUAL | ||||
|             && true; | ||||
|     } | ||||
| 
 | ||||
|     CSrtMuxerConfig() | ||||
|  | @ -150,6 +158,16 @@ public: | |||
|         return set(s.c_str(), s.size()); | ||||
|     } | ||||
| 
 | ||||
|     size_t copy(char* s, size_t length) const | ||||
|     { | ||||
|         if (!s) | ||||
|             return 0; | ||||
| 
 | ||||
|         size_t copy_len = std::min((size_t)len, length); | ||||
|         memcpy(s, stor, copy_len); | ||||
|         return copy_len; | ||||
|     } | ||||
| 
 | ||||
|     std::string str() const | ||||
|     { | ||||
|         return len == 0 ? std::string() : std::string(stor); | ||||
|  | @ -176,6 +194,13 @@ struct CSrtConfig: CSrtMuxerConfig | |||
|         DEF_LINGER_S = 3*60,    // 3 minutes
 | ||||
|         DEF_CONNTIMEO_S = 3;    // 3 seconds
 | ||||
| 
 | ||||
|     enum | ||||
|     { | ||||
|         CIPHER_MODE_AUTO = 0, | ||||
|         CIPHER_MODE_AES_CTR = 1, | ||||
|         CIPHER_MODE_AES_GCM = 2 | ||||
|     }; | ||||
| 
 | ||||
|     static const int      COMM_RESPONSE_TIMEOUT_MS      = 5 * 1000; // 5 seconds
 | ||||
|     static const uint32_t COMM_DEF_MIN_STABILITY_TIMEOUT_MS = 60;   // 60 ms
 | ||||
| 
 | ||||
|  | @ -189,8 +214,8 @@ struct CSrtConfig: CSrtMuxerConfig | |||
|     size_t zExpPayloadSize; // Expected average payload size (user option)
 | ||||
| 
 | ||||
|     // Options
 | ||||
|     bool   bSynSending;     // Sending syncronization mode
 | ||||
|     bool   bSynRecving;     // Receiving syncronization mode
 | ||||
|     bool   bSynSending;     // Sending synchronization mode
 | ||||
|     bool   bSynRecving;     // Receiving synchronization mode
 | ||||
|     int    iFlightFlagSize; // Maximum number of packets in flight from the peer side
 | ||||
|     int    iSndBufSize;     // Maximum UDT sender buffer size
 | ||||
|     int    iRcvBufSize;     // Maximum UDT receiver buffer size
 | ||||
|  | @ -202,6 +227,9 @@ struct CSrtConfig: CSrtMuxerConfig | |||
|     int      iSndTimeOut; // sending timeout in milliseconds
 | ||||
|     int      iRcvTimeOut; // receiving timeout in milliseconds
 | ||||
|     int64_t  llMaxBW;     // maximum data transfer rate (threshold)
 | ||||
| #ifdef ENABLE_MAXREXMITBW | ||||
|     int64_t  llMaxRexmitBW; // maximum bandwidth limit for retransmissions (Bytes/s).
 | ||||
| #endif | ||||
| 
 | ||||
|     // These fields keep the options for encryption
 | ||||
|     // (SRTO_PASSPHRASE, SRTO_PBKEYLEN). Crypto object is
 | ||||
|  | @ -224,6 +252,7 @@ struct CSrtConfig: CSrtMuxerConfig | |||
|     int      iPeerIdleTimeout_ms; // Timeout for hearing anything from the peer (ms).
 | ||||
|     uint32_t uMinStabilityTimeout_ms; | ||||
|     int      iRetransmitAlgo; | ||||
|     int      iCryptoMode; // SRTO_CRYPTOMODE
 | ||||
| 
 | ||||
|     int64_t llInputBW;         // Input stream rate (bytes/sec). 0: use internally estimated input bandwidth
 | ||||
|     int64_t llMinInputBW;      // Minimum input stream rate estimate (bytes/sec)
 | ||||
|  | @ -263,6 +292,9 @@ struct CSrtConfig: CSrtMuxerConfig | |||
|         , iSndTimeOut(-1) | ||||
|         , iRcvTimeOut(-1) | ||||
|         , llMaxBW(-1) | ||||
| #ifdef ENABLE_MAXREXMITBW | ||||
|         , llMaxRexmitBW(-1) | ||||
| #endif | ||||
|         , bDataSender(false) | ||||
|         , bMessageAPI(true) | ||||
|         , bTSBPD(true) | ||||
|  | @ -275,6 +307,7 @@ struct CSrtConfig: CSrtMuxerConfig | |||
|         , iPeerIdleTimeout_ms(COMM_RESPONSE_TIMEOUT_MS) | ||||
|         , uMinStabilityTimeout_ms(COMM_DEF_MIN_STABILITY_TIMEOUT_MS) | ||||
|         , iRetransmitAlgo(1) | ||||
|         , iCryptoMode(CIPHER_MODE_AUTO) | ||||
|         , llInputBW(0) | ||||
|         , llMinInputBW(0) | ||||
|         , iOverheadBW(25) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue