| 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 "content/common/gpu/media/dxva_video_decode_accelerator_win.h" | 5 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h" |
| 6 | 6 |
| 7 #if !defined(OS_WIN) | 7 #if !defined(OS_WIN) |
| 8 #error This file should only be built on Windows. | 8 #error This file should only be built on Windows. |
| 9 #endif // !defined(OS_WIN) | 9 #endif // !defined(OS_WIN) |
| 10 | 10 |
| (...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2441 hr = media_type->GetGUID(MF_MT_SUBTYPE, &out_subtype); | 2441 hr = media_type->GetGUID(MF_MT_SUBTYPE, &out_subtype); |
| 2442 RETURN_ON_HR_FAILURE(hr, "Failed to get output major type", false); | 2442 RETURN_ON_HR_FAILURE(hr, "Failed to get output major type", false); |
| 2443 | 2443 |
| 2444 if (out_subtype == output_type) { | 2444 if (out_subtype == output_type) { |
| 2445 if (width && height) { | 2445 if (width && height) { |
| 2446 hr = MFSetAttributeSize(media_type.get(), MF_MT_FRAME_SIZE, width, | 2446 hr = MFSetAttributeSize(media_type.get(), MF_MT_FRAME_SIZE, width, |
| 2447 height); | 2447 height); |
| 2448 RETURN_ON_HR_FAILURE(hr, "Failed to set media type attributes", false); | 2448 RETURN_ON_HR_FAILURE(hr, "Failed to set media type attributes", false); |
| 2449 } | 2449 } |
| 2450 hr = transform->SetOutputType(0, media_type.get(), 0); // No flags | 2450 hr = transform->SetOutputType(0, media_type.get(), 0); // No flags |
| 2451 if (FAILED(hr)) { | |
| 2452 base::debug::Alias(&hr); | |
| 2453 // TODO(ananta) | |
| 2454 // Remove this CHECK when this stabilizes in the field. | |
| 2455 CHECK(false); | |
| 2456 } | |
| 2457 RETURN_ON_HR_FAILURE(hr, "Failed to set output type", false); | 2451 RETURN_ON_HR_FAILURE(hr, "Failed to set output type", false); |
| 2458 return true; | 2452 return true; |
| 2459 } | 2453 } |
| 2460 media_type.Release(); | 2454 media_type.Release(); |
| 2461 } | 2455 } |
| 2462 return false; | 2456 return false; |
| 2463 } | 2457 } |
| 2464 | 2458 |
| 2465 } // namespace content | 2459 } // namespace content |
| OLD | NEW |