[FFmpeg-devel] [PATCH] Add AVIO_FLAG_DIRECT.

Clément Bœsch ubitux at gmail.com
Wed Mar 28 23:13:00 CEST 2012


On Wed, Mar 28, 2012 at 10:26:35PM +0200, Reimar Döffinger wrote:
> Allows avoiding the buffer when using avio read and write functions.
> The test does not work: It works for testing reading, but for
> writing avio_flags never gets set in the ffmpeg.c part of the change.
> 
> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> ---
>  ffmpeg.c                    |    2 +-
>  libavformat/avformat.h      |    2 ++
>  libavformat/avio.h          |   13 +++++++++++++
>  libavformat/aviobuf.c       |   31 ++++++++++++++++++++++---------
>  libavformat/options_table.h |    2 ++
>  libavformat/utils.c         |    2 +-
>  tests/fate/demux.mak        |    3 +++
>  7 files changed, 44 insertions(+), 11 deletions(-)
> 
[...]
> +
> +     /**
> +      * avoi_read and avio_write should if possible be satisfied directly
> +      * instead of going through a buffer.
> +      */
> +     int direct;
>  } AVIOContext;
>  
>  /* unbuffered I/O */
> @@ -320,6 +326,13 @@ int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen);
>  #define AVIO_FLAG_NONBLOCK 8
>  
>  /**
> + * Use direct mode.
> + * avoi_read and avio_write should if possible be satisfied directly
> + * instead of going through a buffer.
> + */

I can't comment much on the patch, but the "avoi" bug me a bit :)

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120328/a44ce13b/attachment.asc>


More information about the ffmpeg-devel mailing list