Open gczhcm opened 5 years ago
Maybe you can refer to #6 to enlarge the rtp buffer. By the way, MyRTPTCPSession::GetMyRTPData is not multi-thread safe.
how to set buf size of rtp with tcp
there is not tcp
I‘ll be appreciate if you can help me to capture the packets with wireshark and send it to ansersion@gmail.com to give me more info to find the problem.
In the case of acquiring multiple video streams and one thread per path, there is a phenomenon of frame dropping. By capturing the packet, the machine has received the lost packet, but the program has not received it. Below is my code.
bool RtspClient::isPlay() { bool isplay=false; pthread_mutex_lock( &this->playMutex ); if(this->Del==0&&this->used==1) isplay=true; pthread_mutex_unlock( &this->playMutex ); return isplay; } uint32_t timesTamp=0; while( Client->isPlay()) { uint8_t* ret = Client->GetMediaData("video", buf, &size, bufSize,×Tamp); }
I added the get rtp timestamp and found that there is a frame loss situation at 25fps. I use the way of RTSP over TCP to get data. I want to ask the function uint8_t MyRTPTCPSession::GetMyRTPData(uint8_t data_buf, size_t * size, unsigned long timeout_ms) whether it is multi-thread safe