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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
482 make_context_current_)); | 482 make_context_current_)); |
483 #endif | 483 #endif |
484 return decoder; | 484 return decoder; |
485 } | 485 } |
486 | 486 |
487 void GpuVideoDecodeAccelerator::OnSetCdm(int cdm_id) { | 487 void GpuVideoDecodeAccelerator::OnSetCdm(int cdm_id) { |
488 DCHECK(video_decode_accelerator_); | 488 DCHECK(video_decode_accelerator_); |
489 video_decode_accelerator_->SetCdm(cdm_id); | 489 video_decode_accelerator_->SetCdm(cdm_id); |
490 } | 490 } |
491 | 491 |
492 void GpuVideoDecodeAccelerator::CallOrPostNotifyError( | |
kcwu
2016/03/16 06:20:53
unused?
| |
493 media::VideoDecodeAccelerator::Error error) { | |
494 if (child_task_runner_->BelongsToCurrentThread()) { | |
495 NotifyError(error); | |
496 } else { | |
497 child_task_runner_->PostTask( | |
498 FROM_HERE, base::Bind(&GpuVideoDecodeAccelerator::NotifyError, | |
499 base::Unretained(this), error)); | |
500 } | |
501 } | |
502 | |
492 // Runs on IO thread if video_decode_accelerator_->CanDecodeOnIOThread() is | 503 // Runs on IO thread if video_decode_accelerator_->CanDecodeOnIOThread() is |
493 // true, otherwise on the main thread. | 504 // true, otherwise on the main thread. |
494 void GpuVideoDecodeAccelerator::OnDecode( | 505 void GpuVideoDecodeAccelerator::OnDecode( |
495 const media::BitstreamBuffer& bitstream_buffer) { | 506 const media::BitstreamBuffer& bitstream_buffer) { |
496 DCHECK(video_decode_accelerator_); | 507 DCHECK(video_decode_accelerator_); |
497 video_decode_accelerator_->Decode(bitstream_buffer); | 508 video_decode_accelerator_->Decode(bitstream_buffer); |
498 } | 509 } |
499 | 510 |
500 void GpuVideoDecodeAccelerator::OnAssignPictureBuffers( | 511 void GpuVideoDecodeAccelerator::OnAssignPictureBuffers( |
501 const std::vector<int32_t>& buffer_ids, | 512 const std::vector<int32_t>& buffer_ids, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
614 uncleared_textures_.erase(it); | 625 uncleared_textures_.erase(it); |
615 } | 626 } |
616 | 627 |
617 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, | 628 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, |
618 bool succeeded) { | 629 bool succeeded) { |
619 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); | 630 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); |
620 Send(message); | 631 Send(message); |
621 } | 632 } |
622 | 633 |
623 } // namespace content | 634 } // namespace content |
OLD | NEW |