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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 const gfx::Size& dimensions, | 58 const gfx::Size& dimensions, |
59 media::VideoPixelFormat format, | 59 media::VideoPixelFormat format, |
60 media::VideoPixelStorage storage) override; | 60 media::VideoPixelStorage storage) override; |
61 void OnIncomingCapturedBuffer(scoped_ptr<Buffer> buffer, | 61 void OnIncomingCapturedBuffer(scoped_ptr<Buffer> buffer, |
62 const media::VideoCaptureFormat& frame_format, | 62 const media::VideoCaptureFormat& frame_format, |
63 const base::TimeTicks& timestamp) override; | 63 const base::TimeTicks& timestamp) override; |
64 void OnIncomingCapturedVideoFrame( | 64 void OnIncomingCapturedVideoFrame( |
65 scoped_ptr<Buffer> buffer, | 65 scoped_ptr<Buffer> buffer, |
66 const scoped_refptr<media::VideoFrame>& frame, | 66 const scoped_refptr<media::VideoFrame>& frame, |
67 const base::TimeTicks& timestamp) override; | 67 const base::TimeTicks& timestamp) override; |
68 void OnError(const std::string& reason) override; | 68 void OnError(const tracked_objects::Location& from_here, |
| 69 const std::string& reason) override; |
69 void OnLog(const std::string& message) override; | 70 void OnLog(const std::string& message) override; |
70 double GetBufferPoolUtilization() const override; | 71 double GetBufferPoolUtilization() const override; |
71 | 72 |
72 private: | 73 private: |
73 // Reserve output buffer into which I420 contents can be copied directly. | 74 // Reserve output buffer into which I420 contents can be copied directly. |
74 // The dimensions of the frame is described by |dimensions|, and requested | 75 // The dimensions of the frame is described by |dimensions|, and requested |
75 // output buffer format is specified by |storage|. The reserved output buffer | 76 // output buffer format is specified by |storage|. The reserved output buffer |
76 // is returned; and the pointer to Y plane is stored at [y_plane_data], U | 77 // is returned; and the pointer to Y plane is stored at [y_plane_data], U |
77 // plane is stored at [u_plane_data], V plane is stored at [v_plane_data]. | 78 // plane is stored at [u_plane_data], V plane is stored at [v_plane_data]. |
78 // Returns an nullptr if allocation fails. | 79 // Returns an nullptr if allocation fails. |
(...skipping 27 matching lines...) Expand all Loading... |
106 | 107 |
107 media::VideoPixelFormat last_captured_pixel_format_; | 108 media::VideoPixelFormat last_captured_pixel_format_; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClient); | 110 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClient); |
110 }; | 111 }; |
111 | 112 |
112 | 113 |
113 } // namespace content | 114 } // namespace content |
114 | 115 |
115 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ | 116 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ |
OLD | NEW |