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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 DCHECK(config.IsValidConfig()); | 130 DCHECK(config.IsValidConfig()); |
131 DCHECK(!config.is_encrypted()); | 131 DCHECK(!config.is_encrypted()); |
132 | 132 |
133 weak_this_ = weak_factory_.GetWeakPtr(); | 133 weak_this_ = weak_factory_.GetWeakPtr(); |
134 | 134 |
135 PipelineStatusCB status_cb = CreateUMAReportingPipelineCB( | 135 PipelineStatusCB status_cb = CreateUMAReportingPipelineCB( |
136 "Media.GpuVideoDecoderInitializeStatus", | 136 "Media.GpuVideoDecoderInitializeStatus", |
137 BindToCurrentLoop(orig_status_cb)); | 137 BindToCurrentLoop(orig_status_cb)); |
138 | 138 |
139 bool previously_initialized = config_.IsValidConfig(); | 139 bool previously_initialized = config_.IsValidConfig(); |
140 #if !defined(OS_CHROMEOS) || !defined(ARCH_CPU_X86_FAMILY) | 140 #if !defined(OS_CHROMEOS) |
141 if (previously_initialized) { | 141 if (previously_initialized) { |
142 // TODO(xhwang): Make GpuVideoDecoder reinitializable. | 142 // TODO(xhwang): Make GpuVideoDecoder reinitializable. |
143 // See http://crbug.com/233608 | 143 // See http://crbug.com/233608 |
144 DVLOG(1) << "GpuVideoDecoder reinitialization not supported."; | 144 DVLOG(1) << "GpuVideoDecoder reinitialization not supported."; |
145 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); | 145 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); |
146 return; | 146 return; |
147 } | 147 } |
148 #endif | 148 #endif |
149 DVLOG(1) << "(Re)initializing GVD with config: " | 149 DVLOG(1) << "(Re)initializing GVD with config: " |
150 << config.AsHumanReadableString(); | 150 << config.AsHumanReadableString(); |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 | 596 |
597 state_ = kError; | 597 state_ = kError; |
598 | 598 |
599 if (!pending_read_cb_.is_null()) { | 599 if (!pending_read_cb_.is_null()) { |
600 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); | 600 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); |
601 return; | 601 return; |
602 } | 602 } |
603 } | 603 } |
604 | 604 |
605 } // namespace media | 605 } // namespace media |
OLD | NEW |