1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for bug #143, build on centos5.

This commit is contained in:
winlin 2014-08-02 22:18:39 +08:00
parent 84450e1588
commit 7b24788445
118 changed files with 123 additions and 24 deletions

View file

@ -498,3 +498,4 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample
return ret; return ret;
} }

View file

@ -281,3 +281,4 @@ public:
}; };
#endif #endif

View file

@ -476,3 +476,4 @@ int SrsBandwidth::finial(SrsBandwidthSample& play_sample, SrsBandwidthSample& pu
return ret; return ret;
} }

View file

@ -2156,7 +2156,7 @@ int SrsConfig::get_bw_check_interval_ms(string vhost)
return SRS_CONF_DEFAULT_BANDWIDTH_INTERVAL * 1000; return SRS_CONF_DEFAULT_BANDWIDTH_INTERVAL * 1000;
} }
return ::atof(conf->arg0().c_str()) * 1000; return (int)(::atof(conf->arg0().c_str()) * 1000);
} }
int SrsConfig::get_bw_check_limit_kbps(string vhost) int SrsConfig::get_bw_check_limit_kbps(string vhost)
@ -3316,3 +3316,4 @@ bool srs_directive_equals(SrsConfDirective* a, SrsConfDirective* b)
return true; return true;
} }

View file

@ -94,3 +94,4 @@ void SrsConnection::stop()
srs_freep(pthread); srs_freep(pthread);
} }

View file

@ -551,3 +551,4 @@ int SrsDvr::on_video(SrsSharedPtrMessage* video)
#endif #endif

View file

@ -219,3 +219,4 @@ public:
#endif #endif
#endif #endif

View file

@ -722,3 +722,4 @@ void SrsPublishEdge::on_proxy_unpublish()
state = SrsEdgeStateInit; state = SrsEdgeStateInit;
srs_trace("edge change from %d to state %d (init).", pstate, state); srs_trace("edge change from %d to state %d (init).", pstate, state);
} }

View file

@ -218,3 +218,4 @@ public:
}; };
#endif #endif

View file

@ -23,3 +23,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_app_empty.hpp> #include <srs_app_empty.hpp>

View file

@ -30,3 +30,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core.hpp> #include <srs_core.hpp>
#endif #endif

View file

@ -338,3 +338,4 @@ void SrsEncoder::encoder()
#endif #endif

View file

@ -75,3 +75,4 @@ private:
#endif #endif
#endif #endif

View file

@ -498,3 +498,4 @@ void SrsFFMPEG::stop()
#endif #endif

View file

@ -89,3 +89,4 @@ public:
#endif #endif
#endif #endif

View file

@ -350,3 +350,4 @@ int SrsForwarder::forward()
return ret; return ret;
} }

View file

@ -88,3 +88,4 @@ private:
}; };
#endif #endif

View file

@ -92,3 +92,4 @@ void SrsHttpHeartbeat::heartbeat()
} }
#endif #endif

View file

@ -49,3 +49,4 @@ public:
#endif #endif
#endif #endif

View file

@ -993,8 +993,8 @@ int SrsHlsCache::on_publish(SrsHlsMuxer* muxer, SrsRequest* req, int64_t segment
std::string stream = req->stream; std::string stream = req->stream;
std::string app = req->app; std::string app = req->app;
int hls_fragment = _srs_config->get_hls_fragment(vhost); int hls_fragment = (int)_srs_config->get_hls_fragment(vhost);
int hls_window = _srs_config->get_hls_window(vhost); int hls_window = (int)_srs_config->get_hls_window(vhost);
// get the hls path config // get the hls path config
std::string hls_path = _srs_config->get_hls_path(vhost); std::string hls_path = _srs_config->get_hls_path(vhost);
@ -1531,3 +1531,4 @@ void SrsHls::hls_mux()
#endif #endif

View file

@ -1089,3 +1089,4 @@ string SrsHttpUri::get_uri_field(string uri, http_parser_url* hp_u, http_parser_
} }
#endif #endif

View file

@ -615,3 +615,4 @@ int SrsHttpApi::process_request(SrsStSocket* skt, SrsHttpMessage* req)
} }
#endif #endif

View file

@ -188,3 +188,4 @@ private:
#endif #endif
#endif #endif

View file

