Commit 31988d0d by xiongziliang

初步修复windows下编译问题

parent afdf028d
......@@ -81,7 +81,7 @@ Sdp::Ptr Factory::getSdpByTrack(const Track::Ptr &track) {
Track::Ptr Factory::getTrackBySdp(const SdpTrack::Ptr &track) {
if (strcasestr(track->_codec.data(), "mpeg4-generic") != nullptr) {
if (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 (strcasestr(track->_codec.data(), "h264") != nullptr) {
if (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 (strcasestr(track->_codec.data(), "h265") != nullptr) {
if (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};
......
......@@ -26,8 +26,12 @@
#include "HttpCookie.h"
#include "Util/util.h"
using namespace toolkit;
#if defined(_WIN32)
#include "strptime_win.h"
#endif
using namespace toolkit;
namespace mediakit {
void HttpCookie::setPath(const string &path){
......
......@@ -26,8 +26,8 @@
#include "WebSocketSplitter.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
//#include <sys/socket.h>
//#include <arpa/inet.h>
#include "Util/logger.h"
#include "Util/util.h"
using namespace toolkit;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论