mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 03:10:04 +08:00
删除不必要的文件或代码
This commit is contained in:
parent
146fdf48d4
commit
50c45d7897
5
.github/FUNDING.yml
vendored
5
.github/FUNDING.yml
vendored
@ -1,5 +0,0 @@
|
|||||||
# These are supported funding model platforms
|
|
||||||
custom: ['https://www.paypal.me/xiachu']
|
|
||||||
ko_fi: xiachu
|
|
||||||
issuehunt: xiongziliang
|
|
||||||
liberapay: xiachu
|
|
40
benchmark.md
40
benchmark.md
@ -1,40 +0,0 @@
|
|||||||
# 测试环境
|
|
||||||
- 系统:Linux core 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64 GNU/Linux
|
|
||||||
- 内存:15G
|
|
||||||
- CPU:Intel(R) Xeon(R) CPU E3-1220 v5 @ 3.00GHz;4核
|
|
||||||
- 网络:千兆网卡
|
|
||||||
- 测试端采用回环网络方式访问服务器
|
|
||||||
|
|
||||||
# 测试工具
|
|
||||||
ZLMeidaKit自带测试程序test_benchmark,其为单进程多线程模型
|
|
||||||
|
|
||||||
# 测试服务器
|
|
||||||
ZLMeidaKit自带测试服务器test_server,支持RTSP/RTMP/HLS服务器;多线程模型。
|
|
||||||
|
|
||||||
# 测试媒体流
|
|
||||||
使用test_server拉取的rtmp流`rtmp://live.hkstv.hk.lxdns.com/live/hks1`;然后通过test_server转发代理。
|
|
||||||
该码流大概300~400Kbit/s左右。
|
|
||||||
|
|
||||||
# 测试结果
|
|
||||||
|
|
||||||
说明:在cmake构建时,输入`cmake .. -DCMKAE_BUILD_TYPE=Release`以编译优化版本。
|
|
||||||
|
|
||||||
| 播放器个数(rtmp) | CPU(最大400%) | 内存(VIRT/RES) | 带宽(平均) | 丢包 |
|
|
||||||
| --- | --- | --- | --- | --- |
|
|
||||||
| 1000 | 20% | 702M/13M | 40 MByte/s | 无 |
|
|
||||||
| 2000 | 39% | 702M/18M | 80 MByte/s | 无 |
|
|
||||||
| 5000 | 92% | 702M/32M | 200 MByte/s | 无 |
|
|
||||||
| 10000 | 170% | 702M/59M | 400 MByte/s | 无 |
|
|
||||||
|
|
||||||
| 播放器个数(rtsp/tcp) | CPU(最大400%) | 内存(VIRT/RES) | 带宽(平均) | 丢包 |
|
|
||||||
| --- | --- | --- | --- | --- |
|
|
||||||
| 1000 | 18% | 702M/13M | 42 MByte/s| 无 |
|
|
||||||
| 2000 | 35% | 702M/19M | 82 MByte/s | 无 |
|
|
||||||
| 5000 | 80% | 702M/35M | 198 MByte/s | 无 |
|
|
||||||
| 10000 | 130% | 702M/62M | 405 MByte/s | 无 |
|
|
||||||
|
|
||||||
# srs性能对比
|
|
||||||
| 播放器个数(rtmp) | CPU(最大400%) | 内存(VIRT/RES) | 带宽(平均) | 丢包 |
|
|
||||||
| --- | --- | --- | --- | --- |
|
|
||||||
| 1000 | 10% | 310M/53M | 41.17 MByte/s | 无 |
|
|
||||||
| 2000 | 18% | 604M/117M | 83.86 MByte/s | 无 |
|
|
@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
cd ..
|
|
||||||
git clone --depth=1 https://github.com/xia-chu/ZLMediaKit.git
|
|
||||||
cd ZLMediaKit
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
|
|
||||||
sudo apt-get install cmake
|
|
||||||
sudo apt-get install libssl-dev
|
|
||||||
#sudo apt-get install libsdl-dev
|
|
||||||
#sudo apt-get install libavcodec-dev
|
|
||||||
#sudo apt-get install libavutil-dev
|
|
||||||
|
|
||||||
mkdir -p linux_build
|
|
||||||
rm -rf ./build
|
|
||||||
ln -s ./linux_build build
|
|
||||||
cd linux_build
|
|
||||||
|
|
||||||
cmake ..
|
|
||||||
make -j4
|
|
@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
cd ..
|
|
||||||
git clone --depth=1 https://github.com/xia-chu/ZLMediaKit.git
|
|
||||||
cd ZLMediaKit
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
|
|
||||||
brew install cmake
|
|
||||||
brew install openssl
|
|
||||||
brew install sdl
|
|
||||||
brew install ffmpeg
|
|
||||||
|
|
||||||
mkdir -p mac_build
|
|
||||||
rm -rf ./build
|
|
||||||
ln -s ./mac_build build
|
|
||||||
cd mac_build
|
|
||||||
cmake .. -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2j/
|
|
||||||
make -j4
|
|
@ -203,7 +203,7 @@ modifyStamp=0
|
|||||||
#rtmp服务器监听端口
|
#rtmp服务器监听端口
|
||||||
port=1935
|
port=1935
|
||||||
#rtmps服务器监听地址
|
#rtmps服务器监听地址
|
||||||
sslport=19350
|
sslport=0
|
||||||
|
|
||||||
[rtp]
|
[rtp]
|
||||||
#音频mtu大小,该参数限制rtp最大字节数,推荐不要超过1400
|
#音频mtu大小,该参数限制rtp最大字节数,推荐不要超过1400
|
||||||
@ -253,11 +253,11 @@ keepAliveSecond=15
|
|||||||
#rtsp服务器监听地址
|
#rtsp服务器监听地址
|
||||||
port=554
|
port=554
|
||||||
#rtsps服务器监听地址
|
#rtsps服务器监听地址
|
||||||
sslport=322
|
sslport=0
|
||||||
|
|
||||||
[shell]
|
[shell]
|
||||||
#调试telnet服务器接受最大bufffer大小
|
#调试telnet服务器接受最大bufffer大小
|
||||||
maxReqSize=1024
|
maxReqSize=1024
|
||||||
#调试telnet服务器监听端口
|
#调试telnet服务器监听端口
|
||||||
port=9000
|
port=0
|
||||||
|
|
||||||
|
@ -172,45 +172,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(_WIN32)
|
|
||||||
static void inline listen_shell_input(){
|
|
||||||
cout << "> 欢迎进入命令模式,你可以输入\"help\"命令获取帮助" << endl;
|
|
||||||
cout << "> " << std::flush;
|
|
||||||
|
|
||||||
signal(SIGTTOU,SIG_IGN);
|
|
||||||
signal(SIGTTIN,SIG_IGN);
|
|
||||||
|
|
||||||
SockUtil::setNoBlocked(STDIN_FILENO);
|
|
||||||
auto oninput = [](int event) {
|
|
||||||
if (event & Event_Read) {
|
|
||||||
char buf[1024];
|
|
||||||
int n = read(STDIN_FILENO, buf, sizeof(buf));
|
|
||||||
if (n > 0) {
|
|
||||||
buf[n] = '\0';
|
|
||||||
try {
|
|
||||||
CMDRegister::Instance()(buf);
|
|
||||||
cout << "> " << std::flush;
|
|
||||||
} catch (ExitException &ex) {
|
|
||||||
InfoL << "ExitException";
|
|
||||||
kill(getpid(), SIGINT);
|
|
||||||
} catch (std::exception &ex) {
|
|
||||||
cout << ex.what() << endl;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
DebugL << get_uv_errmsg();
|
|
||||||
EventPollerPool::Instance().getFirstPoller()->delEvent(STDIN_FILENO);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event & Event_Error) {
|
|
||||||
WarnL << "Event_Error";
|
|
||||||
EventPollerPool::Instance().getFirstPoller()->delEvent(STDIN_FILENO);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
EventPollerPool::Instance().getFirstPoller()->addEvent(STDIN_FILENO, Event_Read | Event_Error | Event_LT,oninput);
|
|
||||||
}
|
|
||||||
#endif//!defined(_WIN32)
|
|
||||||
|
|
||||||
//全局变量,在WebApi中用于保存配置文件用
|
//全局变量,在WebApi中用于保存配置文件用
|
||||||
string g_ini_file;
|
string g_ini_file;
|
||||||
|
|
||||||
@ -369,13 +330,6 @@ int start_main(int argc,char *argv[]) {
|
|||||||
installWebHook();
|
installWebHook();
|
||||||
InfoL << "已启动http hook 接口";
|
InfoL << "已启动http hook 接口";
|
||||||
|
|
||||||
#if !defined(_WIN32) && !defined(ANDROID)
|
|
||||||
if (!bDaemon) {
|
|
||||||
//交互式shell输入
|
|
||||||
listen_shell_input();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//设置退出信号处理函数
|
//设置退出信号处理函数
|
||||||
static semaphore sem;
|
static semaphore sem;
|
||||||
signal(SIGINT, [](int) {
|
signal(SIGINT, [](int) {
|
||||||
|
Loading…
Reference in New Issue
Block a user