| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |