[FFmpeg-devel] rtsp/rtp - blocking loop in udp_read_packet
Anthony Champagne
anthony.champagne
Wed Apr 23 10:50:49 CEST 2008
Hi,
I'm trying to use your library in a c++ project in order to access multiple
ip camera through rtsp/rtp.
My problem is that sometimes the camera doesn't send me udp packet anymore.
The consequence is a blocking loop in udp_read_packet() (rtsp.c).
I want to be able to get out of this function when no packets received in
100ms or more, and the callback url_interrupt_cb is a good choice for that.
But in a multithreaded use of libavformat, with multiple opened files, there
is no mean to know what FormatContext (or url context handle) is calling
url_interrupt_cb. Curiously, this function (declared in avio.c) is the ones
that can't take an URLContext pointer parameter.
What do you think of, could it be part of a patch ? or is there another way
(except threadlock entire av_read_packet() call with a previously
initialized global variable with format context) to achieve my needs ?
Anthony Champagne
More information about the ffmpeg-devel
mailing list