Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1825)

Unified Diff: content/renderer/pepper/pepper_video_encoder_host.cc

Issue 1547073003: Switch to standard integer types in content/renderer/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_video_encoder_host.cc
diff --git a/content/renderer/pepper/pepper_video_encoder_host.cc b/content/renderer/pepper/pepper_video_encoder_host.cc
index 0e1a19995b2eb0211e5a2abece04c06bc080521b..1bb34a2b27ee81fb2ab6527190fc62d4bd4f7691 100644
--- a/content/renderer/pepper/pepper_video_encoder_host.cc
+++ b/content/renderer/pepper/pepper_video_encoder_host.cc
@@ -5,6 +5,7 @@
#include "base/bind.h"
#include "base/memory/shared_memory.h"
#include "base/numerics/safe_math.h"
+#include "build/build_config.h"
#include "content/common/gpu/client/command_buffer_proxy_impl.h"
#include "content/common/gpu/media/gpu_video_accelerator_util.h"
#include "content/common/pepper_file_util.h"
@@ -421,7 +422,7 @@ void PepperVideoEncoderHost::RequireBitstreamBuffers(
AllocateVideoFrames();
}
-void PepperVideoEncoderHost::BitstreamBufferReady(int32 buffer_id,
+void PepperVideoEncoderHost::BitstreamBufferReady(int32_t buffer_id,
size_t payload_size,
bool key_frame) {
DCHECK(RenderThreadImpl::current());
@@ -499,7 +500,7 @@ bool PepperVideoEncoderHost::EnsureGpuChannel() {
if (!channel_)
return false;
- std::vector<int32> attribs(1, PP_GRAPHICS3DATTRIB_NONE);
+ std::vector<int32_t> attribs(1, PP_GRAPHICS3DATTRIB_NONE);
command_buffer_ = channel_->CreateOffscreenCommandBuffer(
gfx::Size(), nullptr, GpuChannelHost::kDefaultStreamId,
GpuChannelHost::kDefaultStreamPriority, attribs, GURL::EmptyGURL(),
@@ -623,13 +624,13 @@ scoped_refptr<media::VideoFrame> PepperVideoEncoderHost::CreateVideoFrame(
ppapi::MediaStreamBuffer* buffer = buffer_manager_.GetBufferPointer(frame_id);
DCHECK(buffer);
- uint32_t shm_offset = static_cast<uint8*>(buffer->video.data) -
- static_cast<uint8*>(buffer_manager_.shm()->memory());
+ uint32_t shm_offset = static_cast<uint8_t*>(buffer->video.data) -
+ static_cast<uint8_t*>(buffer_manager_.shm()->memory());
scoped_refptr<media::VideoFrame> frame =
media::VideoFrame::WrapExternalSharedMemory(
media_input_format_, input_coded_size_, gfx::Rect(input_coded_size_),
- input_coded_size_, static_cast<uint8*>(buffer->video.data),
+ input_coded_size_, static_cast<uint8_t*>(buffer->video.data),
buffer->video.data_size, buffer_manager_.shm()->handle(), shm_offset,
base::TimeDelta());
frame->AddDestructionObserver(
@@ -658,10 +659,10 @@ void PepperVideoEncoderHost::NotifyPepperError(int32_t error) {
PpapiPluginMsg_VideoEncoder_NotifyError(encoder_last_error_));
}
-uint8_t* PepperVideoEncoderHost::ShmHandleToAddress(int32 buffer_id) {
+uint8_t* PepperVideoEncoderHost::ShmHandleToAddress(int32_t buffer_id) {
DCHECK(RenderThreadImpl::current());
DCHECK_GE(buffer_id, 0);
- DCHECK_LT(buffer_id, static_cast<int32>(shm_buffers_.size()));
+ DCHECK_LT(buffer_id, static_cast<int32_t>(shm_buffers_.size()));
return static_cast<uint8_t*>(shm_buffers_[buffer_id]->shm->memory());
}
« no previous file with comments | « content/renderer/pepper/pepper_video_encoder_host.h ('k') | content/renderer/pepper/pepper_video_source_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698