Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: content/renderer/media/rtc_video_decoder.cc

Issue 1839833002: Add histogram entry for GpuVideoDecoder errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_video_decoder_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 // Send the pending buffers for decoding. 462 // Send the pending buffers for decoding.
463 RequestBufferDecode(); 463 RequestBufferDecode();
464 } 464 }
465 465
466 void RTCVideoDecoder::NotifyError(media::VideoDecodeAccelerator::Error error) { 466 void RTCVideoDecoder::NotifyError(media::VideoDecodeAccelerator::Error error) {
467 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 467 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
468 if (!vda_) 468 if (!vda_)
469 return; 469 return;
470 470
471 LOG(ERROR) << "VDA Error:" << error; 471 LOG(ERROR) << "VDA Error:" << error;
472 UMA_HISTOGRAM_ENUMERATION("Media.RTCVideoDecoderError", 472 UMA_HISTOGRAM_ENUMERATION("Media.RTCVideoDecoderError", error,
473 error, 473 media::VideoDecodeAccelerator::ERROR_MAX + 1);
474 media::VideoDecodeAccelerator::LARGEST_ERROR_ENUM);
475 DestroyVDA(); 474 DestroyVDA();
476 475
477 base::AutoLock auto_lock(lock_); 476 base::AutoLock auto_lock(lock_);
478 state_ = DECODE_ERROR; 477 state_ = DECODE_ERROR;
479 } 478 }
480 479
481 void RTCVideoDecoder::RequestBufferDecode() { 480 void RTCVideoDecoder::RequestBufferDecode() {
482 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 481 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
483 if (!vda_) 482 if (!vda_)
484 return; 483 return;
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 } 806 }
808 807
809 void RTCVideoDecoder::ClearPendingBuffers() { 808 void RTCVideoDecoder::ClearPendingBuffers() {
810 // Delete WebRTC input buffers. 809 // Delete WebRTC input buffers.
811 for (const auto& pending_buffer : pending_buffers_) 810 for (const auto& pending_buffer : pending_buffers_)
812 delete[] pending_buffer.first._buffer; 811 delete[] pending_buffer.first._buffer;
813 pending_buffers_.clear(); 812 pending_buffers_.clear();
814 } 813 }
815 814
816 } // namespace content 815 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/pepper_video_decoder_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698