sess.EndDataAccess();//数据包接收结束 #ifndef RTP_SUPPORT_THREAD status = sess.Poll(); checkerror(status); #endif // RTP_SUPPORT_THREAD RTPTime::Wait(RTPTime(1, 0)); } sess.BYEDestroy(RTPTime(10, 0), 0, 0); //卸载套接字 #ifdef RTP_SOCKETTYPE_WINSOCK WSACleanup(); #endif //...
#ifndef RTP_SUPPORT_THREAD status = sess.Poll(); checkerror(status); #endif // RTP_SUPPORT_THREAD RTPTime::Wait(RTPTime(1,0)); } sess.BYEDestroy(RTPTime(10,0),0,0); #ifdef WIN32 WSACleanup(); #endif // WIN32 return 0; } 编译:g++ -o example1 example1.cpp -I /usr/local/...
sess.EndDataAccess(); #ifndef RTP_SUPPORT_THREAD status =sess.Poll(); checkerror(status);#endif//RTP_SUPPORT_THREAD} sess.BYEDestroy(RTPTime(10,0),0,0);return0; } _build.sh export LD_LIBRARY_PATH=$(pwd)/_install/lib:$LD_LIBRARY_PATHrm ./send ./recv g++ send.cpp -I./_install/...
#ifndef RTP_SUPPORT_THREAD status = sess.Poll(); checkerror(status); #endif // RTP_SUPPORT_THREAD RTPTime::Wait(RTPTime(1,0)); } sess.BYEDestroy(RTPTime(10,0),0,0); #ifdef WIN32 WSACleanup(); #endif // WIN32 return 0; } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12...
实 时传输协议(Real-time Transport Protocol,PRT)是在 Internet 上处理多媒体数据流的一种网络协议,利用它能 够在一对一(unicas,单播)或者一对多(multicas,多播)的网络环境中实现传流媒体数据的实时传输。RTP 通常使用 UDP 来进行 多媒体数据的传输,但如果需要的话可以使用 TCP 或者 ATM 等其它协议。
#ifdef RTP_SUPPORT_THREAD This function checks if there was a RTP error. If so, it displays an error message and exists. void checkerror(int rtperr) { if (rtperr < 0) { std::cout << "ERROR: " << RTPGetErrorString(rtperr) << std::endl; ...
sess.EndDataAccess(); #ifndefRTP_SUPPORT_THREAD status = sess.Poll(); //checkerror(status); #endif//RTP_SUPPORT_THREAD RTPTime::Wait(RTPTime(1,0)); } sess.BYEDestroy(RTPTime(10,0),0,0); return; } Copy lines Copy permalink
#ifndef RTP_SUPPORT_THREAD status = sess.Poll(); checkerror(status); #endif // RTP_SUPPORT_THREAD RTPTime::Wait(RTPTime(1,0)); } sess.BYEDestroy(RTPTime(10,0),0,0); #ifdef WIN32 WSACleanup(); #endif // WIN32 return 0; }编译注意修改每个Source File的code generation下的Use run-...
RTP_SUPPORT_THREAD: Enables support for JThread. RTP_SUPPORT_SDESPRIV: Enables support for RTCP SDES private items. RTP_SUPPORT_PROBATION: If set, a few consecutive RTP packets are needed to validate a member. RTP_SUPPORT_GETLOGINR: If set, the library will use getlogin_r instead of get...
create_source();set rtpsession source entry objectfun handlemessage use mRtpTransmitter->StartThread(); DoStartTransmit()GenerateSdpFile(CLiveConfig* pConfig);/* reference 附录 DoSendFramepFrame->GetType( frametype, typeinitial othermoudle 附录:C++学习记录: c++中的delete和delete[] 昨天写了一篇...