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 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 using ClientInfoMap = std::map<int, ClientInfo>; | 80 using ClientInfoMap = std::map<int, ClientInfo>; |
81 | 81 |
82 using BufferFinishedCallback = | 82 using BufferFinishedCallback = |
83 base::Callback<void(const gpu::SyncToken& sync_token, | 83 base::Callback<void(const gpu::SyncToken& sync_token, |
84 double consumer_resource_utilization)>; | 84 double consumer_resource_utilization)>; |
85 | 85 |
86 // mojom::VideoCaptureObserver implementation. | 86 // mojom::VideoCaptureObserver implementation. |
87 void OnStateChanged(mojom::VideoCaptureState state) override; | 87 void OnStateChanged(mojom::VideoCaptureState state) override; |
88 void OnBufferCreated(int32_t buffer_id, | 88 void OnBufferCreated(int32_t buffer_id, |
89 mojo::ScopedSharedBufferHandle handle) override; | 89 mojo::ScopedSharedBufferHandle handle) override; |
90 void OnBufferReady(int32_t buffer_id, mojom::VideoFrameInfoPtr info) override; | 90 void OnBufferReady(int32_t buffer_id, |
| 91 media::mojom::VideoFrameInfoPtr info) override; |
91 void OnBufferDestroyed(int32_t buffer_id) override; | 92 void OnBufferDestroyed(int32_t buffer_id) override; |
92 | 93 |
93 // Sends an IPC message to browser process when all clients are done with the | 94 // Sends an IPC message to browser process when all clients are done with the |
94 // buffer. | 95 // buffer. |
95 void OnClientBufferFinished(int buffer_id, | 96 void OnClientBufferFinished(int buffer_id, |
96 const scoped_refptr<ClientBuffer>& buffer, | 97 const scoped_refptr<ClientBuffer>& buffer, |
97 const gpu::SyncToken& release_sync_token, | 98 const gpu::SyncToken& release_sync_token, |
98 double consumer_resource_utilization); | 99 double consumer_resource_utilization); |
99 | 100 |
100 void StopDevice(); | 101 void StopDevice(); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // media::VideoFrames constructed in OnBufferReceived() from buffers cached | 158 // media::VideoFrames constructed in OnBufferReceived() from buffers cached |
158 // in |client_buffers_|. | 159 // in |client_buffers_|. |
159 base::WeakPtrFactory<VideoCaptureImpl> weak_factory_; | 160 base::WeakPtrFactory<VideoCaptureImpl> weak_factory_; |
160 | 161 |
161 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); | 162 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); |
162 }; | 163 }; |
163 | 164 |
164 } // namespace content | 165 } // namespace content |
165 | 166 |
166 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ | 167 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ |
OLD | NEW |