- C/C++ code
m_hWnd = hWnd; RTPSessionParams sessParams; double frameRate = 1.0/30.0; sessParams.SetOwnTimestampUnit(frameRate); //30 video frames per second sessParams.SetUsePollThread(1); //background thread to call virtual callbacks - set by default, but just to be sure sessParams.SetMaximumPacketSize(MAX_PACKET_SIZE+12); RTPUDPv4TransmissionParams transParams; transParams.SetPortbase(port); int status = Create(sessParams, &transParams); if(status < 0) { //std::cerr << RTPGetErrorString(status) << std::endl; string str = RTPGetErrorString(status); //return str; } SetDefaultPayloadType(96); SetDefaultMark(false); SetDefaultTimestampIncrement(10); RTPTime delay(0.020);
之前写过一个程序。。是debug版本的。。这一段初始化代码是没有问题的
我现在写一个ActiveX控件。。release版本下调用这段初始化代码。。create处给出couldn't create RTP or RTCP socket
求指点。。可能是什么原因。。怎么改?
另外。。。jrtplib和jthread都是release版本的!!!
------解决方案--------------------------------------------------------