| 149 | } |
| 150 | |
| 151 | bool IsIOError(int error) { |
| 152 | switch (error) { |
| 153 | case AVERROR(EIO): |
| 154 | case AVERROR(ETIMEDOUT): |
| 155 | case AVERROR(EPROTO): |
| 156 | case AVERROR(EADDRINUSE): |
| 157 | case AVERROR(EADDRNOTAVAIL): |
| 158 | case AVERROR(ENETDOWN): |
| 159 | case AVERROR(ENETUNREACH): |
| 160 | case AVERROR(ENETRESET): |
| 161 | case AVERROR(ECONNABORTED): |
| 162 | case AVERROR(ECONNRESET): |
| 163 | case AVERROR(ECONNREFUSED): |
| 164 | case AVERROR(EHOSTUNREACH): |
| 165 | #ifndef _WIN32 |
| 166 | case AVERROR(ESHUTDOWN): |
| 167 | case AVERROR(EHOSTDOWN): |
| 168 | #endif |
| 169 | return true; |
| 170 | default: |
| 171 | return false; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | std::string AVErrorToString(int ret) { |
| 176 | char error[1024]; |
no outgoing calls
no test coverage detected