On 04/10/2011 12:52 AM, Stefano Sabatini wrote:
> Other notes:
>
> * avio_check() or ffurl_check()?
It would be used by ffmpeg so avio_check()
> * for checking existence avio_check() is slightly more awkward than
> url_exist(), possibilities are: keep url_exist() as inline and make
> it use avio_check(), or simply drop it, as I tend to prefer in this
> case.
url_exists will remain as deprecated api till 0.8 I guess.
> * unfortunately there is no way to check for the existence of a
> resource without to call ffurl_alloc() in avio_check(). A
> possibility would be to implement a function
> av_get_protocol_from_url() and invoke a check_url callback defined
> directly on the protocol, with no need to allocate a protocol
> context (implies direct access of the protocol structure).
I'd consider that as a later improvement, possibly within the whole
proto layer overhaul. We are talking about a slow path api.
> * ffurl_alloc() returns AVERROR(ENOENT) in case of an unknown protocol
> scheme (e.g. for "foo:bar.avi"). This means in particular that
> avio_check("foo:bar.avi", 0) will return AVERROR(ENOENT), which
> doesn't sound too correct. Hint: maybe we could make use of
> AVERROR_PROTOCOL_NOT_FOUND, even if in this case it should be more
> correct to say "unknown/unsupported protocol".
It could be introduced later as well, I do agree it might be nicer to
report that properly. Surely we improved a lot already on error reporting =)
lu
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel