| 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 // VideoCaptureController is the glue between a VideoCaptureDevice and all | 5 // VideoCaptureController is the glue between a VideoCaptureDevice and all |
| 6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of | 6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of |
| 7 // one (and only one) VideoCaptureDevice; both are owned by the | 7 // one (and only one) VideoCaptureDevice; both are owned by the |
| 8 // VideoCaptureManager. | 8 // VideoCaptureManager. |
| 9 // | 9 // |
| 10 // The VideoCaptureController is responsible for: | 10 // The VideoCaptureController is responsible for: |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; | 127 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; |
| 128 | 128 |
| 129 bool has_received_frames() const { return has_received_frames_; } | 129 bool has_received_frames() const { return has_received_frames_; } |
| 130 | 130 |
| 131 // Implementation of media::VideoFrameReceiver interface: | 131 // Implementation of media::VideoFrameReceiver interface: |
| 132 void OnIncomingCapturedVideoFrame( | 132 void OnIncomingCapturedVideoFrame( |
| 133 media::VideoCaptureDevice::Client::Buffer buffer, | 133 media::VideoCaptureDevice::Client::Buffer buffer, |
| 134 scoped_refptr<media::VideoFrame> frame) override; | 134 scoped_refptr<media::VideoFrame> frame) override; |
| 135 void OnError() override; | 135 void OnError() override; |
| 136 void OnLog(const std::string& message) override; | 136 void OnLog(const std::string& message) override; |
| 137 void OnStarted() override; |
| 137 void OnBufferRetired(int buffer_id) override; | 138 void OnBufferRetired(int buffer_id) override; |
| 138 | 139 |
| 139 private: | 140 private: |
| 140 struct ControllerClient; | 141 struct ControllerClient; |
| 141 typedef std::list<std::unique_ptr<ControllerClient>> ControllerClients; | 142 typedef std::list<std::unique_ptr<ControllerClient>> ControllerClients; |
| 142 | 143 |
| 143 class BufferContext { | 144 class BufferContext { |
| 144 public: | 145 public: |
| 145 BufferContext( | 146 BufferContext( |
| 146 int buffer_context_id, | 147 int buffer_context_id, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 media::VideoCaptureFormat video_capture_format_; | 221 media::VideoCaptureFormat video_capture_format_; |
| 221 | 222 |
| 222 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; | 223 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; |
| 223 | 224 |
| 224 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); | 225 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); |
| 225 }; | 226 }; |
| 226 | 227 |
| 227 } // namespace content | 228 } // namespace content |
| 228 | 229 |
| 229 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ | 230 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ |
| OLD | NEW |