summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwuchengli <wuchengli@chromium.org>2016-03-10 01:18:19 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-10 09:19:19 +0000
commit3c2c2c97f30151cf6b1e73df4370e062755b69ef (patch)
tree5f525ea05282991095bb803aca20aea2167a37a3
parent1b32993664d96a52c332e0097c7ccbdffcda33d1 (diff)
downloadchromium_src-3c2c2c97f30151cf6b1e73df4370e062755b69ef.zip
chromium_src-3c2c2c97f30151cf6b1e73df4370e062755b69ef.tar.gz
chromium_src-3c2c2c97f30151cf6b1e73df4370e062755b69ef.tar.bz2
V4L2IP: remove the limitation of one output buffer.
GSC does not have the issue of using multiple output buffers anymore. Remove the limitation. BUG=chrome-os-partner:46210 TEST=Run VEA unittest, apprtc loopback, and Hangout on pit. Review URL: https://codereview.chromium.org/1777843002 Cr-Commit-Position: refs/heads/master@{#380379}
-rw-r--r--content/common/gpu/media/v4l2_image_processor.cc30
1 files changed, 14 insertions, 16 deletions
diff --git a/content/common/gpu/media/v4l2_image_processor.cc b/content/common/gpu/media/v4l2_image_processor.cc
index f0cf397..340a148 100644
--- a/content/common/gpu/media/v4l2_image_processor.cc
+++ b/content/common/gpu/media/v4l2_image_processor.cc
@@ -468,24 +468,22 @@ void V4L2ImageProcessor::Enqueue() {
}
}
- // TODO(posciak): Fix this to be non-Exynos specific.
- // Exynos GSC is liable to race conditions if more than one output buffer is
- // simultaneously enqueued, so enqueue just one.
- if (output_buffer_queued_count_ == 0 && !free_output_buffers_.empty()) {
- const int old_outputs_queued = output_buffer_queued_count_;
+ const int old_outputs_queued = output_buffer_queued_count_;
+ while (!free_output_buffers_.empty()) {
if (!EnqueueOutputRecord())
return;
- if (old_outputs_queued == 0 && output_buffer_queued_count_ != 0) {
- // We just started up a previously empty queue.
- // Queue state changed; signal interrupt.
- if (!device_->SetDevicePollInterrupt())
- return;
- // Start VIDIOC_STREAMON if we haven't yet.
- if (!output_streamon_) {
- __u32 type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
- IOCTL_OR_ERROR_RETURN(VIDIOC_STREAMON, &type);
- output_streamon_ = true;
- }
+ }
+
+ if (old_outputs_queued == 0 && output_buffer_queued_count_ != 0) {
+ // We just started up a previously empty queue.
+ // Queue state changed; signal interrupt.
+ if (!device_->SetDevicePollInterrupt())
+ return;
+ // Start VIDIOC_STREAMON if we haven't yet.
+ if (!output_streamon_) {
+ __u32 type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
+ IOCTL_OR_ERROR_RETURN(VIDIOC_STREAMON, &type);
+ output_streamon_ = true;
}
}
DCHECK_LE(output_buffer_queued_count_, 1);