| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/browser/renderer_host/media/video_capture_manager.h" | 5 #include "content/browser/renderer_host/media/video_capture_manager.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 media::FakeVideoCaptureDevice::Create(vc_device_name); | 166 media::FakeVideoCaptureDevice::Create(vc_device_name); |
| 167 } else { | 167 } else { |
| 168 switch (device.stream_type) { | 168 switch (device.stream_type) { |
| 169 case content::MEDIA_DEVICE_VIDEO_CAPTURE: | 169 case content::MEDIA_DEVICE_VIDEO_CAPTURE: |
| 170 video_capture_device = | 170 video_capture_device = |
| 171 media::VideoCaptureDevice::Create(vc_device_name); | 171 media::VideoCaptureDevice::Create(vc_device_name); |
| 172 break; | 172 break; |
| 173 case content::MEDIA_TAB_VIDEO_CAPTURE: | 173 case content::MEDIA_TAB_VIDEO_CAPTURE: |
| 174 // TODO(miu): Replace this stub with the actual implementation in a | 174 // TODO(miu): Replace this stub with the actual implementation in a |
| 175 // later change. | 175 // later change. |
| 176 // TODO(justinlin): This is so we don't get a null device. Remove later. |
| 177 vc_device_name.unique_id = "/dev/video1"; |
| 176 video_capture_device = | 178 video_capture_device = |
| 177 media::FakeVideoCaptureDevice::Create(vc_device_name); | 179 media::FakeVideoCaptureDevice::Create(vc_device_name); |
| 178 break; | 180 break; |
| 179 default: | 181 default: |
| 180 NOTIMPLEMENTED(); | 182 NOTIMPLEMENTED(); |
| 181 break; | 183 break; |
| 182 } | 184 } |
| 183 } | 185 } |
| 184 if (!video_capture_device) { | 186 if (!video_capture_device) { |
| 185 PostOnError(capture_session_id, kDeviceNotAvailable); | 187 PostOnError(capture_session_id, kDeviceNotAvailable); |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 | 528 |
| 527 VideoCaptureDevices::iterator dit = devices_.find(capture_session_id); | 529 VideoCaptureDevices::iterator dit = devices_.find(capture_session_id); |
| 528 if (dit != devices_.end()) { | 530 if (dit != devices_.end()) { |
| 529 return dit->second.capture_device; | 531 return dit->second.capture_device; |
| 530 } | 532 } |
| 531 } | 533 } |
| 532 return NULL; | 534 return NULL; |
| 533 } | 535 } |
| 534 | 536 |
| 535 } // namespace media_stream | 537 } // namespace media_stream |
| OLD | NEW |