| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Mark all formats as I420, since this is what the renderer side will get | 66 // Mark all formats as I420, since this is what the renderer side will get |
| 67 // anyhow: the actual pixel format is decided at the device level. | 67 // anyhow: the actual pixel format is decided at the device level. |
| 68 for (media::VideoCaptureFormats::iterator it = formats->begin(); | 68 for (media::VideoCaptureFormats::iterator it = formats->begin(); |
| 69 it != formats->end(); ++it) { | 69 it != formats->end(); ++it) { |
| 70 it->pixel_format = media::PIXEL_FORMAT_I420; | 70 it->pixel_format = media::PIXEL_FORMAT_I420; |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 | 73 |
| 74 // The maximum number of buffers in the capture pipeline. See | 74 // The maximum number of buffers in the capture pipeline. See |
| 75 // VideoCaptureController ctor comments for more details. | 75 // VideoCaptureController ctor comments for more details. |
| 76 const int kMaxNumberOfBuffers = 3; | 76 const int kMaxNumberOfBuffers = 5; |
| 77 const int kMaxNumberOfBuffersForTabCapture = 5; | 77 const int kMaxNumberOfBuffersForTabCapture = 5; |
| 78 | 78 |
| 79 // Used for logging capture events. | 79 // Used for logging capture events. |
| 80 // Elements in this enum should not be deleted or rearranged; the only | 80 // Elements in this enum should not be deleted or rearranged; the only |
| 81 // permitted operation is to add new elements before NUM_VIDEO_CAPTURE_EVENT. | 81 // permitted operation is to add new elements before NUM_VIDEO_CAPTURE_EVENT. |
| 82 enum VideoCaptureEvent { | 82 enum VideoCaptureEvent { |
| 83 VIDEO_CAPTURE_START_CAPTURE = 0, | 83 VIDEO_CAPTURE_START_CAPTURE = 0, |
| 84 VIDEO_CAPTURE_STOP_CAPTURE_OK = 1, | 84 VIDEO_CAPTURE_STOP_CAPTURE_OK = 1, |
| 85 VIDEO_CAPTURE_STOP_CAPTURE_DUE_TO_ERROR = 2, | 85 VIDEO_CAPTURE_STOP_CAPTURE_DUE_TO_ERROR = 2, |
| 86 VIDEO_CAPTURE_STOP_CAPTURE_OK_NO_FRAMES_PRODUCED_BY_DEVICE = 3, | 86 VIDEO_CAPTURE_STOP_CAPTURE_OK_NO_FRAMES_PRODUCED_BY_DEVICE = 3, |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 DCHECK(IsOnDeviceThread()); | 857 DCHECK(IsOnDeviceThread()); |
| 858 #if defined(ENABLE_SCREEN_CAPTURE) | 858 #if defined(ENABLE_SCREEN_CAPTURE) |
| 859 DesktopCaptureDevice* desktop_device = | 859 DesktopCaptureDevice* desktop_device = |
| 860 static_cast<DesktopCaptureDevice*>(device); | 860 static_cast<DesktopCaptureDevice*>(device); |
| 861 desktop_device->SetNotificationWindowId(window_id); | 861 desktop_device->SetNotificationWindowId(window_id); |
| 862 VLOG(2) << "Screen capture notification window passed on device thread."; | 862 VLOG(2) << "Screen capture notification window passed on device thread."; |
| 863 #endif | 863 #endif |
| 864 } | 864 } |
| 865 | 865 |
| 866 } // namespace content | 866 } // namespace content |
| OLD | NEW |