@ -150,3 +150,4 @@ int SrsHttpClient::connect(SrsHttpUri* uri)
} }
#endif #endif

View file

@ -65,3 +65,4 @@ private:
#endif #endif
#endif #endif

View file

@ -595,3 +595,4 @@ int SrsHttpConn::process_request(SrsStSocket* skt, SrsHttpMessage* req)
} }
#endif #endif

View file

@ -105,3 +105,4 @@ private:
#endif #endif
#endif #endif

View file

@ -327,3 +327,4 @@ void SrsHttpHooks::on_stop(string url, int client_id, string ip, SrsRequest* req
} }
#endif #endif

View file

@ -103,3 +103,4 @@ public:
#endif #endif
#endif #endif

View file

@ -463,3 +463,4 @@ int SrsIngester::on_reload_ingest_updated(string vhost, string ingest_id)
} }
#endif #endif

View file

@ -94,3 +94,4 @@ public:
#endif #endif
#endif #endif

View file

@ -892,3 +892,4 @@ const nx_json* nx_json_item(const nx_json* json, int idx) {
#endif #endif

View file

@ -284,3 +284,4 @@ void SrsKbpsLimit::send_limit()
} }
} }

View file

@ -378,3 +378,4 @@ void SrsFastLog::open_log_file()
); );
} }
} }

View file

@ -94,3 +94,4 @@ private:
}; };
#endif #endif

View file

@ -184,3 +184,4 @@ int64_t SrsPithyPrint::age()
return _age; return _age;
} }

View file

@ -94,3 +94,4 @@ int SrsRefer::check_single_refer(std::string page_url, std::string refer)
return ret; return ret;
} }

View file

@ -160,3 +160,4 @@ int ISrsReloadHandler::on_reload_ingest_updated(string /*vhost*/, string /*inges
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }

View file

@ -197,13 +197,13 @@ int SrsRtmpConn::service_cycle()
{ {
int ret = ERROR_SUCCESS; int ret = ERROR_SUCCESS;
if ((ret = rtmp->set_window_ack_size(2.5 * 1000 * 1000)) != ERROR_SUCCESS) { if ((ret = rtmp->set_window_ack_size((int)(2.5 * 1000 * 1000))) != ERROR_SUCCESS) {
srs_error("set window acknowledgement size failed. ret=%d", ret); srs_error("set window acknowledgement size failed. ret=%d", ret);
return ret; return ret;
} }
srs_verbose("set window acknowledgement size success"); srs_verbose("set window acknowledgement size success");
if ((ret = rtmp->set_peer_bandwidth(2.5 * 1000 * 1000, 2)) != ERROR_SUCCESS) { if ((ret = rtmp->set_peer_bandwidth((int)(2.5 * 1000 * 1000), 2)) != ERROR_SUCCESS) {
srs_error("set peer bandwidth failed. ret=%d", ret); srs_error("set peer bandwidth failed. ret=%d", ret);
return ret; return ret;
} }
@ -1124,3 +1124,4 @@ void SrsRtmpConn::http_hooks_on_stop()
return; return;
} }

View file

@ -106,3 +106,4 @@ private:
}; };
#endif #endif

View file

@ -1049,3 +1049,4 @@ int SrsServer::on_reload_http_stream_updated()
return ret; return ret;
} }

View file

@ -1555,3 +1555,4 @@ void SrsSource::destroy_forwarders()
forwarders.clear(); forwarders.clear();
} }

View file

@ -35,3 +35,4 @@ void srs_close_stfd(st_netfd_t& stfd)
close(fd); close(fd);
} }
} }

View file

@ -36,3 +36,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
extern void srs_close_stfd(st_netfd_t& stfd); extern void srs_close_stfd(st_netfd_t& stfd);
#endif #endif

View file

@ -172,3 +172,4 @@ int SrsStSocket::writev(const iovec *iov, int iov_size, ssize_t* nwrite)
return ret; return ret;
} }

View file

@ -199,3 +199,4 @@ void* SrsThread::thread_fun(void* arg)
return NULL; return NULL;
} }

View file

@ -147,3 +147,4 @@ private:
}; };
#endif #endif

View file

@ -1119,3 +1119,4 @@ void srs_api_dump_summaries(std::stringstream& ss)
<< __SRS_JOBJECT_END << __SRS_JOBJECT_END
<< __SRS_JOBJECT_END; << __SRS_JOBJECT_END;
} }

View file

@ -627,3 +627,4 @@ std::string srs_get_peer_ip(int fd);
void srs_api_dump_summaries(std::stringstream& ss); void srs_api_dump_summaries(std::stringstream& ss);
#endif #endif

View file

@ -23,3 +23,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core.hpp> #include <srs_core.hpp>

View file

@ -97,3 +97,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
className& operator= (const className&) className& operator= (const className&)
#endif #endif

View file

@ -22,3 +22,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <srs_core_autofree.hpp> #include <srs_core_autofree.hpp>

View file

@ -102,3 +102,4 @@ int SrsBuffer::grow(ISrsBufferReader* reader, int required_size)
return ret; return ret;
} }

View file

@ -115,3 +115,4 @@ bool SrsFlvCodec::audio_is_aac(char* data, int size)
return sound_format == SrsCodecAudioAAC; return sound_format == SrsCodecAudioAAC;
} }

View file

@ -23,3 +23,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_kernel_consts.hpp> #include <srs_kernel_consts.hpp>

View file

@ -263,3 +263,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SRS_CONSTS_HTTP_HTTPVersionNotSupported_str "HTTP Version Not Supported" #define SRS_CONSTS_HTTP_HTTPVersionNotSupported_str "HTTP Version Not Supported"
#endif #endif

View file

@ -35,3 +35,4 @@ bool srs_is_client_gracefully_close(int error_code)
|| error_code == ERROR_SOCKET_READ_FULLY || error_code == ERROR_SOCKET_READ_FULLY
|| error_code == ERROR_SOCKET_WRITE; || error_code == ERROR_SOCKET_WRITE;
} }

View file

@ -202,3 +202,4 @@ extern bool srs_is_client_gracefully_close(int error_code);
*/ */
#endif #endif

View file

@ -212,3 +212,4 @@ int SrsFileReader::read(void* buf, size_t count, ssize_t* pnread)
return ret; return ret;
} }

