OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/gpu/vaapi_video_encode_accelerator.h" | 5 #include "media/gpu/vaapi_video_encode_accelerator.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/numerics/safe_conversions.h" | 16 #include "base/numerics/safe_conversions.h" |
17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
| 18 #include "base/threading/thread_task_runner_handle.h" |
18 #include "media/base/bind_to_current_loop.h" | 19 #include "media/base/bind_to_current_loop.h" |
19 #include "media/gpu/h264_dpb.h" | 20 #include "media/gpu/h264_dpb.h" |
20 #include "media/gpu/shared_memory_region.h" | 21 #include "media/gpu/shared_memory_region.h" |
21 #include "third_party/libva/va/va_enc_h264.h" | 22 #include "third_party/libva/va/va_enc_h264.h" |
22 | 23 |
23 #define DVLOGF(level) DVLOG(level) << __func__ << "(): " | 24 #define DVLOGF(level) DVLOG(level) << __func__ << "(): " |
24 | 25 |
25 #define NOTIFY_ERROR(error, msg) \ | 26 #define NOTIFY_ERROR(error, msg) \ |
26 do { \ | 27 do { \ |
27 SetState(kError); \ | 28 SetState(kError); \ |
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 client_ptr_factory_.reset(); | 1051 client_ptr_factory_.reset(); |
1051 } | 1052 } |
1052 } | 1053 } |
1053 | 1054 |
1054 VaapiVideoEncodeAccelerator::EncodeJob::EncodeJob() | 1055 VaapiVideoEncodeAccelerator::EncodeJob::EncodeJob() |
1055 : coded_buffer(VA_INVALID_ID), keyframe(false) {} | 1056 : coded_buffer(VA_INVALID_ID), keyframe(false) {} |
1056 | 1057 |
1057 VaapiVideoEncodeAccelerator::EncodeJob::~EncodeJob() {} | 1058 VaapiVideoEncodeAccelerator::EncodeJob::~EncodeJob() {} |
1058 | 1059 |
1059 } // namespace media | 1060 } // namespace media |
OLD | NEW |