linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: hverkuil-cisco@xs4all.nl
To: linux-media@vger.kernel.org
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCHv6 2/8] vim2m: use v4l2_m2m_buf_copy_data
Date: Mon,  7 Jan 2019 12:34:35 +0100	[thread overview]
Message-ID: <20190107113441.21569-3-hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <20190107113441.21569-1-hverkuil-cisco@xs4all.nl>

From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Use the new v4l2_m2m_buf_copy_data() function in vim2m.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/platform/vim2m.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index d01821a6906a..33397d4a1402 100644
--- a/drivers/media/platform/vim2m.c
+++ b/drivers/media/platform/vim2m.c
@@ -241,17 +241,7 @@ static int device_process(struct vim2m_ctx *ctx,
 	out_vb->sequence =
 		get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE)->sequence++;
 	in_vb->sequence = q_data->sequence++;
-	out_vb->vb2_buf.timestamp = in_vb->vb2_buf.timestamp;
-
-	if (in_vb->flags & V4L2_BUF_FLAG_TIMECODE)
-		out_vb->timecode = in_vb->timecode;
-	out_vb->field = in_vb->field;
-	out_vb->flags = in_vb->flags &
-		(V4L2_BUF_FLAG_TIMECODE |
-		 V4L2_BUF_FLAG_KEYFRAME |
-		 V4L2_BUF_FLAG_PFRAME |
-		 V4L2_BUF_FLAG_BFRAME |
-		 V4L2_BUF_FLAG_TSTAMP_SRC_MASK);
+	v4l2_m2m_buf_copy_data(out_vb, in_vb, true);
 
 	switch (ctx->mode) {
 	case MEM2MEM_HFLIP | MEM2MEM_VFLIP:
-- 
2.19.2


  parent reply	other threads:[~2019-01-07 11:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07 11:34 [PATCHv6 0/8] vb2/cedrus: use timestamps to identify buffers hverkuil-cisco
2019-01-07 11:34 ` [PATCHv6 1/8] v4l2-mem2mem: add v4l2_m2m_buf_copy_data helper function hverkuil-cisco
2019-01-17 19:36   ` Ezequiel Garcia
2019-01-07 11:34 ` hverkuil-cisco [this message]
2019-01-07 11:34 ` [PATCHv6 3/8] vicodec: use v4l2_m2m_buf_copy_data hverkuil-cisco
2019-01-07 11:34 ` [PATCHv6 4/8] buffer.rst: clean up timecode documentation hverkuil-cisco
2019-01-07 11:34 ` [PATCHv6 5/8] videodev2.h: add v4l2_timeval_to_ns inline function hverkuil-cisco
2019-01-07 11:34 ` [PATCHv6 6/8] vb2: add vb2_find_timestamp() hverkuil-cisco
2019-01-07 11:34 ` [PATCHv6 7/8] cedrus: identify buffers by timestamp hverkuil-cisco
2019-01-07 11:34 ` [PATCHv6 8/8] extended-controls.rst: update the mpeg2 compound controls hverkuil-cisco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190107113441.21569-3-hverkuil-cisco@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).