[FFmpeg-devel] [PATCH] Replace ENOSYS by ENOTSUP
Ramiro Ribeiro Polla
Tue Aug 7 04:19:49 CEST 2007
Michael Niedermayer wrote:
> On Fri, Jul 20, 2007 at 03:54:16PM +0200, Panagiotis Issaris wrote:
>> Op 20-jul-07, om 10:10 heeft Panagiotis Issaris het volgende geschreven:
>>> Op 19-jul-07, om 23:36 heeft Michael Niedermayer het volgende
>>>> On Thu, Jul 19, 2007 at 07:12:37PM +0200, Panagiotis Issaris wrote:
>>>>> Replace ENOSYS by ENOTSUP as in this case the problem is not
>>>>> really a function
>>>>> which is not available, but a media type which is not supported.
>> On #ffmpeg someone mentioned that Cygwin does not have ENOTSUP. Add a
>> define for it in os_support.h in case cygwin is used?
> adding a
> #define ENOTSUP blah
> is not a solution for systems which lack ENOTSUP as the user app should be
> able to test for AVERROR(ENOTSUP) and lavc has no buisness with defining
> ENOTSUP in a public header ...
 has the errors and the according strerror() messages supported in
MinGW. It only implements error codes from msvcrt, so it has no business
defining ENOTSUP. And it seems to have no equivalent or similar error.
I've looked through where not-implemented/supported stuff return errors.
Some return -1, others ignore it, and some even assert(0). It's a mess
the way it is.
I agree with Takis that there should be more error codes. Not one for
every possible parameter, as was being discussed in , but rather a
few related to FFmpeg's development.
2 that come to mind would be:
AVERROR_NOTSUPP not supported because of limitation in standard/whatever.
AVERROR_NOTIMPL or AVERROR_NOTYET, for not yet implemented in FFmpeg.
(patches welcome =)
To avoid error number clashes, -MKTAG could be used with 4 letters that
indicate the error. It is very unlikely that an error on any system has
such a number. Attached patch is an example for this.
I want to make things compile properly again on MinGW. Is it a must that
POSIX errors are used?
P.S: As a last resort we could return EAGAIN as in "try again with a
newer revision". (just kidding =).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1060 bytes
Desc: not available
More information about the ffmpeg-devel