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 "content/renderer/pepper/video_encoder_shim.h" | 5 #include "content/renderer/pepper/video_encoder_shim.h" |
6 | 6 |
7 #include <inttypes.h> | 7 #include <inttypes.h> |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "base/sys_info.h" | 15 #include "base/sys_info.h" |
16 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
17 #include "content/renderer/pepper/pepper_video_encoder_host.h" | 17 #include "content/renderer/pepper/pepper_video_encoder_host.h" |
18 #include "content/renderer/render_thread_impl.h" | 18 #include "content/renderer/render_thread_impl.h" |
19 #include "third_party/libvpx_new/source/libvpx/vpx/vp8cx.h" | 19 #include "third_party/libvpx/source/libvpx/vpx/vp8cx.h" |
20 #include "third_party/libvpx_new/source/libvpx/vpx/vpx_encoder.h" | 20 #include "third_party/libvpx/source/libvpx/vpx/vpx_encoder.h" |
21 #include "ui/gfx/geometry/size.h" | 21 #include "ui/gfx/geometry/size.h" |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // TODO(llandwerlin): Libvpx doesn't seem to have a maximum frame size | 27 // TODO(llandwerlin): Libvpx doesn't seem to have a maximum frame size |
28 // limitation. We currently limit the size of the frames to encode at | 28 // limitation. We currently limit the size of the frames to encode at |
29 // 2160p (%64 pixels blocks), this seems like a reasonable limit for | 29 // 2160p (%64 pixels blocks), this seems like a reasonable limit for |
30 // software encoding. | 30 // software encoding. |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 } | 483 } |
484 | 484 |
485 void VideoEncoderShim::OnNotifyError( | 485 void VideoEncoderShim::OnNotifyError( |
486 media::VideoEncodeAccelerator::Error error) { | 486 media::VideoEncodeAccelerator::Error error) { |
487 DCHECK(RenderThreadImpl::current()); | 487 DCHECK(RenderThreadImpl::current()); |
488 | 488 |
489 host_->NotifyError(error); | 489 host_->NotifyError(error); |
490 } | 490 } |
491 | 491 |
492 } // namespace content | 492 } // namespace content |
OLD | NEW |