| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 const base::TimeTicks& timestamp) override; | 40 const base::TimeTicks& timestamp) override; |
| 41 void OnIncomingCapturedYuvData(const uint8* y_data, | 41 void OnIncomingCapturedYuvData(const uint8* y_data, |
| 42 const uint8* u_data, | 42 const uint8* u_data, |
| 43 const uint8* v_data, | 43 const uint8* v_data, |
| 44 size_t y_stride, | 44 size_t y_stride, |
| 45 size_t u_stride, | 45 size_t u_stride, |
| 46 size_t v_stride, | 46 size_t v_stride, |
| 47 const media::VideoCaptureFormat& frame_format, | 47 const media::VideoCaptureFormat& frame_format, |
| 48 int clockwise_rotation, | 48 int clockwise_rotation, |
| 49 const base::TimeTicks& timestamp) override; | 49 const base::TimeTicks& timestamp) override; |
| 50 scoped_refptr<Buffer> ReserveOutputBuffer(media::VideoFrame::Format format, | 50 scoped_refptr<Buffer> ReserveOutputBuffer( |
| 51 const gfx::Size& size) override; | 51 const media::VideoCaptureFormat& format) override; |
| 52 void OnIncomingCapturedVideoFrame( | 52 void OnIncomingCapturedVideoFrame( |
| 53 const scoped_refptr<Buffer>& buffer, | 53 const scoped_refptr<Buffer>& buffer, |
| 54 const scoped_refptr<media::VideoFrame>& frame, | 54 const scoped_refptr<media::VideoFrame>& frame, |
| 55 const base::TimeTicks& timestamp) override; | 55 const base::TimeTicks& timestamp) override; |
| 56 void OnError(const std::string& reason) override; | 56 void OnError(const std::string& reason) override; |
| 57 void OnLog(const std::string& message) override; | 57 void OnLog(const std::string& message) override; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 // The controller to which we post events. | 60 // The controller to which we post events. |
| 61 const base::WeakPtr<VideoCaptureController> controller_; | 61 const base::WeakPtr<VideoCaptureController> controller_; |
| 62 | 62 |
| 63 // The pool of shared-memory buffers used for capturing. | 63 // The pool of shared-memory buffers used for capturing. |
| 64 const scoped_refptr<VideoCaptureBufferPool> buffer_pool_; | 64 const scoped_refptr<VideoCaptureBufferPool> buffer_pool_; |
| 65 | 65 |
| 66 media::VideoPixelFormat last_captured_pixel_format_; | 66 media::VideoPixelFormat last_captured_pixel_format_; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClient); | 68 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClient); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 | 71 |
| 72 } // namespace content | 72 } // namespace content |
| 73 | 73 |
| 74 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ | 74 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ |
| OLD | NEW |