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

Side by Side Diff: webrtc/modules/video_capture/linux/device_info_linux.cc

Issue 1477013005: Replace RefCountImpl with rtc::RefCountedObject. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add back explicit Release()s in test Created 4 years, 9 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 /* 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
11 #include "webrtc/modules/video_capture/linux/device_info_linux.h" 11 #include "webrtc/modules/video_capture/linux/device_info_linux.h"
12 12
13 #include <errno.h> 13 #include <errno.h>
14 #include <fcntl.h> 14 #include <fcntl.h>
15 #include <stdio.h> 15 #include <stdio.h>
16 #include <stdlib.h> 16 #include <stdlib.h>
17 #include <sys/ioctl.h> 17 #include <sys/ioctl.h>
18 #include <sys/stat.h> 18 #include <sys/stat.h>
19 #include <unistd.h> 19 #include <unistd.h>
20 //v4l includes 20 //v4l includes
21 #include <linux/videodev2.h> 21 #include <linux/videodev2.h>
22 22
23 #include "webrtc/system_wrappers/include/ref_count.h"
24 #include "webrtc/system_wrappers/include/trace.h" 23 #include "webrtc/system_wrappers/include/trace.h"
25 24
26 25
27 namespace webrtc 26 namespace webrtc
28 { 27 {
29 namespace videocapturemodule 28 namespace videocapturemodule
30 { 29 {
31 VideoCaptureModule::DeviceInfo* 30 VideoCaptureModule::DeviceInfo*
32 VideoCaptureImpl::CreateDeviceInfo(const int32_t id) 31 VideoCaptureImpl::CreateDeviceInfo(const int32_t id)
33 { 32 {
34 videocapturemodule::DeviceInfoLinux *deviceInfo = 33 return new videocapturemodule::DeviceInfoLinux(id);
35 new videocapturemodule::DeviceInfoLinux(id);
36 if (!deviceInfo)
37 {
38 deviceInfo = NULL;
39 }
40
41 return deviceInfo;
42 } 34 }
43 35
44 DeviceInfoLinux::DeviceInfoLinux(const int32_t id) 36 DeviceInfoLinux::DeviceInfoLinux(const int32_t id)
45 : DeviceInfoImpl(id) 37 : DeviceInfoImpl(id)
46 { 38 {
47 } 39 }
48 40
49 int32_t DeviceInfoLinux::Init() 41 int32_t DeviceInfoLinux::Init()
50 { 42 {
51 return 0; 43 return 0;
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 WEBRTC_TRACE(webrtc::kTraceInfo, 322 WEBRTC_TRACE(webrtc::kTraceInfo,
331 webrtc::kTraceVideoCapture, 323 webrtc::kTraceVideoCapture,
332 _id, 324 _id,
333 "CreateCapabilityMap %u", 325 "CreateCapabilityMap %u",
334 static_cast<unsigned int>(_captureCapabilities.size())); 326 static_cast<unsigned int>(_captureCapabilities.size()));
335 return _captureCapabilities.size(); 327 return _captureCapabilities.size();
336 } 328 }
337 329
338 } // namespace videocapturemodule 330 } // namespace videocapturemodule
339 } // namespace webrtc 331 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_capture/ios/video_capture_ios.mm ('k') | webrtc/modules/video_capture/linux/video_capture_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698