Oh, my fault. I had to mention that I can't use threads and locking mechanisms for efficiency reasons (highloaded application). I need to make rtsp/rtp stream processing with least possible overhead. Event loop is libevent-based. But thanks you, again, for advices!:) I have no questions anymore
On Fri, Feb 24, 2012 at 4:05 PM, Andrey Utkin < [email protected]> wrote: > 2012/2/24 Dmitry Volyntsev <[email protected]>: > > OK, if so. May be I wrong. > > Could you, please, explain how can I integrate the libavformat rtsp > protocol > > to my program, in case it already has own global event loop. > > Using libavformat in case of rtsp format leads to blockage of my event > loop > > from time to time. > > I don't quite know yet how your event loop looks like, and what > functions it serves. > I'd propose running libavformat reading in a separate thread. > Using struct/object with context data of your application, and mutex, > you can track how much data you have processed, when did you receive > last data portion, use that data actually etc. > For immediate interruption (closing) of stream reading, use > avio_open2() int_cb parameter (see libavformat/avio.h). > > -- > Andrey Utkin > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user > -- Be happy, Best regards, Dmitry Volyntsev
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
