Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: media/video/capture/linux/v4l2_capture_delegate_single_plane.cc

Issue 1147693002: Send bytes_used of v4l2 captured frame when video capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/video/capture/linux/v4l2_capture_delegate_single_plane.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/linux/v4l2_capture_delegate_single_plane.cc
diff --git a/media/video/capture/linux/v4l2_capture_delegate_single_plane.cc b/media/video/capture/linux/v4l2_capture_delegate_single_plane.cc
index 0e6097428ad606b654b1ab6410f407f477a2385d..e2e7e5b0da16a9c4b934b83bdfa567a1f1ab39d6 100644
--- a/media/video/capture/linux/v4l2_capture_delegate_single_plane.cc
+++ b/media/video/capture/linux/v4l2_capture_delegate_single_plane.cc
@@ -29,14 +29,18 @@ void V4L2CaptureDelegateSinglePlane::FinishFillingV4L2Buffer(
buffer->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
}
+void V4L2CaptureDelegateSinglePlane::SetPayloadSize(
+ const scoped_refptr<BufferTracker>& buffer_tracker,
+ const v4l2_buffer& buffer) const {
+ buffer_tracker->SetPlanePayloadSize(0, buffer.bytesused);
+}
+
void V4L2CaptureDelegateSinglePlane::SendBuffer(
const scoped_refptr<BufferTracker>& buffer_tracker,
const v4l2_format& format) const {
- const size_t data_length = format.fmt.pix.sizeimage;
- DCHECK_GE(data_length, capture_format().ImageAllocationSize());
client()->OnIncomingCapturedData(
buffer_tracker->GetPlaneStart(0),
- data_length,
+ buffer_tracker->GetPlanePayloadSize(0),
capture_format(),
rotation(),
base::TimeTicks::Now());
« no previous file with comments | « media/video/capture/linux/v4l2_capture_delegate_single_plane.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698