OLD | NEW |
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 PipelineStatus status) { | 134 PipelineStatus status) { |
135 UMA_HISTOGRAM_ENUMERATION( | 135 UMA_HISTOGRAM_ENUMERATION( |
136 "Media.GpuVideoDecoderInitializeStatus", status, PIPELINE_STATUS_MAX + 1); | 136 "Media.GpuVideoDecoderInitializeStatus", status, PIPELINE_STATUS_MAX + 1); |
137 cb.Run(status); | 137 cb.Run(status); |
138 } | 138 } |
139 | 139 |
140 std::string GpuVideoDecoder::GetDisplayName() const { | 140 std::string GpuVideoDecoder::GetDisplayName() const { |
141 return kDecoderName; | 141 return kDecoderName; |
142 } | 142 } |
143 | 143 |
144 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config, | 144 void GpuVideoDecoder::Initialize( |
145 bool /* low_delay */, | 145 const VideoDecoderConfig& config, |
146 const PipelineStatusCB& orig_status_cb, | 146 bool /* low_delay */, |
147 const OutputCB& output_cb) { | 147 const PipelineStatusCB& orig_status_cb, |
| 148 const OutputCB& output_cb, |
| 149 const base::Closure& /* waiting_for_encryption_key_cb */) { |
148 DVLOG(3) << "Initialize()"; | 150 DVLOG(3) << "Initialize()"; |
149 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); | 151 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); |
150 DCHECK(config.IsValidConfig()); | 152 DCHECK(config.IsValidConfig()); |
151 DCHECK(!config.is_encrypted()); | 153 DCHECK(!config.is_encrypted()); |
152 | 154 |
153 PipelineStatusCB status_cb = | 155 PipelineStatusCB status_cb = |
154 base::Bind(&ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB, | 156 base::Bind(&ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB, |
155 BindToCurrentLoop(orig_status_cb)); | 157 BindToCurrentLoop(orig_status_cb)); |
156 | 158 |
157 bool previously_initialized = config_.IsValidConfig(); | 159 bool previously_initialized = config_.IsValidConfig(); |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 DLOG(ERROR) << "VDA Error: " << error; | 591 DLOG(ERROR) << "VDA Error: " << error; |
590 DestroyVDA(); | 592 DestroyVDA(); |
591 } | 593 } |
592 | 594 |
593 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 595 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
594 const { | 596 const { |
595 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 597 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
596 } | 598 } |
597 | 599 |
598 } // namespace media | 600 } // namespace media |
OLD | NEW |