View file

@ -91,3 +91,4 @@ public:
}; };
#endif #endif

View file

@ -525,3 +525,4 @@ int SrsFlvVodStreamDecoder::lseek(int64_t offset)
return ret; return ret;
} }

View file

@ -175,3 +175,4 @@ public:
}; };
#endif #endif

View file

@ -75,3 +75,4 @@ int ISrsThreadContext::get_id()
return 0; return 0;
} }

View file

@ -150,3 +150,4 @@ extern ISrsThreadContext* _srs_context;
#endif #endif
#endif #endif

View file

@ -252,3 +252,4 @@ void SrsStream::write_bytes(char* data, int size)
p += size; p += size;
} }

View file

@ -215,3 +215,4 @@ bool srs_string_ends_with(string str, string flag)
{ {
return str.rfind(flag) == str.length() - flag.length(); return str.rfind(flag) == str.length() - flag.length();
} }

View file

@ -60,3 +60,4 @@ extern std::string srs_string_remove(std::string str, std::string remove_chars);
extern bool srs_string_ends_with(std::string str, std::string flag); extern bool srs_string_ends_with(std::string str, std::string flag);
#endif #endif

View file

@ -393,3 +393,4 @@ int SrsBandwidthClient::final(SrsBandwidthPacket** ppkt)
return ret; return ret;
} }

View file

@ -87,3 +87,4 @@ private:
}; };
#endif #endif

View file

@ -203,3 +203,4 @@ int SimpleSocketStream::write(void* buf, size_t size, ssize_t* nwrite)
return ret; return ret;
} }

View file

@ -72,3 +72,4 @@ public:
}; };
#endif #endif

View file

@ -996,3 +996,4 @@ char* srs_amf0_human_print(srs_amf0_t amf0, char** pdata, int* psize)
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -304,3 +304,4 @@ char* srs_amf0_human_print(srs_amf0_t amf0, char** pdata, int* psize);
#endif #endif
#endif #endif

View file

@ -189,3 +189,4 @@ int run_master()
return 0; return 0;
} }

View file

@ -1738,3 +1738,4 @@ namespace _srs_internal
return value->write(stream); return value->write(stream);
} }
} }

View file

@ -1250,3 +1250,4 @@ int SrsComplexHandshake::handshake_with_server(SrsHandshakeBytes* hs_bytes, ISrs
} }
#endif #endif

