Quoting wm4 (2017-08-17 15:01:44)
> Main use-case is proxying avio through a foreign I/O layer and a custom
> AVIO context, without losing latency and performance characteristics.
> ---
>  doc/APIchanges              | 3 +++
>  libavformat/avio.h          | 9 +++++++++
>  libavformat/avio_internal.h | 8 --------
>  libavformat/aviobuf.c       | 2 +-
>  libavformat/rawdec.c        | 2 +-
>  libavformat/rtsp.c          | 2 +-
>  libavformat/version.h       | 2 +-
>  7 files changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 463247f48e..ed90be890d 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -13,6 +13,9 @@ libavutil:     2017-03-23
>  
>  API changes, most recent first:
>  
> +2016-xx-xx - xxxxxxx - lavf 58.1.0 - avio.h
> +  Add avio_read_partial().
> +
>  2017-xx-xx - xxxxxxx - lavu 56.4.0 - imgutils.h
>    Add av_image_fill_black().
>  
> diff --git a/libavformat/avio.h b/libavformat/avio.h
> index e65135ed99..f604c4ad41 100644
> --- a/libavformat/avio.h
> +++ b/libavformat/avio.h
> @@ -331,6 +331,15 @@ void avio_flush(AVIOContext *s);
>   */
>  int avio_read(AVIOContext *s, unsigned char *buf, int size);
>  
> +/**
> + * Read size bytes from AVIOContext into buf. Unlike avio_read(), this is 
> allowed
> + * to read fewer bytes than requested. The missing bytes can be read in the 
> next
> + * call. This always tries to read at least 1 byte.
> + * Useful to reduce latency in certain cases.
> + * @return number of bytes read or AVERROR
> + */
> +int avio_read_partial(AVIOContext *s, unsigned char *buf, int size);

Maybe this would be a good opportunity to make this size_t

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to