Re: [PATCHv6 1/8] v4l2-mem2mem: add v4l2_m2m_buf_copy_data helper function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2019-01-07 at 12:34 +0100, hverkuil-cisco@xxxxxxxxx wrote:
> From: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> 
> Memory-to-memory devices should copy various parts of
> struct v4l2_buffer from the output buffer to the capture buffer.
> 
> Add a helper function that does that to simplify the driver code.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxx>
> Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxxxx>
> ---
> 
[..]
> +
>  void v4l2_m2m_request_queue(struct media_request *req)
>  {
>  	struct media_request_object *obj, *obj_safe;
> diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h
> index 5467264771ec..43e447dcf69d 100644
> --- a/include/media/v4l2-mem2mem.h
> +++ b/include/media/v4l2-mem2mem.h
> @@ -622,6 +622,26 @@ v4l2_m2m_dst_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx)
>  	return v4l2_m2m_buf_remove_by_idx(&m2m_ctx->cap_q_ctx, idx);
>  }
>  
> +/**
> + * v4l2_m2m_buf_copy_data() - copy buffer data from the output buffer to the
> + * capture buffer
> + *

On revisiting this patchset, I've noticed that the name and the
description is really confusing as it strongly suggests this function
will copy the
contents of the buffer.

Can we maybe replace it with v4l2_m2m_buf_copy_metadata?

Too bad I didn't spot this earlier.

Ezequiel




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux