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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 // Hardware JPEG decoder. | 97 // Hardware JPEG decoder. |
98 std::unique_ptr<VideoCaptureGpuJpegDecoder> external_jpeg_decoder_; | 98 std::unique_ptr<VideoCaptureGpuJpegDecoder> external_jpeg_decoder_; |
99 | 99 |
100 // Whether |external_jpeg_decoder_| has been initialized. | 100 // Whether |external_jpeg_decoder_| has been initialized. |
101 bool external_jpeg_decoder_initialized_; | 101 bool external_jpeg_decoder_initialized_; |
102 | 102 |
103 // The pool of shared-memory buffers used for capturing. | 103 // The pool of shared-memory buffers used for capturing. |
104 const scoped_refptr<VideoCaptureBufferPool> buffer_pool_; | 104 const scoped_refptr<VideoCaptureBufferPool> buffer_pool_; |
105 | 105 |
| 106 #if DCHECK_IS_ON() |
| 107 // Counter used to track the number of times consecutive capture buffers are |
| 108 // dropped. |
| 109 int dropped_frame_counter_ = 0; |
| 110 |
| 111 static const int kMaxDroppedFrames = 150; |
| 112 #endif // DCHECK_IS_ON() |
| 113 |
106 // Indication to the Client to copy-transform the incoming data into | 114 // Indication to the Client to copy-transform the incoming data into |
107 // GpuMemoryBuffers. | 115 // GpuMemoryBuffers. |
108 const bool use_gpu_memory_buffers_; | 116 const bool use_gpu_memory_buffers_; |
109 | 117 |
110 media::VideoPixelFormat last_captured_pixel_format_; | 118 media::VideoPixelFormat last_captured_pixel_format_; |
111 | 119 |
112 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClient); | 120 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClient); |
113 }; | 121 }; |
114 | 122 |
115 | 123 |
116 } // namespace content | 124 } // namespace content |
117 | 125 |
118 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ | 126 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_ |
OLD | NEW |