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 "base/memory/shared_memory.h" | 5 #include "base/memory/shared_memory.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "content/child/child_process.h" | 7 #include "content/child/child_process.h" |
8 #include "content/common/media/video_capture_messages.h" | 8 #include "content/common/media/video_capture_messages.h" |
9 #include "content/renderer/media/video_capture_impl.h" | 9 #include "content/renderer/media/video_capture_impl.h" |
10 #include "media/base/bind_to_current_loop.h" | 10 #include "media/base/bind_to_current_loop.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 void DevicePauseCapture(int device_id) {} | 95 void DevicePauseCapture(int device_id) {} |
96 | 96 |
97 void DeviceStopCapture(int device_id) { | 97 void DeviceStopCapture(int device_id) { |
98 OnStateChanged(VIDEO_CAPTURE_STATE_STOPPED); | 98 OnStateChanged(VIDEO_CAPTURE_STATE_STOPPED); |
99 } | 99 } |
100 | 100 |
101 void DeviceReceiveEmptyBuffer(int device_id, | 101 void DeviceReceiveEmptyBuffer(int device_id, |
102 int buffer_id, | 102 int buffer_id, |
103 uint32 sync_point, | 103 uint32 sync_point, |
| 104 const gpu::SyncToken& release_sync_token, |
104 double consumer_resource_utilization) { | 105 double consumer_resource_utilization) { |
105 received_buffer_count_++; | 106 received_buffer_count_++; |
106 } | 107 } |
107 | 108 |
108 void DeviceGetSupportedFormats(int device_id, | 109 void DeviceGetSupportedFormats(int device_id, |
109 media::VideoCaptureSessionId session_id) { | 110 media::VideoCaptureSessionId session_id) { |
110 // When the mock message filter receives a request for the device | 111 // When the mock message filter receives a request for the device |
111 // supported formats, replies immediately with an empty format list. | 112 // supported formats, replies immediately with an empty format list. |
112 OnDeviceSupportedFormatsEnumerated(media::VideoCaptureFormats()); | 113 OnDeviceSupportedFormatsEnumerated(media::VideoCaptureFormats()); |
113 } | 114 } |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 StartCapture(0, params_small_); | 398 StartCapture(0, params_small_); |
398 | 399 |
399 // Receive state change message from browser. | 400 // Receive state change message from browser. |
400 video_capture_impl_->ReceiveStateChangeMessage(VIDEO_CAPTURE_STATE_ERROR); | 401 video_capture_impl_->ReceiveStateChangeMessage(VIDEO_CAPTURE_STATE_ERROR); |
401 | 402 |
402 StopCapture(0); | 403 StopCapture(0); |
403 DeInit(); | 404 DeInit(); |
404 } | 405 } |
405 | 406 |
406 } // namespace content | 407 } // namespace content |
OLD | NEW |