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 #include "media/capture/video/video_capture_device_client.h" | 5 #include "media/capture/video/video_capture_device_client.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/trace_event/trace_event.h" | 15 #include "base/trace_event/trace_event.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "media/base/bind_to_current_loop.h" | 17 #include "media/base/bind_to_current_loop.h" |
18 #include "media/base/video_capture_types.h" | |
19 #include "media/base/video_frame.h" | 18 #include "media/base/video_frame.h" |
20 #include "media/capture/video/video_capture_buffer_handle.h" | 19 #include "media/capture/video/video_capture_buffer_handle.h" |
21 #include "media/capture/video/video_capture_buffer_pool.h" | 20 #include "media/capture/video/video_capture_buffer_pool.h" |
22 #include "media/capture/video/video_capture_jpeg_decoder.h" | 21 #include "media/capture/video/video_capture_jpeg_decoder.h" |
23 #include "media/capture/video/video_frame_receiver.h" | 22 #include "media/capture/video/video_frame_receiver.h" |
| 23 #include "media/capture/video_capture_types.h" |
24 #include "third_party/libyuv/include/libyuv.h" | 24 #include "third_party/libyuv/include/libyuv.h" |
25 | 25 |
26 using media::VideoCaptureFormat; | 26 using media::VideoCaptureFormat; |
27 using media::VideoFrame; | 27 using media::VideoFrame; |
28 using media::VideoFrameMetadata; | 28 using media::VideoFrameMetadata; |
29 | 29 |
30 namespace media { | 30 namespace media { |
31 | 31 |
32 // Class combining a Client::Buffer interface implementation and a pool buffer | 32 // Class combining a Client::Buffer interface implementation and a pool buffer |
33 // implementation to guarantee proper cleanup on destruction on our side. | 33 // implementation to guarantee proper cleanup on destruction on our side. |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 *u_plane_data = | 366 *u_plane_data = |
367 *y_plane_data + | 367 *y_plane_data + |
368 VideoFrame::PlaneSize(format, VideoFrame::kYPlane, dimensions).GetArea(); | 368 VideoFrame::PlaneSize(format, VideoFrame::kYPlane, dimensions).GetArea(); |
369 *v_plane_data = | 369 *v_plane_data = |
370 *u_plane_data + | 370 *u_plane_data + |
371 VideoFrame::PlaneSize(format, VideoFrame::kUPlane, dimensions).GetArea(); | 371 VideoFrame::PlaneSize(format, VideoFrame::kUPlane, dimensions).GetArea(); |
372 return buffer; | 372 return buffer; |
373 } | 373 } |
374 | 374 |
375 } // namespace media | 375 } // namespace media |
OLD | NEW |