| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_decode_accelerator.h" | 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 } else { | 504 } else { |
| 505 child_task_runner_->PostTask( | 505 child_task_runner_->PostTask( |
| 506 FROM_HERE, | 506 FROM_HERE, |
| 507 base::Bind(&GpuVideoDecodeAccelerator::NotifyError, | 507 base::Bind(&GpuVideoDecodeAccelerator::NotifyError, |
| 508 base::Unretained(this), | 508 base::Unretained(this), |
| 509 media::VideoDecodeAccelerator::INVALID_ARGUMENT)); | 509 media::VideoDecodeAccelerator::INVALID_ARGUMENT)); |
| 510 } | 510 } |
| 511 return; | 511 return; |
| 512 } | 512 } |
| 513 | 513 |
| 514 media::BitstreamBuffer bitstream_buffer(params.bitstream_buffer_id, | 514 media::BitstreamBuffer bitstream_buffer( |
| 515 params.buffer_handle, params.size, | 515 params.bitstream_buffer_id, params.buffer_handle, params.size, |
| 516 params.presentation_timestamp); | 516 params.offset, params.presentation_timestamp); |
| 517 if (!params.key_id.empty()) { | 517 if (!params.key_id.empty()) { |
| 518 bitstream_buffer.SetDecryptConfig( | 518 bitstream_buffer.SetDecryptConfig( |
| 519 media::DecryptConfig(params.key_id, params.iv, params.subsamples)); | 519 media::DecryptConfig(params.key_id, params.iv, params.subsamples)); |
| 520 } | 520 } |
| 521 | 521 |
| 522 video_decode_accelerator_->Decode(bitstream_buffer); | 522 video_decode_accelerator_->Decode(bitstream_buffer); |
| 523 } | 523 } |
| 524 | 524 |
| 525 void GpuVideoDecodeAccelerator::OnAssignPictureBuffers( | 525 void GpuVideoDecodeAccelerator::OnAssignPictureBuffers( |
| 526 const std::vector<int32>& buffer_ids, | 526 const std::vector<int32>& buffer_ids, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 uncleared_textures_.erase(it); | 639 uncleared_textures_.erase(it); |
| 640 } | 640 } |
| 641 | 641 |
| 642 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, | 642 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, |
| 643 bool succeeded) { | 643 bool succeeded) { |
| 644 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); | 644 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); |
| 645 Send(message); | 645 Send(message); |
| 646 } | 646 } |
| 647 | 647 |
| 648 } // namespace content | 648 } // namespace content |
| OLD | NEW |