Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 12879010: GpuVideoDecoder: fix OS_WIN define. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698