View file

@ -62,3 +62,4 @@ ISrsProtocolReaderWriter::ISrsProtocolReaderWriter()
ISrsProtocolReaderWriter::~ISrsProtocolReaderWriter() ISrsProtocolReaderWriter::~ISrsProtocolReaderWriter()
{ {
} }

View file

@ -167,3 +167,4 @@ public:
}; };
#endif #endif

View file

@ -49,3 +49,4 @@ SrsSharedPtrMessageArray::~SrsSharedPtrMessageArray()
srs_freep(msgs); srs_freep(msgs);
} }

View file

@ -61,3 +61,4 @@ public:
}; };
#endif #endif

View file

@ -1472,3 +1472,4 @@ int SrsRtmpServer::identify_play_client(SrsPlayPacket* req, SrsRtmpConnType& typ
return ret; return ret;
} }

View file

@ -485,3 +485,4 @@ private:
}; };
#endif #endif

View file

@ -3888,3 +3888,4 @@ int SrsUserControlPacket::encode_packet(SrsStream* stream)
return ret; return ret;
} }

View file

@ -1548,3 +1548,4 @@ protected:
}; };
#endif #endif

View file

@ -159,3 +159,4 @@ bool srs_bytes_equals(void* pa, void* pb, int size)
return true; return true;
} }

View file

@ -86,3 +86,4 @@ extern std::string srs_generate_tc_url(
extern bool srs_bytes_equals(void* pa, void* pb, int size); extern bool srs_bytes_equals(void* pa, void* pb, int size);
#endif #endif

View file

@ -140,3 +140,4 @@ file
mainconfig mainconfig
"" = "MAIN"; "" = "MAIN";

View file

@ -84,3 +84,4 @@ VOID TEST(SampleTest, FastSampleMacrosTest)
EXPECT_DOUBLE_EQ(1.0, 1.0000000000000001); EXPECT_DOUBLE_EQ(1.0, 1.0000000000000001);
EXPECT_NEAR(10, 15, 5); EXPECT_NEAR(10, 15, 5);
} }

View file

@ -62,3 +62,4 @@ public:
}; };
#endif #endif

View file

@ -1268,3 +1268,4 @@ VOID TEST(ProtocolAMF0Test, ObjectEcmaStrict)
EXPECT_EQ(1, arr2->to_strict_array()->count()); EXPECT_EQ(1, arr2->to_strict_array()->count());
EXPECT_EQ(0, arr3->to_ecma_array()->count()); EXPECT_EQ(0, arr3->to_ecma_array()->count());
} }

View file

@ -32,3 +32,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_protocol_amf0.hpp> #include <srs_protocol_amf0.hpp>
#endif #endif

View file

@ -5451,3 +5451,4 @@ VOID TEST(ConfigMainTest, CheckConf_pithy_print)
EXPECT_TRUE(ERROR_SUCCESS != conf.parse(_MIN_OK_CONF"pithy_print{edges 10000;}")); EXPECT_TRUE(ERROR_SUCCESS != conf.parse(_MIN_OK_CONF"pithy_print{edges 10000;}"));
} }
} }

View file

@ -52,3 +52,4 @@ public:
}; };
#endif #endif

View file

@ -66,3 +66,4 @@ VOID TEST(CoreMacroseTest, Check)
EXPECT_TRUE(false); EXPECT_TRUE(false);
#endif #endif
} }

View file

@ -32,3 +32,4 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <string> #include <string>
#endif #endif

View file

@ -1509,3 +1509,4 @@ VOID TEST(KernelUtilityTest, UtilityString)
EXPECT_TRUE(srs_string_ends_with("Hello", "o")); EXPECT_TRUE(srs_string_ends_with("Hello", "o"));
EXPECT_TRUE(srs_string_ends_with("Hello", "lo")); EXPECT_TRUE(srs_string_ends_with("Hello", "lo"));
} }

View file

@ -93,3 +93,4 @@ public:
}; };
#endif #endif

View file

@ -5598,3 +5598,4 @@ VOID TEST(ProtocolRTMPTest, RTMPHandshakeBytes)
EXPECT_TRUE(bytes.s0s1s2 != NULL); EXPECT_TRUE(bytes.s0s1s2 != NULL);
} }

View file

@ -108,3 +108,4 @@ public:
}; };
#endif #endif