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

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

Issue 1442933002: media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile errors Created 5 years, 1 month 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 | « media/filters/gpu_video_decoder.h ('k') | media/filters/opus_audio_decoder.h » ('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 (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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 PipelineStatus status = success ? PIPELINE_OK : DECODER_ERROR_NOT_SUPPORTED; 114 PipelineStatus status = success ? PIPELINE_OK : DECODER_ERROR_NOT_SUPPORTED;
115 UMA_HISTOGRAM_ENUMERATION( 115 UMA_HISTOGRAM_ENUMERATION(
116 "Media.GpuVideoDecoderInitializeStatus", status, PIPELINE_STATUS_MAX + 1); 116 "Media.GpuVideoDecoderInitializeStatus", status, PIPELINE_STATUS_MAX + 1);
117 cb.Run(success); 117 cb.Run(success);
118 } 118 }
119 119
120 std::string GpuVideoDecoder::GetDisplayName() const { 120 std::string GpuVideoDecoder::GetDisplayName() const {
121 return kDecoderName; 121 return kDecoderName;
122 } 122 }
123 123
124 // TODO(xhwang): Support CDM setting using |set_cdm_ready_cb|.
124 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config, 125 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config,
125 bool /* low_delay */, 126 bool /* low_delay */,
127 const SetCdmReadyCB& /* set_cdm_ready_cb */,
126 const InitCB& init_cb, 128 const InitCB& init_cb,
127 const OutputCB& output_cb) { 129 const OutputCB& output_cb) {
128 DVLOG(3) << "Initialize()"; 130 DVLOG(3) << "Initialize()";
129 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 131 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
130 DCHECK(config.IsValidConfig()); 132 DCHECK(config.IsValidConfig());
131 133
132 InitCB bound_init_cb = 134 InitCB bound_init_cb =
133 base::Bind(&ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB, 135 base::Bind(&ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB,
134 BindToCurrentLoop(init_cb)); 136 BindToCurrentLoop(init_cb));
135 137
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 608 }
607 return false; 609 return false;
608 } 610 }
609 611
610 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 612 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
611 const { 613 const {
612 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 614 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
613 } 615 }
614 616
615 } // namespace media 617 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/filters/opus_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698