Commit 2a518493 by xiongziliang

完善rtp测试工具

parent 99c1dd33
...@@ -53,6 +53,7 @@ static bool loadFile(const char *path){ ...@@ -53,6 +53,7 @@ static bool loadFile(const char *path){
uint32_t timeStamp_last = 0; uint32_t timeStamp_last = 0;
uint16_t len; uint16_t len;
char rtp[2 * 1024]; char rtp[2 * 1024];
struct sockaddr addr = {0};
while (true) { while (true) {
if (2 != fread(&len, 1, 2, fp)) { if (2 != fread(&len, 1, 2, fp)) {
WarnL; WarnL;
...@@ -82,8 +83,7 @@ static bool loadFile(const char *path){ ...@@ -82,8 +83,7 @@ static bool loadFile(const char *path){
} }
timeStamp_last = timeStamp; timeStamp_last = timeStamp;
RtpSelector::Instance().inputRtp(rtp,len, &addr);
RtpSelector::Instance().inputRtp(rtp,len, nullptr);
} }
fclose(fp); fclose(fp);
return true; return true;
...@@ -103,6 +103,8 @@ int main(int argc,char *argv[]) { ...@@ -103,6 +103,8 @@ int main(int argc,char *argv[]) {
rtspSrv->start<RtspSession>(554);//默认554 rtspSrv->start<RtspSession>(554);//默认554
rtmpSrv->start<RtmpSession>(1935);//默认1935 rtmpSrv->start<RtmpSession>(1935);//默认1935
httpSrv->start<HttpSession>(80);//默认80 httpSrv->start<HttpSession>(80);//默认80
//此处可以选择MP4V-ES或MP2P
mINI::Instance()[RtpProxy::kRtpType] = "MP4V-ES";
loadFile(argv[1]); loadFile(argv[1]);
#else #else
ErrorL << "please ENABLE_RTPPROXY and then test"; ErrorL << "please ENABLE_RTPPROXY and then test";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论