bytedeco/javacv

Is there some method to distinguish network error or server reject error

Open

#1,970 opened on Jan 16, 2023

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hi, I'm using ffmpegrecorder to make rtmp push , when something wrong, I can get error message from start/record method, because I want to do more retry times to half an hour when network is error, and only 10 seconds when server reject. Is there some method can I get the error reason?

I got the error message from exception, include the socket error -32/-104/-110/... error code, As I know: -110/-111 means connect failed/ read/write timeout.
-104 is reset by server other code I'm not sure.

but the code, I can't get it easily, must parse from the exception string.

Is there some advice about my propose? thank you !

Contributor guide