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 media::VideoPixelFormat format, |
| 52 const gfx::Size& dimensions) override; |
52 void OnIncomingCapturedVideoFrame( | 53 void OnIncomingCapturedVideoFrame( |
53 const scoped_refptr<Buffer>& buffer, | 54 const scoped_refptr<Buffer>& buffer, |
54 const scoped_refptr<media::VideoFrame>& frame, | 55 const scoped_refptr<media::VideoFrame>& frame, |
55 const base::TimeTicks& timestamp) override; | 56 const base::TimeTicks& timestamp) override; |
56 void OnError(const std::string& reason) override; | 57 void OnError(const std::string& reason) override; |
57 void OnLog(const std::string& message) override; | 58 void OnLog(const std::string& message) override; |
58 | 59 |
59 private: | 60 private: |
60 // The controller to which we post events. | 61 // The controller to which we post events. |
61 const base::WeakPtr<VideoCaptureController> controller_; | 62 const base::WeakPtr<VideoCaptureController> controller_; |
62 | 63 |
63 // The pool of shared-memory buffers used for capturing. | 64 // The pool of shared-memory buffers used for capturing. |
64 const scoped_refptr<VideoCaptureBufferPool> buffer_pool_; | 65 const scoped_refptr<VideoCaptureBufferPool> buffer_pool_; |
65 | 66 |
66 media::VideoPixelFormat last_captured_pixel_format_; | 67 media::VideoPixelFormat last_captured_pixel_format_; |
67 | 68 |
68 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClient); | 69 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClient); |
69 }; | 70 }; |
70 | 71 |
71 | 72 |
72 } // namespace content | 73 } // namespace content |
73 | 74 |
74 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ | 75 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ |
OLD | NEW |