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

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

Issue 1446713003: Revert of media: Pass SetCdmReadyCB in {Audio|Video}Decoder::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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|.
125 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config, 124 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config,
126 bool /* low_delay */, 125 bool /* low_delay */,
127 const SetCdmReadyCB& /* set_cdm_ready_cb */,
128 const InitCB& init_cb, 126 const InitCB& init_cb,
129 const OutputCB& output_cb) { 127 const OutputCB& output_cb) {
130 DVLOG(3) << "Initialize()"; 128 DVLOG(3) << "Initialize()";
131 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 129 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
132 DCHECK(config.IsValidConfig()); 130 DCHECK(config.IsValidConfig());
133 131
134 InitCB bound_init_cb = 132 InitCB bound_init_cb =
135 base::Bind(&ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB, 133 base::Bind(&ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB,
136 BindToCurrentLoop(init_cb)); 134 BindToCurrentLoop(init_cb));
137 135
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 } 606 }
609 return false; 607 return false;
610 } 608 }
611 609
612 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 610 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
613 const { 611 const {
614 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 612 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
615 } 613 }
616 614
617 } // namespace media 615 } // 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