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

Side by Side Diff: content/common/gpu/media/exynos_v4l2_video_device.cc

Issue 288903002: fix sign-compare warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix sign-compare warning. Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 5
6 #include <fcntl.h> 6 #include <fcntl.h>
7 #include <libdrm/drm_fourcc.h> 7 #include <libdrm/drm_fourcc.h>
8 #include <linux/videodev2.h> 8 #include <linux/videodev2.h>
9 #include <poll.h> 9 #include <poll.h>
10 #include <sys/eventfd.h> 10 #include <sys/eventfd.h>
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 memset(&expbuf, 0, sizeof(expbuf)); 152 memset(&expbuf, 0, sizeof(expbuf));
153 expbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; 153 expbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
154 expbuf.index = buffer_index; 154 expbuf.index = buffer_index;
155 expbuf.plane = i; 155 expbuf.plane = i;
156 expbuf.flags = O_CLOEXEC; 156 expbuf.flags = O_CLOEXEC;
157 if (Ioctl(VIDIOC_EXPBUF, &expbuf) != 0) { 157 if (Ioctl(VIDIOC_EXPBUF, &expbuf) != 0) {
158 return EGL_NO_IMAGE_KHR; 158 return EGL_NO_IMAGE_KHR;
159 } 159 }
160 dmabuf_fds[i].reset(expbuf.fd); 160 dmabuf_fds[i].reset(expbuf.fd);
161 } 161 }
162 DCHECK_EQ(planes_count, 2); 162 DCHECK_EQ(planes_count, 2u);
163 EGLint attrs[] = { 163 EGLint attrs[] = {
164 EGL_WIDTH, 0, EGL_HEIGHT, 0, 164 EGL_WIDTH, 0, EGL_HEIGHT, 0,
165 EGL_LINUX_DRM_FOURCC_EXT, 0, EGL_DMA_BUF_PLANE0_FD_EXT, 0, 165 EGL_LINUX_DRM_FOURCC_EXT, 0, EGL_DMA_BUF_PLANE0_FD_EXT, 0,
166 EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0, EGL_DMA_BUF_PLANE0_PITCH_EXT, 0, 166 EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0, EGL_DMA_BUF_PLANE0_PITCH_EXT, 0,
167 EGL_DMA_BUF_PLANE1_FD_EXT, 0, EGL_DMA_BUF_PLANE1_OFFSET_EXT, 0, 167 EGL_DMA_BUF_PLANE1_FD_EXT, 0, EGL_DMA_BUF_PLANE1_OFFSET_EXT, 0,
168 EGL_DMA_BUF_PLANE1_PITCH_EXT, 0, EGL_NONE, }; 168 EGL_DMA_BUF_PLANE1_PITCH_EXT, 0, EGL_NONE, };
169 attrs[1] = frame_buffer_size.width(); 169 attrs[1] = frame_buffer_size.width();
170 attrs[3] = frame_buffer_size.height(); 170 attrs[3] = frame_buffer_size.height();
171 attrs[5] = DRM_FORMAT_NV12; 171 attrs[5] = DRM_FORMAT_NV12;
172 attrs[7] = dmabuf_fds[0].get(); 172 attrs[7] = dmabuf_fds[0].get();
(...skipping 29 matching lines...) Expand all
202 } 202 }
203 203
204 uint32 ExynosV4L2Device::PreferredOutputFormat() { 204 uint32 ExynosV4L2Device::PreferredOutputFormat() {
205 // TODO(posciak): We should support "dontcare" returns here once we 205 // TODO(posciak): We should support "dontcare" returns here once we
206 // implement proper handling (fallback, negotiation) for this in users. 206 // implement proper handling (fallback, negotiation) for this in users.
207 CHECK_EQ(type_, kDecoder); 207 CHECK_EQ(type_, kDecoder);
208 return V4L2_PIX_FMT_NV12M; 208 return V4L2_PIX_FMT_NV12M;
209 } 209 }
210 210
211 } // namespace content 211 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/v4l2_image_processor.cc » ('j') | content/common/gpu/media/v4l2_image_processor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698