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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 547913002: MediaLog: Log selected audio/video decoder name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 6 years, 3 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 "media/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // UMA stat reported because the UMA_HISTOGRAM_ENUMERATION API requires a 131 // UMA stat reported because the UMA_HISTOGRAM_ENUMERATION API requires a
132 // callsite to always be called with the same stat name (can't parameterize it). 132 // callsite to always be called with the same stat name (can't parameterize it).
133 static void ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB( 133 static void ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB(
134 const PipelineStatusCB& cb, 134 const PipelineStatusCB& cb,
135 PipelineStatus status) { 135 PipelineStatus status) {
136 UMA_HISTOGRAM_ENUMERATION( 136 UMA_HISTOGRAM_ENUMERATION(
137 "Media.GpuVideoDecoderInitializeStatus", status, PIPELINE_STATUS_MAX + 1); 137 "Media.GpuVideoDecoderInitializeStatus", status, PIPELINE_STATUS_MAX + 1);
138 cb.Run(status); 138 cb.Run(status);
139 } 139 }
140 140
141 std::string GpuVideoDecoder::GetDisplayName() const {
142 return "GpuVideoDecoder";
143 }
144
141 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config, 145 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config,
142 bool /* low_delay */, 146 bool /* low_delay */,
143 const PipelineStatusCB& orig_status_cb, 147 const PipelineStatusCB& orig_status_cb,
144 const OutputCB& output_cb) { 148 const OutputCB& output_cb) {
145 DVLOG(3) << "Initialize()"; 149 DVLOG(3) << "Initialize()";
146 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 150 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
147 DCHECK(config.IsValidConfig()); 151 DCHECK(config.IsValidConfig());
148 DCHECK(!config.is_encrypted()); 152 DCHECK(!config.is_encrypted());
149 153
150 PipelineStatusCB status_cb = 154 PipelineStatusCB status_cb =
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 DLOG(ERROR) << "VDA Error: " << error; 620 DLOG(ERROR) << "VDA Error: " << error;
617 DestroyVDA(); 621 DestroyVDA();
618 } 622 }
619 623
620 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 624 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
621 const { 625 const {
622 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 626 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
623 } 627 }
624 628
625 } // namespace media 629 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698