mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-06 12:13:49 +08:00
修复Windows下可能编译失败的问题
This commit is contained in:
parent
62f1476666
commit
858d2996c4
|
@ -1 +1 @@
|
|||
Subproject commit b1ae63bfc9b6b0098cb0ee697540eba42a7fd7a3
|
||||
Subproject commit 95aadf51026c37e94d15b3d3a06b9df842d881e1
|
|
@ -81,7 +81,7 @@ Sdp::Ptr Factory::getSdpByTrack(const Track::Ptr &track) {
|
|||
|
||||
|
||||
Track::Ptr Factory::getTrackBySdp(const SdpTrack::Ptr &track) {
|
||||
if (strcasecmp(track->_codec.data(), "mpeg4-generic") == 0) {
|
||||
if (toolkit::strcasecmp(track->_codec.data(), "mpeg4-generic") == 0) {
|
||||
string aac_cfg_str = FindField(track->_fmtp.c_str(), "config=", nullptr);
|
||||
if (aac_cfg_str.size() != 4) {
|
||||
aac_cfg_str = FindField(track->_fmtp.c_str(), "config=", ";");
|
||||
|
@ -105,7 +105,7 @@ Track::Ptr Factory::getTrackBySdp(const SdpTrack::Ptr &track) {
|
|||
return std::make_shared<AACTrack>(aac_cfg);
|
||||
}
|
||||
|
||||
if (strcasecmp(track->_codec.data(), "h264") == 0) {
|
||||
if (toolkit::strcasecmp(track->_codec.data(), "h264") == 0) {
|
||||
string sps_pps = FindField(track->_fmtp.c_str(), "sprop-parameter-sets=", nullptr);
|
||||
if(sps_pps.empty()){
|
||||
return std::make_shared<H264Track>();
|
||||
|
@ -121,7 +121,7 @@ Track::Ptr Factory::getTrackBySdp(const SdpTrack::Ptr &track) {
|
|||
return std::make_shared<H264Track>(sps,pps,0,0);
|
||||
}
|
||||
|
||||
if (strcasecmp(track->_codec.data(), "h265") == 0) {
|
||||
if (toolkit::strcasecmp(track->_codec.data(), "h265") == 0) {
|
||||
//a=fmtp:96 sprop-sps=QgEBAWAAAAMAsAAAAwAAAwBdoAKAgC0WNrkky/AIAAADAAgAAAMBlQg=; sprop-pps=RAHA8vA8kAA=
|
||||
int pt;
|
||||
char sprop_vps[128] = {0},sprop_sps[128] = {0},sprop_pps[128] = {0};
|
||||
|
|
|
@ -41,10 +41,10 @@ void HttpClient::sendRequest(const string &strUrl, float fTimeOutSec) {
|
|||
auto protocol = FindField(strUrl.data(), NULL, "://");
|
||||
uint16_t defaultPort;
|
||||
bool isHttps;
|
||||
if (strcasecmp(protocol.data(), "http") == 0) {
|
||||
if (toolkit::strcasecmp(protocol.data(), "http") == 0) {
|
||||
defaultPort = 80;
|
||||
isHttps = false;
|
||||
} else if (strcasecmp(protocol.data(), "https") == 0) {
|
||||
} else if (toolkit::strcasecmp(protocol.data(), "https") == 0) {
|
||||
defaultPort = 443;
|
||||
isHttps = true;
|
||||
} else {
|
||||
|
|
|
@ -208,7 +208,7 @@ inline bool HttpSession::checkLiveFlvStream(){
|
|||
//未找到".flv"后缀
|
||||
return false;
|
||||
}
|
||||
if(strcasecmp(pos,".flv") != 0){
|
||||
if(toolkit::strcasecmp(pos,".flv") != 0){
|
||||
//未找到".flv"后缀
|
||||
return false;
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ inline bool HttpSession::Handle_Req_GET(int64_t &content_len) {
|
|||
/////////////HTTP连接是否需要被关闭////////////////
|
||||
GET_CONFIG_AND_REGISTER(uint32_t,reqCnt,Http::kMaxReqCount);
|
||||
|
||||
bool bClose = (strcasecmp(_parser["Connection"].data(),"close") == 0) || ( ++_iReqCnt > reqCnt);
|
||||
bool bClose = (toolkit::strcasecmp(_parser["Connection"].data(),"close") == 0) || ( ++_iReqCnt > reqCnt);
|
||||
//访问的是文件夹
|
||||
if (strFile.back() == '/') {
|
||||
//生成文件夹菜单索引
|
||||
|
@ -551,7 +551,7 @@ string HttpSession::urlDecode(const string &str){
|
|||
auto ret = strCoding::UrlUTF8Decode(str);
|
||||
#ifdef _WIN32
|
||||
GET_CONFIG_AND_REGISTER(string,charSet,Http::kCharSet);
|
||||
bool isGb2312 = !strcasecmp(charSet.data(), "gb2312");
|
||||
bool isGb2312 = !toolkit::strcasecmp(charSet.data(), "gb2312");
|
||||
if (isGb2312) {
|
||||
ret = strCoding::UTF8ToGB2312(ret);
|
||||
}
|
||||
|
@ -570,7 +570,7 @@ inline bool HttpSession::emitHttpEvent(bool doInvoke){
|
|||
///////////////////是否断开本链接///////////////////////
|
||||
GET_CONFIG_AND_REGISTER(uint32_t,reqCnt,Http::kMaxReqCount);
|
||||
|
||||
bool bClose = (strcasecmp(_parser["Connection"].data(),"close") == 0) || ( ++_iReqCnt > reqCnt);
|
||||
bool bClose = (toolkit::strcasecmp(_parser["Connection"].data(),"close") == 0) || ( ++_iReqCnt > reqCnt);
|
||||
auto Origin = _parser["Origin"];
|
||||
/////////////////////异步回复Invoker///////////////////////////////
|
||||
weak_ptr<HttpSession> weakSelf = dynamic_pointer_cast<HttpSession>(shared_from_this());
|
||||
|
@ -637,7 +637,7 @@ inline bool HttpSession::Handle_Req_POST(int64_t &content_len) {
|
|||
content_len = -1;
|
||||
auto parserCopy = _parser;
|
||||
std::shared_ptr<uint64_t> recvedContentLen = std::make_shared<uint64_t>(0);
|
||||
bool bClose = (strcasecmp(_parser["Connection"].data(),"close") == 0) || ( ++_iReqCnt > maxReqCnt);
|
||||
bool bClose = (toolkit::strcasecmp(_parser["Connection"].data(),"close") == 0) || ( ++_iReqCnt > maxReqCnt);
|
||||
|
||||
_contentCallBack = [this,parserCopy,totalContentLen,recvedContentLen,bClose](const char *data,uint64_t len){
|
||||
*(recvedContentLen) += len;
|
||||
|
|
|
@ -39,7 +39,7 @@ MediaPlayer::~MediaPlayer() {
|
|||
}
|
||||
void MediaPlayer::play(const char* strUrl) {
|
||||
string strPrefix = FindField(strUrl, NULL, "://");
|
||||
if ((strcasecmp(_strPrefix.data(),strPrefix.data()) != 0) || strPrefix.empty()) {
|
||||
if ((toolkit::strcasecmp(_strPrefix.data(),strPrefix.data()) != 0) || strPrefix.empty()) {
|
||||
//协议切换
|
||||
_strPrefix = strPrefix;
|
||||
_parser = PlayerBase::createPlayer(strUrl);
|
||||
|
|
|
@ -48,10 +48,10 @@ PlayerBase::Ptr PlayerBase::createPlayer(const char* strUrl) {
|
|||
ptr->teardown();
|
||||
};
|
||||
string prefix = FindField(strUrl, NULL, "://");
|
||||
if (strcasecmp("rtsp",prefix.data()) == 0) {
|
||||
if (toolkit::strcasecmp("rtsp",prefix.data()) == 0) {
|
||||
return PlayerBase::Ptr(new RtspPlayerImp(),releasePlayer);
|
||||
}
|
||||
if (strcasecmp("rtmp",prefix.data()) == 0) {
|
||||
if (toolkit::strcasecmp("rtmp",prefix.data()) == 0) {
|
||||
return PlayerBase::Ptr(new RtmpPlayerImp(),releasePlayer);
|
||||
}
|
||||
return PlayerBase::Ptr(new RtspPlayerImp(),releasePlayer);
|
||||
|
|
|
@ -101,7 +101,7 @@ string FindField(const char* buf, const char* start, const char *end,int bufSize
|
|||
struct StrCaseCompare
|
||||
{
|
||||
bool operator()(const string& __x, const string& __y) const
|
||||
{return strcasecmp(__x.data(), __y.data()) < 0 ;}
|
||||
{return toolkit::strcasecmp(__x.data(), __y.data()) < 0 ;}
|
||||
};
|
||||
typedef map<string,string,StrCaseCompare> StrCaseMap;
|
||||
|
||||
|
|
|
@ -444,7 +444,7 @@ void RtspSession::onAuthDigest(const weak_ptr<RtspSession> &weakSelf,const strin
|
|||
}
|
||||
|
||||
auto good_response = MD5( encrypted_pwd + ":" + nonce + ":" + MD5(string("DESCRIBE") + ":" + uri).hexdigest()).hexdigest();
|
||||
if(strcasecmp(good_response.data(),response.data()) == 0){
|
||||
if(toolkit::strcasecmp(good_response.data(),response.data()) == 0){
|
||||
//认证成功!md5不区分大小写
|
||||
onAuthSuccess(weakSelf);
|
||||
TraceL << "onAuthSuccess";
|
||||
|
|
Loading…
Reference in New Issue
Block a user