| 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/pepper_video_encoder_host.h" | 5 #include "content/renderer/pepper/pepper_video_encoder_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| 11 #include "base/numerics/safe_math.h" | 11 #include "base/numerics/safe_math.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "content/common/pepper_file_util.h" | 13 #include "content/common/pepper_file_util.h" |
| 14 #include "content/public/renderer/renderer_ppapi_host.h" | 14 #include "content/public/renderer/renderer_ppapi_host.h" |
| 15 #include "content/renderer/pepper/gfx_conversion.h" | 15 #include "content/renderer/pepper/gfx_conversion.h" |
| 16 #include "content/renderer/pepper/host_globals.h" | 16 #include "content/renderer/pepper/host_globals.h" |
| 17 #include "content/renderer/pepper/video_encoder_shim.h" | 17 #include "content/renderer/pepper/video_encoder_shim.h" |
| 18 #include "content/renderer/render_thread_impl.h" | 18 #include "content/renderer/render_thread_impl.h" |
| 19 #include "gpu/ipc/client/command_buffer_proxy_impl.h" | 19 #include "gpu/ipc/client/command_buffer_proxy_impl.h" |
| 20 #include "media/base/bind_to_current_loop.h" | 20 #include "media/base/bind_to_current_loop.h" |
| 21 #include "media/base/video_frame.h" | 21 #include "media/base/video_frame.h" |
| 22 #include "media/gpu/gpu_video_accelerator_util.h" |
| 22 #include "media/gpu/ipc/client/gpu_video_encode_accelerator_host.h" | 23 #include "media/gpu/ipc/client/gpu_video_encode_accelerator_host.h" |
| 23 #include "media/gpu/ipc/common/gpu_video_accelerator_util.h" | |
| 24 #include "media/renderers/gpu_video_accelerator_factories.h" | 24 #include "media/renderers/gpu_video_accelerator_factories.h" |
| 25 #include "media/video/video_encode_accelerator.h" | 25 #include "media/video/video_encode_accelerator.h" |
| 26 #include "ppapi/c/pp_codecs.h" | 26 #include "ppapi/c/pp_codecs.h" |
| 27 #include "ppapi/c/pp_errors.h" | 27 #include "ppapi/c/pp_errors.h" |
| 28 #include "ppapi/c/pp_graphics_3d.h" | 28 #include "ppapi/c/pp_graphics_3d.h" |
| 29 #include "ppapi/host/dispatch_host_message.h" | 29 #include "ppapi/host/dispatch_host_message.h" |
| 30 #include "ppapi/host/ppapi_host.h" | 30 #include "ppapi/host/ppapi_host.h" |
| 31 #include "ppapi/proxy/ppapi_messages.h" | 31 #include "ppapi/proxy/ppapi_messages.h" |
| 32 #include "ppapi/shared_impl/media_stream_buffer.h" | 32 #include "ppapi/shared_impl/media_stream_buffer.h" |
| 33 | 33 |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 } | 679 } |
| 680 | 680 |
| 681 uint8_t* PepperVideoEncoderHost::ShmHandleToAddress(int32_t buffer_id) { | 681 uint8_t* PepperVideoEncoderHost::ShmHandleToAddress(int32_t buffer_id) { |
| 682 DCHECK(RenderThreadImpl::current()); | 682 DCHECK(RenderThreadImpl::current()); |
| 683 DCHECK_GE(buffer_id, 0); | 683 DCHECK_GE(buffer_id, 0); |
| 684 DCHECK_LT(buffer_id, static_cast<int32_t>(shm_buffers_.size())); | 684 DCHECK_LT(buffer_id, static_cast<int32_t>(shm_buffers_.size())); |
| 685 return static_cast<uint8_t*>(shm_buffers_[buffer_id]->shm->memory()); | 685 return static_cast<uint8_t*>(shm_buffers_[buffer_id]->shm->memory()); |
| 686 } | 686 } |
| 687 | 687 |
| 688 } // namespace content | 688 } // namespace content |
| OLD | NEW |