| 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/renderer/media/gpu/rtc_video_decoder.h" | 5 #include "content/renderer/media/gpu/rtc_video_decoder.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 } | 732 } |
| 733 | 733 |
| 734 return false; | 734 return false; |
| 735 } | 735 } |
| 736 | 736 |
| 737 void RTCVideoDecoder::CreateVDA(media::VideoCodecProfile profile, | 737 void RTCVideoDecoder::CreateVDA(media::VideoCodecProfile profile, |
| 738 base::WaitableEvent* waiter) { | 738 base::WaitableEvent* waiter) { |
| 739 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); | 739 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); |
| 740 | 740 |
| 741 if (!IsProfileSupported(profile)) { | 741 if (!IsProfileSupported(profile)) { |
| 742 DVLOG(1) << "Unsupported profile " << profile; | 742 DVLOG(1) << "Unsupported profile " << GetProfileName(profile); |
| 743 } else { | 743 } else { |
| 744 vda_ = factories_->CreateVideoDecodeAccelerator(); | 744 vda_ = factories_->CreateVideoDecodeAccelerator(); |
| 745 | 745 |
| 746 media::VideoDecodeAccelerator::Config config(profile); | 746 media::VideoDecodeAccelerator::Config config(profile); |
| 747 if (vda_ && !vda_->Initialize(config, this)) | 747 if (vda_ && !vda_->Initialize(config, this)) |
| 748 vda_.release()->Destroy(); | 748 vda_.release()->Destroy(); |
| 749 vda_codec_profile_ = profile; | 749 vda_codec_profile_ = profile; |
| 750 } | 750 } |
| 751 | 751 |
| 752 if (waiter) | 752 if (waiter) |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 } | 887 } |
| 888 | 888 |
| 889 void RTCVideoDecoder::ClearPendingBuffers() { | 889 void RTCVideoDecoder::ClearPendingBuffers() { |
| 890 // Delete WebRTC input buffers. | 890 // Delete WebRTC input buffers. |
| 891 for (const auto& pending_buffer : pending_buffers_) | 891 for (const auto& pending_buffer : pending_buffers_) |
| 892 delete[] pending_buffer.first._buffer; | 892 delete[] pending_buffer.first._buffer; |
| 893 pending_buffers_.clear(); | 893 pending_buffers_.clear(); |
| 894 } | 894 } |
| 895 | 895 |
| 896 } // namespace content | 896 } // namespace content |
| OLD | NEW |