[FFmpeg-devel] network blocking

Tamas Selmeci tselmeci
Fri Feb 26 19:57:26 CET 2010


Hi all!

Reimar D?ffinger wrote:

> As Ronald said there is a solution and I'm not convince that libav-user
> wouldn't have been a better place to ask.

Ronald has already confirmed that I tried first on libav-user, from 
where I got no response.

Today I've started investigating the related libav functions, and it 
turned out to me, that url_interrupt_cb(...) is something that can be 
very useful for me. And Ronald has also suggested me this function. 
Perhaps it was a little early sending that email requesting help, but I 
supposed it was going to be much harder to find something useful.

> Apart from that I doubt this or fiddling with timeouts is a good solution
> (though you did not mention what the real problem you are trying to solve is),
> both approaches are breaking your application with any kind of unreliable internet
> connection (yes, there are internet connections that might take 20 seconds or more
> to connect but otherwise can still flawlessly play a mp3 stream).

This is an embedded mp3 netradio stream player and will have internet 
connection through rather slow and unreliable (at least in comparison to 
ethernet) devices, like wifi or bluetooth.

I've also experienced that despite sometimes ffmpeg seems to connect to 
a server hardly, it can provide stable stream transfer. The problem is 
that the player of mine will have an unreliable internet connection (and 
it's not possible to operate through ethernet/cable), so we must always 
be prepared to some kind of network disconnect. Furthermore, this 
application must provide a quick response to user actions, so waiting 
for 20-60 seconds for a broken stream is not acceptable, since the user 
may already have instructed the player to jump to the next track - 
responsiveness is crucial. That's why I need to know within 1-2 seconds 
that there's a problem, and behave accordingly: trying to reconnect or 
anything else.

Thanks for the help!

Regards,
-- 
[- Selmeci, Tamas
[- www.open-st.eu



More information about the ffmpeg-devel mailing list