[FFmpeg-devel] Meaningful return codes (was [PATCH 7/9] Replace AVERROR_NOTSUPP by AVERROR(ENOSYS))

Michael Niedermayer michaelni
Fri Jul 20 12:39:49 CEST 2007


On Fri, Jul 20, 2007 at 12:07:30PM +0200, Michael Niedermayer wrote:
> what makes sense is a generic solution, that is one which tells you
> per indexes into an AVOption array which combination of fields are
> causing a problem and then somehow return a list describing alternative
> minimal changes needed to avoid the problem
> like
> if someone tried mpeg4 + 4mv + ilme + simple_profile + 2_b_frames
> {flags, 4mv, 0}, {profile, main}
> {flags, ilme, 0}, {profile, main}
> {flags, ilme, 0}, {b_frames, 0}
> now tell me how do you want to describe these 3 alternative solutions
> with an error code

to elaborate on this a little more ....
if for example you would return profile_invalid
while your GUI tries to encode to a hw device which doesnt support main
profile (very likely situation) you would be stuck with your error code
if OTOH the thing would say ilme not supported while your source
material is interlaced (and your GUI knows this) you would as well end
with a near useless video

now whats left? returning first 4MV_not supported and then on the next
call b_frames not supported wont lead to a valid combination you still
have to at least change either the profile or loose the interlacing


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070720/d8d2d46c/attachment.pgp>

More information about the ffmpeg-devel mailing list