| 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 GetSHM_Locked(input_image._length); | 666 GetSHM_Locked(input_image._length); |
| 667 if (!shm_buffer) | 667 if (!shm_buffer) |
| 668 return; | 668 return; |
| 669 SaveToDecodeBuffers_Locked(input_image, std::move(shm_buffer), buffer_data); | 669 SaveToDecodeBuffers_Locked(input_image, std::move(shm_buffer), buffer_data); |
| 670 delete[] input_image._buffer; | 670 delete[] input_image._buffer; |
| 671 pending_buffers_.pop_front(); | 671 pending_buffers_.pop_front(); |
| 672 } | 672 } |
| 673 } | 673 } |
| 674 | 674 |
| 675 void RTCVideoDecoder::ResetInternal() { | 675 void RTCVideoDecoder::ResetInternal() { |
| 676 DVLOG(2) << __FUNCTION__; | 676 DVLOG(2) << __func__; |
| 677 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); | 677 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); |
| 678 | 678 |
| 679 if (vda_) { | 679 if (vda_) { |
| 680 vda_->Reset(); | 680 vda_->Reset(); |
| 681 } else { | 681 } else { |
| 682 CreateVDA(vda_codec_profile_, nullptr); | 682 CreateVDA(vda_codec_profile_, nullptr); |
| 683 if (vda_) | 683 if (vda_) |
| 684 state_ = INITIALIZED; | 684 state_ = INITIALIZED; |
| 685 } | 685 } |
| 686 } | 686 } |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 } | 893 } |
| 894 | 894 |
| 895 void RTCVideoDecoder::ClearPendingBuffers() { | 895 void RTCVideoDecoder::ClearPendingBuffers() { |
| 896 // Delete WebRTC input buffers. | 896 // Delete WebRTC input buffers. |
| 897 for (const auto& pending_buffer : pending_buffers_) | 897 for (const auto& pending_buffer : pending_buffers_) |
| 898 delete[] pending_buffer.first._buffer; | 898 delete[] pending_buffer.first._buffer; |
| 899 pending_buffers_.clear(); | 899 pending_buffers_.clear(); |
| 900 } | 900 } |
| 901 | 901 |
| 902 } // namespace content | 902 } // namespace content |
| OLD | NEW |