2014-06-30 04:13:46 -0600 | received badge | ● Editor (source) |
2014-06-30 04:12:25 -0600 | asked a question | cvQueryFrame returns over 100 seconds with 20 threads.. I'm using OpenCV 2.4.2 playing 20 RTSP videos in an application. That application contains 20 threads which manage 1 rtsp connection per thread. Each thread calls cvCaptureFromFile for connection, calls cvQueryFrame for grabbing images. For just one thread running, after successful connection to the rtsp video, when I remove rtsp video source, cvQueryFrame returns in 10 seconds. it's ignorable enough. But when it runs 20 threads, (getting the same video A) when I remove rtsp video source(A), cvQueryFrame returns over 150 seconds (for each thread) It's too long to wait, so the application become not to react user's control anymore. Is there any solution to shorten response time(the time to return: cvQueryFrame)? Can't I use cvQueryFrame in threads? it works like running within just one thread.. ====================== my code in capture thread'dwTickElapsed' is over 100 seconds when the video source removed under the situation which the app runs 20 thread capturing the same video. |