Hello,
I'm currently writing a video streaming app that uses the ffmpeg libraries.
I'm dealing with a situation where I'm preparing an instance of
AVFormatContext by calling avformat_open_input. I'm using this over a
network under RTSP and I need to handle cases where a connection cannot be
established. I figured the best way to go about this is to add a connection
timeout of around 5-10 seconds, but I just can't seem to figure out how to
get this idea to work. Any help is greatly appreciated.
code:
if(avformat_open_input(&formatCtx, "rtsp://192.168.0.100/1", NULL,
NULL)!=0){
LOGI(".100 not working... trying .101");
formatCtx = NULL;
if(avformat_open_input(&formatCtx, "rtsp://192.168.0.101/1", NULL,
NULL)!=0)
return -1; // Couldn't open file
Thanks!
--
Ryan
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user