合并pr(rtp最大大小可配置):#1028

This commit is contained in:
ziyue 2021-08-12 10:43:12 +08:00
parent 7ed7e5386c
commit 094f7553c9
4 changed files with 4 additions and 4 deletions

View File

@ -201,7 +201,7 @@ sslport=19350
audioMtuSize=600 audioMtuSize=600
#视频mtu大小该参数限制rtp最大字节数推荐不要超过1400 #视频mtu大小该参数限制rtp最大字节数推荐不要超过1400
videoMtuSize=1400 videoMtuSize=1400
#rtp包最大长度限制可以降低内存分配单位k #rtp包最大长度限制单位KB,主要用于识别TCP上下文破坏时获取到错误的rtp
rtpMaxSize=10 rtpMaxSize=10
[rtp_proxy] [rtp_proxy]

View File

@ -192,7 +192,7 @@ namespace Rtp {
//RTP打包最大MTU,公网情况下更小 //RTP打包最大MTU,公网情况下更小
const string kVideoMtuSize = RTP_FIELD"videoMtuSize"; const string kVideoMtuSize = RTP_FIELD"videoMtuSize";
const string kAudioMtuSize = RTP_FIELD"audioMtuSize"; const string kAudioMtuSize = RTP_FIELD"audioMtuSize";
//rtp包最大长度限制单位是k //rtp包最大长度限制单位是KB
const string kRtpMaxSize = RTP_FIELD"rtpMaxSize"; const string kRtpMaxSize = RTP_FIELD"rtpMaxSize";
onceToken token([](){ onceToken token([](){

View File

@ -228,7 +228,7 @@ namespace Rtp {
extern const string kVideoMtuSize; extern const string kVideoMtuSize;
//RTP打包最大MTU,公网情况下更小 //RTP打包最大MTU,公网情况下更小
extern const string kAudioMtuSize; extern const string kAudioMtuSize;
//rtp包最大长度限制, 单位k //rtp包最大长度限制, 单位KB
extern const string kRtpMaxSize; extern const string kRtpMaxSize;
} //namespace Rtsp } //namespace Rtsp

View File

@ -36,7 +36,7 @@ static bool loadFile(const char *path){
uint32_t timeStamp_last = 0; uint32_t timeStamp_last = 0;
uint16_t len; uint16_t len;
char rtp[50 * 1024]; char rtp[0xFFFF];
struct sockaddr addr = {0}; struct sockaddr addr = {0};
auto sock = Socket::createSocket(); auto sock = Socket::createSocket();
size_t total_size = 0; size_t total_size = 0;