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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 } | 130 } |
131 | 131 |
132 // Only non-Windows, Ivy Bridge+ platforms can support more than 1920x1080. | 132 // Only non-Windows, Ivy Bridge+ platforms can support more than 1920x1080. |
133 // We test against 1088 to account for 16x16 macroblocks. | 133 // We test against 1088 to account for 16x16 macroblocks. |
134 if (config.coded_size().width() > 1920 || | 134 if (config.coded_size().width() > 1920 || |
135 config.coded_size().height() > 1088) { | 135 config.coded_size().height() > 1088) { |
136 base::CPU cpu; | 136 base::CPU cpu; |
137 bool hw_large_video_support = | 137 bool hw_large_video_support = |
138 cpu.vendor_name() == "GenuineIntel" && cpu.model() >= 58; | 138 cpu.vendor_name() == "GenuineIntel" && cpu.model() >= 58; |
139 bool os_large_video_support = true; | 139 bool os_large_video_support = true; |
140 #if defined(OS_WINDOWS) | 140 #if defined(OS_WIN) |
141 os_large_video_support = false; | 141 os_large_video_support = false; |
142 #endif | 142 #endif |
143 if (!(os_large_video_support && hw_large_video_support)) { | 143 if (!(os_large_video_support && hw_large_video_support)) { |
144 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); | 144 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); |
145 return; | 145 return; |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
149 VideoDecodeAccelerator* vda = | 149 VideoDecodeAccelerator* vda = |
150 factories_->CreateVideoDecodeAccelerator(config.profile(), this); | 150 factories_->CreateVideoDecodeAccelerator(config.profile(), this); |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 | 584 |
585 error_occured_ = true; | 585 error_occured_ = true; |
586 | 586 |
587 if (!pending_read_cb_.is_null()) { | 587 if (!pending_read_cb_.is_null()) { |
588 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); | 588 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); |
589 return; | 589 return; |
590 } | 590 } |
591 } | 591 } |
592 | 592 |
593 } // namespace media | 593 } // namespace media |
OLD | NEW |