hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
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
From 39635e687aaf4047775b4d9b6b6a30ca8f78a39c Mon Sep 17 00:00:00 2001
From: "jkand.huang" <jkand.huang@rock-chips.com>
Date: Tue, 28 Apr 2020 17:36:50 +0800
Subject: [PATCH] live555: set buffer of udp and tcp from 50*1024B to
 512*1024B.
 
Signed-off-by: jkand.huang <jkand.huang@rock-chips.com>
---
 liveMedia/GenericMediaServer.cpp | 3 ++-
 liveMedia/RTPInterface.cpp       | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
 
diff --git a/liveMedia/GenericMediaServer.cpp b/liveMedia/GenericMediaServer.cpp
index df18d89..df7689e 100644
--- a/liveMedia/GenericMediaServer.cpp
+++ b/liveMedia/GenericMediaServer.cpp
@@ -201,7 +201,8 @@ void GenericMediaServer::incomingConnectionHandlerOnSocket(int serverSocket) {
   }
   ignoreSigPipeOnSocket(clientSocket); // so that clients on the same host that are killed don't also kill us
   makeSocketNonBlocking(clientSocket);
-  increaseSendBufferTo(envir(), clientSocket, 50*1024);
+  // set tcp to 512k
+  increaseSendBufferTo(envir(), clientSocket, 512*1024);
   
 #ifdef DEBUG
   envir() << "accept()ed connection from " << AddressString(clientAddr).val() << "\n";
diff --git a/liveMedia/RTPInterface.cpp b/liveMedia/RTPInterface.cpp
index 95257db..7d396d2 100644
--- a/liveMedia/RTPInterface.cpp
+++ b/liveMedia/RTPInterface.cpp
@@ -125,7 +125,7 @@ RTPInterface::RTPInterface(Medium* owner, Groupsock* gs)
   // even if the socket was previously reported (e.g., by "select()") as having data available.
   // (This can supposedly happen if the UDP checksum fails, for example.)
   makeSocketNonBlocking(fGS->socketNum());
-  increaseSendBufferTo(envir(), fGS->socketNum(), 50*1024);
+  increaseSendBufferTo(envir(), fGS->socketNum(), 512*1024);
 }
 
 RTPInterface::~RTPInterface() {
-- 
2.26.1