[FFmpeg-devel] [RFC] The meaning of AVERROR_NOTSUPP

Howard Chu hyc
Wed Apr 14 02:09:31 CEST 2010


Stefano Sabatini wrote:
> On date Saturday 2010-04-03 13:31:29 +0200, Stefano Sabatini encoded:
>> On date Saturday 2010-04-03 12:36:01 +0200, Michael Niedermayer encoded:
> [...]
>>> Feature not implemented
>>> and
>>> Implementing this feature is welcome
>>>
>>> are 2 seperate things
>>>
>>> similarly
>>>
>>> "not implementable"
>>> "requested operation nonsensical"
>>> "we dont want this implemented"
>>> "disabled at compile time, rerun configure"
>>>
>>> are all semantically different
>>>
>>> also you cannot redefine the POSIX error codes to mean something else than
>>> they mean.
>>
>> So taking into account the considerations of Howard and yours, it
>> seems that we can agree on simply dropping AVERROR_NOTSUPP and use
>> AVERROR(ENOSYS) instead.
>>
>> We'll use AVERROR_PATCHWELCOME when a feature is not implemented and
>> we want and can implement it, and we'll use AVERROR(ENOSYS) in all the
>> other cases (feature non-implementable, requested operation
>> nonsensical, feature implementable but we don't want to implement it,
>> feature disabled at compile time etc...).
> [...]
>
> Ping.

 From a reading-the-source perspective this makes sense, but having two 
"not-implemented" error codes makes error checking more cumbersome for callers 
of the API. Is it actually useful for callers to see the difference? If not, 
defining AVERROR_PATCHWELCOME to AVERROR(ENOSYS) seems like the easiest approach.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/



More information about the ffmpeg-devel mailing list