Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a frame loss situation when using multiple channels #16

Open
gczhcm opened this issue Feb 13, 2019 · 4 comments
Open

There is a frame loss situation when using multiple channels #16

gczhcm opened this issue Feb 13, 2019 · 4 comments

Comments

@gczhcm
Copy link

gczhcm commented Feb 13, 2019

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,&timesTamp); }
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
image

@Ansersion
Copy link
Owner

Maybe you can refer to #6 to enlarge the rtp buffer.
By the way, MyRTPTCPSession::GetMyRTPData is not multi-thread safe.

@gczhcm
Copy link
Author

gczhcm commented Feb 14, 2019

image
how to set buf size of rtp with tcp

@gczhcm
Copy link
Author

gczhcm commented Feb 14, 2019

image
there is not tcp

@Ansersion
Copy link
Owner

I‘ll be appreciate if you can help me to capture the packets with wireshark and send it to [email protected] to give me more info to find the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants