| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/common/gpu/media/gpu_video_encode_accelerator.h" | 5 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 uint8* shm_memory = reinterpret_cast<uint8*>(shm->memory()); | 271 uint8* shm_memory = reinterpret_cast<uint8*>(shm->memory()); |
| 272 scoped_refptr<media::VideoFrame> frame = | 272 scoped_refptr<media::VideoFrame> frame = |
| 273 media::VideoFrame::WrapExternalPackedMemory( | 273 media::VideoFrame::WrapExternalPackedMemory( |
| 274 input_format_, | 274 input_format_, |
| 275 input_coded_size_, | 275 input_coded_size_, |
| 276 gfx::Rect(input_visible_size_), | 276 gfx::Rect(input_visible_size_), |
| 277 input_visible_size_, | 277 input_visible_size_, |
| 278 shm_memory, | 278 shm_memory, |
| 279 buffer_size, | 279 buffer_size, |
| 280 buffer_handle, | 280 buffer_handle, |
| 281 0, |
| 281 base::TimeDelta(), | 282 base::TimeDelta(), |
| 282 // It's turtles all the way down... | 283 // It's turtles all the way down... |
| 283 base::Bind(base::IgnoreResult(&base::MessageLoopProxy::PostTask), | 284 base::Bind(base::IgnoreResult(&base::MessageLoopProxy::PostTask), |
| 284 base::MessageLoopProxy::current(), | 285 base::MessageLoopProxy::current(), |
| 285 FROM_HERE, | 286 FROM_HERE, |
| 286 base::Bind(&GpuVideoEncodeAccelerator::EncodeFrameFinished, | 287 base::Bind(&GpuVideoEncodeAccelerator::EncodeFrameFinished, |
| 287 weak_this_factory_.GetWeakPtr(), | 288 weak_this_factory_.GetWeakPtr(), |
| 288 frame_id, | 289 frame_id, |
| 289 base::Passed(&shm)))); | 290 base::Passed(&shm)))); |
| 290 | 291 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 stub_->channel()->Send(message); | 352 stub_->channel()->Send(message); |
| 352 } | 353 } |
| 353 | 354 |
| 354 void GpuVideoEncodeAccelerator::SendCreateEncoderReply(IPC::Message* message, | 355 void GpuVideoEncodeAccelerator::SendCreateEncoderReply(IPC::Message* message, |
| 355 bool succeeded) { | 356 bool succeeded) { |
| 356 GpuCommandBufferMsg_CreateVideoEncoder::WriteReplyParams(message, succeeded); | 357 GpuCommandBufferMsg_CreateVideoEncoder::WriteReplyParams(message, succeeded); |
| 357 Send(message); | 358 Send(message); |
| 358 } | 359 } |
| 359 | 360 |
| 360 } // namespace content | 361 } // namespace content |
| OLD | NEW |