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

Side by Side Diff: content/renderer/pepper/ppb_video_decoder_impl.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
OLDNEW
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/renderer/pepper/ppb_video_decoder_impl.h" 5 #include "content/renderer/pepper/ppb_video_decoder_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 273 }
274 274
275 void PPB_VideoDecoder_Impl::NotifyError( 275 void PPB_VideoDecoder_Impl::NotifyError(
276 media::VideoDecodeAccelerator::Error error) { 276 media::VideoDecodeAccelerator::Error error) {
277 DCHECK(RenderThreadImpl::current()); 277 DCHECK(RenderThreadImpl::current());
278 if (!GetPPP()) 278 if (!GetPPP())
279 return; 279 return;
280 280
281 PP_VideoDecodeError_Dev pp_error = MediaToPPError(error); 281 PP_VideoDecodeError_Dev pp_error = MediaToPPError(error);
282 GetPPP()->NotifyError(pp_instance(), pp_resource(), pp_error); 282 GetPPP()->NotifyError(pp_instance(), pp_resource(), pp_error);
283 UMA_HISTOGRAM_ENUMERATION("Media.PepperVideoDecoderError", 283 UMA_HISTOGRAM_ENUMERATION("Media.PepperVideoDecoderError", error,
284 error, 284 media::VideoDecodeAccelerator::ERROR_MAX + 1);
285 media::VideoDecodeAccelerator::LARGEST_ERROR_ENUM);
286 } 285 }
287 286
288 void PPB_VideoDecoder_Impl::NotifyResetDone() { 287 void PPB_VideoDecoder_Impl::NotifyResetDone() {
289 DCHECK(RenderThreadImpl::current()); 288 DCHECK(RenderThreadImpl::current());
290 RunResetCallback(PP_OK); 289 RunResetCallback(PP_OK);
291 } 290 }
292 291
293 void PPB_VideoDecoder_Impl::NotifyEndOfBitstreamBuffer( 292 void PPB_VideoDecoder_Impl::NotifyEndOfBitstreamBuffer(
294 int32_t bitstream_buffer_id) { 293 int32_t bitstream_buffer_id) {
295 DCHECK(RenderThreadImpl::current()); 294 DCHECK(RenderThreadImpl::current());
296 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); 295 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK);
297 } 296 }
298 297
299 void PPB_VideoDecoder_Impl::NotifyFlushDone() { 298 void PPB_VideoDecoder_Impl::NotifyFlushDone() {
300 DCHECK(RenderThreadImpl::current()); 299 DCHECK(RenderThreadImpl::current());
301 RunFlushCallback(PP_OK); 300 RunFlushCallback(PP_OK);
302 } 301 }
303 302
304 } // namespace content 303 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_video_decoder_host.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698