| 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/thread_task_runner_handle.h" |   15 #include "base/thread_task_runner_handle.h" | 
|   16 #include "content/renderer/pepper/pepper_video_encoder_host.h" |   16 #include "content/renderer/pepper/pepper_video_encoder_host.h" | 
|   17 #include "content/renderer/render_thread_impl.h" |   17 #include "content/renderer/render_thread_impl.h" | 
|   18 #include "third_party/libvpx/source/libvpx/vpx/vp8cx.h" |   18 #include "third_party/libvpx_new/source/libvpx/vpx/vp8cx.h" | 
|   19 #include "third_party/libvpx/source/libvpx/vpx/vpx_encoder.h" |   19 #include "third_party/libvpx_new/source/libvpx/vpx/vpx_encoder.h" | 
|   20 #include "ui/gfx/geometry/size.h" |   20 #include "ui/gfx/geometry/size.h" | 
|   21  |   21  | 
|   22 namespace content { |   22 namespace content { | 
|   23  |   23  | 
|   24 namespace { |   24 namespace { | 
|   25  |   25  | 
|   26 // TODO(llandwerlin): Libvpx doesn't seem to have a maximum frame size |   26 // TODO(llandwerlin): Libvpx doesn't seem to have a maximum frame size | 
|   27 // limitation. We currently limit the size of the frames to encode at |   27 // limitation. We currently limit the size of the frames to encode at | 
|   28 // 1080p (%64 pixels blocks), this seems like a reasonable limit for |   28 // 1080p (%64 pixels blocks), this seems like a reasonable limit for | 
|   29 // software encoding. |   29 // software encoding. | 
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  460 } |  460 } | 
|  461  |  461  | 
|  462 void VideoEncoderShim::OnNotifyError( |  462 void VideoEncoderShim::OnNotifyError( | 
|  463     media::VideoEncodeAccelerator::Error error) { |  463     media::VideoEncodeAccelerator::Error error) { | 
|  464   DCHECK(RenderThreadImpl::current()); |  464   DCHECK(RenderThreadImpl::current()); | 
|  465  |  465  | 
|  466   host_->NotifyError(error); |  466   host_->NotifyError(error); | 
|  467 } |  467 } | 
|  468  |  468  | 
|  469 }  // namespace content |  469 }  // namespace content | 
| OLD | NEW |