Panagiotis Issaris takis.issaris
Thu Jul 19 19:22:00 CEST 2007


Op 19-jul-07, om 18:57 heeft Michael Niedermayer het volgende  

> Hi
> On Thu, Jul 19, 2007 at 06:42:06PM +0200, Panagiotis Issaris wrote:
>> Hi
>> Op 19-jul-07, om 17:55 heeft Michael Niedermayer het volgende
>> geschreven:
>>> Hi
>>> On Thu, Jul 19, 2007 at 05:37:48PM +0200, Panagiotis Issaris wrote:
>>>> Hi
>>>> Op 19-jul-07, om 17:30 heeft Michael Niedermayer het volgende
>>>> geschreven:
>>>>> Hi
>>>>> On Thu, Jul 19, 2007 at 02:55:22PM +0200, Panagiotis Issaris  
>>>>> wrote:
>>>>>> The attached patch replaces all occurrances of AVERROR_NOTSUPP  
>>>>>> with
>>>>> ok
>>>> Applied.
>>> ok, also some of these AVERROR(ENOSYS) should be changed to AVERROR
>> According to the OpenGroup website:
>> [ENOSYS] Function not supported.
>> [ENOTSUP] Not supported.
>> It is not really clear to me where the difference lies; how would you
>> interpret them?
>> The manpages on my GNU/Linux system explain ENOTSUP as being
>> "Operation not supported".
> info libc says:
>  -- Macro: int ENOSYS
>      Function not implemented.  This indicates that the function  
> called
>      is not implemented at all, either in the C library itself or  
> in the
>      operating system.  When you get this error, you can be sure that
>      this particular function will always fail with `ENOSYS' unless  
> you
>      install a new version of the C library or the operating system.
>  -- Macro: int ENOTSUP
>      Not supported.  A function returns this error when certain
>      parameter values are valid, but the functionality they request is
>      not available.  This can mean that the function does not  
> implement
>      a particular command or option value or flag bit at all.  For
>      functions that operate on some object given in a parameter, such
>      as a file descriptor or a port, it might instead mean that only
>      _that specific object_ (file descriptor, port, etc.) is unable to
>      support the other parameters given; different file descriptors
>      might support different ranges of parameter values.
>      If the entire function is not available at all in the
>      implementation, it returns `ENOSYS' instead.
> note, i do not know if this is GNUs, POSIXs, ISOs or whoever elses
> definition

I see. Thanks for the information!

Related to this: As I've mentioned before on this list, one of the  
I'd like to change in libavcodec is the handling of errors. I'd like
returncodes indicating failure to carry information about the cause  
of the
failure. So, for example, in the case of mpegvideo_enc.c, I'd prefer to
see MPV_encode_init() return different errorcodes for different kinds of
failures occurring instead of the currently used "return -1;" for all

I'm not sure about the granularity though...

Would something like this be nice & useful?

#define AVERROR_PIXFMT_NOTSUP       <somevalue>
#define AVERROR_BFRAMES_NOTSUP      <somevalue+1>
#define AVERROR_RC_PARSE_ERROR      <somevalue+2>

Or is it prefered to only use the standard error-codes?

With friendly regards,
vCard: http://issaris.org/pi.vcf
PGP key: http://issaris.org/pi.key

More information about the ffmpeg-devel mailing list