public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: m silverstri <michael.j.silverstri@gmail.com>,
	linux-media <linux-media@vger.kernel.org>
Subject: Re: How can I feed more data to a stream after I stream on?
Date: Wed, 19 Mar 2014 08:22:56 +0100	[thread overview]
Message-ID: <532945D0.2020007@xs4all.nl> (raw)
In-Reply-To: <CABMudhQzWS7P6uSq=tQQY85JLkj+qdZEg+AbCSwVYFevp6gy-w@mail.gmail.com>

On 03/19/2014 12:18 AM, m silverstri wrote:
> I am using v4l2 m2m framework to develop a resize driver. I have an
> image , pass it to the driver and it generated a resize output image.
> 
> My v4l2 sequence is
> 1. qbuf OUTPUT, CAPTURE
> 2. stream on OUTPUT, CAPTURE
> 3. dqbuf OUTPUT, CAPTURE
> 4. stream off OUTPUT, CAPTURE
> 
> this works if i have a full frame of image before i start streaming.
> 
> But what I only have partial buffers when I start streaming, how can I
> qbuf more buffer after I 'stream on' OUTPUT,

You can't. Each buffer passed to the driver must contain a full image.
So your application needs some logic to keep filling a buffer until it
is complete and only then do you issue the QBUF.

Regards,

	Hans

> 
> I try this, but this fail
> 1. qbuf OUTPUT, CAPTURE (I qbuf only partial OUTPUT)
> 2. stream on OUTPUT, CAPTURE
> 
> // do this in a loop:
> 3. dqbuf OUTPUT (I want to queue more OUTPUT as they become available)
> 4. qbuf OUTPUT
> 
> // now I am done, I want to dqbuf my output
> 5. dqbuf CAPTURE
> 6. stream off OUTPUT, CAPTURE
> 
> I try to do dqbuf/qbuf OUTPUT in step #3, #4 above, but it just stuck
> in dqbuf OUTPUT.
> 
> How can I queue more of my input data after I stream on?
> 
> Thank you.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2014-03-19  7:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 23:18 How can I feed more data to a stream after I stream on? m silverstri
2014-03-19  7:22 ` Hans Verkuil [this message]
2014-03-19 16:06   ` m silverstri

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=532945D0.2020007@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=michael.j.silverstri@gmail.com \
    /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