mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
完善rtp测试工具
This commit is contained in:
parent
99c1dd339f
commit
2a518493d7
@ -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){
|
|||||||
}
|
}
|
||||||
|
|
||||||
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[]) {
|
|||||||
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";
|
||||||
|
Loading…
Reference in New Issue
Block a user