From 2a518493d7dfccb3800392f61c84b61ceedf5f95 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 11 Dec 2019 20:01:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84rtp=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_rtp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_rtp.cpp b/tests/test_rtp.cpp index 1be10ceb..7e23e8e6 100644 --- a/tests/test_rtp.cpp +++ b/tests/test_rtp.cpp @@ -53,6 +53,7 @@ static bool loadFile(const char *path){ uint32_t timeStamp_last = 0; uint16_t len; char rtp[2 * 1024]; + struct sockaddr addr = {0}; while (true) { if (2 != fread(&len, 1, 2, fp)) { WarnL; @@ -82,8 +83,7 @@ static bool loadFile(const char *path){ } timeStamp_last = timeStamp; - - RtpSelector::Instance().inputRtp(rtp,len, nullptr); + RtpSelector::Instance().inputRtp(rtp,len, &addr); } fclose(fp); return true; @@ -103,6 +103,8 @@ int main(int argc,char *argv[]) { rtspSrv->start(554);//默认554 rtmpSrv->start(1935);//默认1935 httpSrv->start(80);//默认80 + //此处可以选择MP4V-ES或MP2P + mINI::Instance()[RtpProxy::kRtpType] = "MP4V-ES"; loadFile(argv[1]); #else ErrorL << "please ENABLE_RTPPROXY and then test";