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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 DCHECK(config.IsValidConfig()); | 147 DCHECK(config.IsValidConfig()); |
148 DCHECK(!config.is_encrypted()); | 148 DCHECK(!config.is_encrypted()); |
149 | 149 |
150 weak_this_ = weak_factory_.GetWeakPtr(); | 150 weak_this_ = weak_factory_.GetWeakPtr(); |
151 | 151 |
152 PipelineStatusCB status_cb = | 152 PipelineStatusCB status_cb = |
153 base::Bind(&ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB, | 153 base::Bind(&ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB, |
154 BindToCurrentLoop(orig_status_cb)); | 154 BindToCurrentLoop(orig_status_cb)); |
155 | 155 |
156 bool previously_initialized = config_.IsValidConfig(); | 156 bool previously_initialized = config_.IsValidConfig(); |
157 #if !defined(OS_CHROMEOS) && !defined(OS_WIN) | 157 #if !defined(OS_CHROMEOS) && !defined(OS_WIN) && \ |
| 158 !(defined(OS_LINUX) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)) |
158 if (previously_initialized) { | 159 if (previously_initialized) { |
159 // TODO(xhwang): Make GpuVideoDecoder reinitializable. | 160 // TODO(xhwang): Make GpuVideoDecoder reinitializable. |
160 // See http://crbug.com/233608 | 161 // See http://crbug.com/233608 |
161 DVLOG(1) << "GpuVideoDecoder reinitialization not supported."; | 162 DVLOG(1) << "GpuVideoDecoder reinitialization not supported."; |
162 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); | 163 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); |
163 return; | 164 return; |
164 } | 165 } |
165 #endif | 166 #endif |
166 DVLOG(1) << "(Re)initializing GVD with config: " | 167 DVLOG(1) << "(Re)initializing GVD with config: " |
167 << config.AsHumanReadableString(); | 168 << config.AsHumanReadableString(); |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 return; | 646 return; |
646 } | 647 } |
647 } | 648 } |
648 | 649 |
649 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 650 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
650 const { | 651 const { |
651 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 652 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
652 } | 653 } |
653 | 654 |
654 } // namespace media | 655 } // namespace media |
OLD | NEW |