[FFmpeg-devel] [PATCH][1/4] URLProtocol extensions

Michael Niedermayer michaelni
Thu Nov 22 19:12:33 CET 2007


On Thu, Nov 22, 2007 at 02:49:01PM +0000, Bj?rn Axelsson wrote:
> Extend URLProtocol with new function pointers and api functions for
> url_read_play(), url_read_pause() and url_read_seek().

please give the functions some prefix like av_
doing something stupid because the code is then consistently stupid
does not seem like a very good idea IMHO ;)

[...]
> +int url_read_seek(URLContext *h,
> +        int stream_index, int64_t timestamp, int flags)

nitpick:

int url_read_seek(URLContext *h,
                  int stream_index, int64_t timestamp, int flags)

[...]
> +/**
> + * Seek to a given timestamp relative to some component stream.
> + * Only meaningful if using a network streaming protocol (e.g. MMS).

> + * @param stream_index The stream index that the timestamp is relative to.
> + * May be -1, in which case the timestamp is interpreted as time from the
> + * beginning of the presentation. This parameter is not guaranteed to be
> + * supported by the protocol, in which case it will be ignored.

what happens with the units in which timestamp is specified ?
with stream_index== -1 its AV_TIME_BASE with != -1 its (or should be) the
timebase of the stream


> + * @param flags selects which direction should be preferred if no exact
> + * match is available. This parameter is not guaranteed to be supported by the
> + * protocol, in which case it will be ignored.
> + * @return >= 0 on success (but not necessarily the new offset)
> + */
> +int url_read_seek(URLContext *h,
> +        int stream_index, int64_t timestamp, int flags);
> +

if the return should optionally be the new offset then it should be int64_t

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071122/6b128ed1/attachment.pgp>



More information about the ffmpeg-devel mailing list