| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 video_fmt.fmt.pix.height = size[i][1]; | 278 video_fmt.fmt.pix.height = size[i][1]; |
| 279 | 279 |
| 280 if (ioctl(fd, VIDIOC_TRY_FMT, &video_fmt) >= 0) | 280 if (ioctl(fd, VIDIOC_TRY_FMT, &video_fmt) >= 0) |
| 281 { | 281 { |
| 282 if ((video_fmt.fmt.pix.width == size[i][0]) | 282 if ((video_fmt.fmt.pix.width == size[i][0]) |
| 283 && (video_fmt.fmt.pix.height == size[i][1])) | 283 && (video_fmt.fmt.pix.height == size[i][1])) |
| 284 { | 284 { |
| 285 VideoCaptureCapability cap; | 285 VideoCaptureCapability cap; |
| 286 cap.width = video_fmt.fmt.pix.width; | 286 cap.width = video_fmt.fmt.pix.width; |
| 287 cap.height = video_fmt.fmt.pix.height; | 287 cap.height = video_fmt.fmt.pix.height; |
| 288 cap.expectedCaptureDelay = 120; | |
| 289 if (videoFormats[fmts] == V4L2_PIX_FMT_YUYV) | 288 if (videoFormats[fmts] == V4L2_PIX_FMT_YUYV) |
| 290 { | 289 { |
| 291 cap.rawType = kVideoYUY2; | 290 cap.rawType = kVideoYUY2; |
| 292 } | 291 } |
| 293 else if (videoFormats[fmts] == V4L2_PIX_FMT_YUV420) | 292 else if (videoFormats[fmts] == V4L2_PIX_FMT_YUV420) |
| 294 { | 293 { |
| 295 cap.rawType = kVideoI420; | 294 cap.rawType = kVideoI420; |
| 296 } | 295 } |
| 297 else if (videoFormats[fmts] == V4L2_PIX_FMT_MJPEG) | 296 else if (videoFormats[fmts] == V4L2_PIX_FMT_MJPEG) |
| 298 { | 297 { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 328 WEBRTC_TRACE(webrtc::kTraceInfo, | 327 WEBRTC_TRACE(webrtc::kTraceInfo, |
| 329 webrtc::kTraceVideoCapture, | 328 webrtc::kTraceVideoCapture, |
| 330 0, | 329 0, |
| 331 "CreateCapabilityMap %u", | 330 "CreateCapabilityMap %u", |
| 332 static_cast<unsigned int>(_captureCapabilities.size())); | 331 static_cast<unsigned int>(_captureCapabilities.size())); |
| 333 return _captureCapabilities.size(); | 332 return _captureCapabilities.size(); |
| 334 } | 333 } |
| 335 | 334 |
| 336 } // namespace videocapturemodule | 335 } // namespace videocapturemodule |
| 337 } // namespace webrtc | 336 } // namespace webrtc |
| OLD | NEW |