mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
substitute all TAB with 4spaces.
This commit is contained in:
parent
e5770b10b1
commit
c85dde7f3f
64 changed files with 14105 additions and 14105 deletions
|
|
@ -158,8 +158,8 @@ public:
|
|||
private:
|
||||
int connect_server();
|
||||
private:
|
||||
st_netfd_t stfd;
|
||||
ISrsProtocolReaderWriter* skt;
|
||||
st_netfd_t stfd;
|
||||
ISrsProtocolReaderWriter* skt;
|
||||
SrsBandCheckClient* bandCheck_Client;
|
||||
std::string server_address;
|
||||
int server_port;
|
||||
|
|
@ -493,8 +493,8 @@ int SrsBandCheckClient::expect_stop_pub()
|
|||
this->set_recv_timeout(1000 * 1000);
|
||||
this->set_send_timeout(1000 * 1000);
|
||||
|
||||
SrsCommonMessage* msg;
|
||||
SrsBandwidthPacket* pkt;
|
||||
SrsCommonMessage* msg;
|
||||
SrsBandwidthPacket* pkt;
|
||||
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(this->protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -641,16 +641,16 @@ int SrsBandCheckClient::send_final()
|
|||
|
||||
SrsBandCheck::SrsBandCheck()
|
||||
{
|
||||
skt = NULL;
|
||||
bandCheck_Client = NULL;
|
||||
stfd = NULL;
|
||||
skt = NULL;
|
||||
bandCheck_Client = NULL;
|
||||
stfd = NULL;
|
||||
}
|
||||
|
||||
SrsBandCheck::~SrsBandCheck()
|
||||
{
|
||||
srs_freep(bandCheck_Client);
|
||||
srs_freep(skt);
|
||||
srs_close_stfd(stfd);
|
||||
srs_freep(bandCheck_Client);
|
||||
srs_freep(skt);
|
||||
srs_close_stfd(stfd);
|
||||
}
|
||||
|
||||
int SrsBandCheck::check(const std::string &app, const std::string &tcUrl)
|
||||
|
|
@ -709,7 +709,7 @@ int SrsBandCheck::connect_server()
|
|||
return ret;
|
||||
}
|
||||
|
||||
skt = new SrsSocket(stfd);
|
||||
skt = new SrsSocket(stfd);
|
||||
bandCheck_Client = new SrsBandCheckClient(skt);
|
||||
|
||||
// connect to server.
|
||||
|
|
@ -757,7 +757,7 @@ int init_st()
|
|||
void print_help(char** argv)
|
||||
{
|
||||
printf(
|
||||
"Usage: %s [OPTION]...\n"
|
||||
"Usage: %s [OPTION]...\n"
|
||||
"test band width from client to rtmp server.\n"
|
||||
"Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
" -i, --ip the ip or domain that to test\n"
|
||||
|
|
@ -767,8 +767,8 @@ void print_help(char** argv)
|
|||
" -V, --version output version information and exit \n"
|
||||
" -h, --help display this help and exit \n"
|
||||
"\n"
|
||||
"For example:\n"
|
||||
" %s -i 127.0.0.1 -p 1935 -v bandcheck.srs.com -k 35c9b402c12a7246868752e2878f7e0e"
|
||||
"For example:\n"
|
||||
" %s -i 127.0.0.1 -p 1935 -v bandcheck.srs.com -k 35c9b402c12a7246868752e2878f7e0e"
|
||||
"\n\n"
|
||||
"Exit status:\n"
|
||||
"0 if OK,\n"
|
||||
|
|
|
|||
|
|
@ -38,21 +38,21 @@ SrsServer* _srs_server = new SrsServer();
|
|||
#include <signal.h>
|
||||
|
||||
#ifdef SRS_GPERF_MP
|
||||
#include <gperftools/heap-profiler.h>
|
||||
#include <gperftools/heap-profiler.h>
|
||||
#endif
|
||||
#ifdef SRS_GPERF_CP
|
||||
#include <gperftools/profiler.h>
|
||||
#include <gperftools/profiler.h>
|
||||
#endif
|
||||
|
||||
void handler(int signo)
|
||||
{
|
||||
srs_trace("get a signal, signo=%d", signo);
|
||||
_srs_server->on_signal(signo);
|
||||
srs_trace("get a signal, signo=%d", signo);
|
||||
_srs_server->on_signal(signo);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
#ifdef SRS_GPERF_MP
|
||||
HeapProfilerStart("gperf.srs.gmp");
|
||||
|
|
@ -60,37 +60,37 @@ int main(int argc, char** argv)
|
|||
#ifdef SRS_GPERF_CP
|
||||
ProfilerStart("gperf.srs.gcp");
|
||||
#endif
|
||||
|
||||
signal(SIGNAL_RELOAD, handler);
|
||||
signal(SIGINT, handler);
|
||||
|
||||
if ((ret = _srs_config->parse_options(argc, argv)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
signal(SIGNAL_RELOAD, handler);
|
||||
signal(SIGINT, handler);
|
||||
|
||||
if ((ret = _srs_config->parse_options(argc, argv)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef SRS_GPERF_MC
|
||||
#ifdef SRS_GPERF_MP
|
||||
srs_error("option --with-gmc confict with --with-gmp, "
|
||||
"@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\n"
|
||||
"Note that since the heap-checker uses the heap-profiling framework internally, "
|
||||
"it is not possible to run both the heap-checker and heap profiler at the same time");
|
||||
return -1;
|
||||
#endif
|
||||
#ifdef SRS_GPERF_MP
|
||||
srs_error("option --with-gmc confict with --with-gmp, "
|
||||
"@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\n"
|
||||
"Note that since the heap-checker uses the heap-profiling framework internally, "
|
||||
"it is not possible to run both the heap-checker and heap profiler at the same time");
|
||||
return -1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if ((ret = _srs_server->initialize()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// TODO: create log dir in _srs_config->get_log_dir()
|
||||
|
||||
if ((ret = _srs_server->listen()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = _srs_server->cycle()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
if ((ret = _srs_server->initialize()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
// TODO: create log dir in _srs_config->get_log_dir()
|
||||
|
||||
if ((ret = _srs_server->listen()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = _srs_server->cycle()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue