[FFmpeg-devel] [RFC] The meaning of AVERROR_NOTSUPP
Wed Apr 14 02:54:45 CEST 2010
On Tue, Apr 13, 2010 at 05:09:31PM -0700, Howard Chu wrote:
> 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
>>>> Implementing this feature is welcome
>>>> are 2 seperate things
>>>> "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
>>>> 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...).
> 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.
an application might benefit from knowing if something is not supported
because it was
1. disabled at compile time
2. impossible to support
3. unsupported but possible
because in 1. it could recommand the user to recompile
and in 3. it could suggest to try latest svn of the libs
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel