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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 if (!AllocateVideoBuffers()) | 273 if (!AllocateVideoBuffers()) |
274 { | 274 { |
275 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id, | 275 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id, |
276 "failed to allocate video capture buffers"); | 276 "failed to allocate video capture buffers"); |
277 return -1; | 277 return -1; |
278 } | 278 } |
279 | 279 |
280 //start capture thread; | 280 //start capture thread; |
281 if (!_captureThread) | 281 if (!_captureThread) |
282 { | 282 { |
283 _captureThread = ThreadWrapper::CreateThread( | 283 _captureThread = PlatformThread::CreateThread( |
284 VideoCaptureModuleV4L2::CaptureThread, this, "CaptureThread"); | 284 VideoCaptureModuleV4L2::CaptureThread, this, "CaptureThread"); |
285 _captureThread->Start(); | 285 _captureThread->Start(); |
286 _captureThread->SetPriority(kHighPriority); | 286 _captureThread->SetPriority(kHighPriority); |
287 } | 287 } |
288 | 288 |
289 // Needed to start UVC camera - from the uvcview application | 289 // Needed to start UVC camera - from the uvcview application |
290 enum v4l2_buf_type type; | 290 enum v4l2_buf_type type; |
291 type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 291 type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
292 if (ioctl(_deviceFd, VIDIOC_STREAMON, &type) == -1) | 292 if (ioctl(_deviceFd, VIDIOC_STREAMON, &type) == -1) |
293 { | 293 { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 { | 483 { |
484 settings.width = _currentWidth; | 484 settings.width = _currentWidth; |
485 settings.height = _currentHeight; | 485 settings.height = _currentHeight; |
486 settings.maxFPS = _currentFrameRate; | 486 settings.maxFPS = _currentFrameRate; |
487 settings.rawType=_captureVideoType; | 487 settings.rawType=_captureVideoType; |
488 | 488 |
489 return 0; | 489 return 0; |
490 } | 490 } |
491 } // namespace videocapturemodule | 491 } // namespace videocapturemodule |
492 } // namespace webrtc | 492 } // namespace webrtc |
OLD | NEW |