| 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/rtc_video_decoder.h" | 5 #include "content/renderer/media/rtc_video_decoder.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 weak_this_, | 402 weak_this_, |
| 403 picture.picture_buffer_id()))), | 403 picture.picture_buffer_id()))), |
| 404 decoder_texture_target_, | 404 decoder_texture_target_, |
| 405 pb.size(), | 405 pb.size(), |
| 406 visible_rect, | 406 visible_rect, |
| 407 natural_size, | 407 natural_size, |
| 408 timestamp_ms, | 408 timestamp_ms, |
| 409 base::Bind(&media::GpuVideoAcceleratorFactories::ReadPixels, | 409 base::Bind(&media::GpuVideoAcceleratorFactories::ReadPixels, |
| 410 factories_, | 410 factories_, |
| 411 pb.texture_id(), | 411 pb.texture_id(), |
| 412 decoder_texture_target_, | |
| 413 natural_size), | 412 natural_size), |
| 414 base::Closure()); | 413 base::Closure()); |
| 415 } | 414 } |
| 416 | 415 |
| 417 void RTCVideoDecoder::NotifyEndOfBitstreamBuffer(int32 id) { | 416 void RTCVideoDecoder::NotifyEndOfBitstreamBuffer(int32 id) { |
| 418 DVLOG(3) << "NotifyEndOfBitstreamBuffer. id=" << id; | 417 DVLOG(3) << "NotifyEndOfBitstreamBuffer. id=" << id; |
| 419 DCHECK(vda_loop_proxy_->BelongsToCurrentThread()); | 418 DCHECK(vda_loop_proxy_->BelongsToCurrentThread()); |
| 420 | 419 |
| 421 std::map<int32, SHMBuffer*>::iterator it = | 420 std::map<int32, SHMBuffer*>::iterator it = |
| 422 bitstream_buffers_in_decoder_.find(id); | 421 bitstream_buffers_in_decoder_.find(id); |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 | 752 |
| 754 int32_t RTCVideoDecoder::RecordInitDecodeUMA(int32_t status) { | 753 int32_t RTCVideoDecoder::RecordInitDecodeUMA(int32_t status) { |
| 755 // Logging boolean is enough to know if HW decoding has been used. Also, | 754 // Logging boolean is enough to know if HW decoding has been used. Also, |
| 756 // InitDecode is less likely to return an error so enum is not used here. | 755 // InitDecode is less likely to return an error so enum is not used here. |
| 757 bool sample = (status == WEBRTC_VIDEO_CODEC_OK) ? true : false; | 756 bool sample = (status == WEBRTC_VIDEO_CODEC_OK) ? true : false; |
| 758 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoDecoderInitDecodeStatus", sample); | 757 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoDecoderInitDecodeStatus", sample); |
| 759 return status; | 758 return status; |
| 760 } | 759 } |
| 761 | 760 |
| 762 } // namespace content | 761 } // namespace content |
| OLD | NEW |