[FFmpeg-devel] [RFC] libavformat/avio.h API cleanup

Nicolas George nicolas.george
Sun Mar 6 18:20:01 CET 2011


Le sextidi 16 vent?se, an CCXIX, Stefano Sabatini a ?crit?:
> > URL_RDONLY
> > URL_WRONLY
> > URL_RDWR
> > URL_FLAG_NONBLOCK
> Maybe we should add FLAG to the other constants.

RDONLY / WRONLY / RDWR are not really flags: flags are usually supposed to
be booleans, they are there or not.

I think this is an historical misfeature of Unix to have these three modes
and not FLAG_READ and FLAG_WRITE, with READ_WRITE = FLAG_READ | FLAG_WRITE.
ffmpeg just imitated it.

>> url_exist
> This function is problematic:
> http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/102825

Summary: the function opens to check for existence, this can be wrong (if
the permissions are insufficient) or problematic (on FIFOs) in some
situations.

Having a mode of open that requests neither read nor write would be a
solution to say that we want to just check for existence.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110306/6158a923/attachment.pgp>



More information about the ffmpeg-devel mailing list