[FFmpeg-devel] More specific error codes
Andrey Utkin
andrey.krieger.utkin at gmail.com
Mon Sep 29 12:19:02 CEST 2014
At last I got back to this issue.
First I thought of adding such new error codes:
#define AVERROR_BAD_REQUEST FFERRTAG(0xF8,'4','0','0') ///<
Remote server returns 400 Bad Request reply
#define AVERROR_AUTH_FAILED FFERRTAG(0xF8,'4','0','1') ///<
Unauthorized by remote server
#define AVERROR_ACCESS_DENIED FFERRTAG(0xF8,'4','0','3') ///<
Forbidden, access denied etc.
#define AVERROR_RESOURCE_NOT_FOUND FFERRTAG(0xF8,'4','0','4') ///<
Media resource not found
#define AVERROR_OTHER_4XX FFERRTAG(0xF8,'4','X','X') ///<
Generic error value for other 4xx replies
#define AVERROR_SERVER_ERROR FFERRTAB(0xF8,'5','X','X') ///<
Internal error on server (remote site), 5xx error
Then i had an idea that
AVERROR(EACCES) could replace AVERROR_ACCESS_DENIED, and
AVERROR(ENOENT) could replace AVERROR_RESOURCE_NOT_FOUND. The downside
of such way is inconsistence of representation of HTTP/RTSP status
codes sets.
What do you think about it? Which would you prefer?
--
Andrey Utkin
More information about the ffmpeg-devel
mailing list