On Mon, 04 Mar 2013 23:17:09 +0100, Diego Biurrun <[email protected]> wrote:
> On Mon, Mar 04, 2013 at 11:35:05AM +0100, Anton Khirnov wrote:
> > +    /**
> > +     * The data buffer. It is considered writable if and only if
> > +     * this is the only reference to buffer, in which case
> 
> to the buffer
> 
> > +/**
> > + * Allocate an AVBuffer of the given size using av_malloc().
> > + *
> > + * @return an AVBufferRef of given size or NULL when out of memory
> > + */
> > +AVBufferRef *av_buffer_alloc(int size);
> > +
> > +/**
> > + * Same as av_buffer_alloc(), except the returned buffer will be 
> > initialized
> > + * to zero.
> > + */
> > +AVBufferRef *av_buffer_allocz(int size);
> 
> Please document the parameters.

They are already documented.
I fail to see any advantage in adding one more tautological line

> 
> > +/**
> > + * Create an AVBuffer from an existing array.
> > + *
> > + * If this function is successful, data is owned by the AVBuffer. The 
> > caller may
> > + * only access data through the returned AVBufferRef and references 
> > derived from
> > + * it.
> > + * If this function fails, data is left untouched.
> > + * @param data data array.
> 
> s/.//
> 
> > + * @param size size of data in bytes
> > + * @param free a callback for freeing data
> > + * @param opaque parameter to be passed to free
> > + * @param flags a combination of AV_BUFFER_FLAG_*
> 
> This would be more readable vertically aligned.

Those other things fixed locally.

> 
> > +/**
> > + * @return 1 if the caller may write to the data referred to by buf (which 
> > is
> > + * true if and only if buf is the only reference to the underlying 
> > AVBuffer).
> > + * Return 0 otherwise.
> > + * A positive answer is valid until av_buffer_ref() is called on buf.
> > + */
> > +int av_buffer_is_writable(const AVBufferRef *buf);
> 
> What does the generated documentation look like if you place the whole
> description in the @return statement?
> 

Returns
1 if the caller may write to the data referred to by buf (which is true if and
only if buf is the only reference to the underlying AVBuffer). Return 0
otherwise. A positive answer is valid until av_buffer_ref() is called on buf.

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

Reply via email to