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/mac_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/mac_video_decode_accelerator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #import "base/mac/foundation_util.h" | 9 #import "base/mac/foundation_util.h" |
10 #import "base/memory/ref_counted_memory.h" | 10 #import "base/memory/ref_counted_memory.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 MacVideoDecodeAccelerator::MacVideoDecodeAccelerator( | 97 MacVideoDecodeAccelerator::MacVideoDecodeAccelerator( |
98 CGLContextObj cgl_context, media::VideoDecodeAccelerator::Client* client) | 98 CGLContextObj cgl_context, media::VideoDecodeAccelerator::Client* client) |
99 : client_(client), | 99 : client_(client), |
100 cgl_context_(cgl_context), | 100 cgl_context_(cgl_context), |
101 did_build_config_record_(false) { | 101 did_build_config_record_(false) { |
102 } | 102 } |
103 | 103 |
104 bool MacVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile) { | 104 bool MacVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile) { |
105 DCHECK(CalledOnValidThread()); | 105 DCHECK(CalledOnValidThread()); |
106 | 106 |
107 // MacVDA still fails on too many videos to be useful, even to users who | |
108 // ignore the GPU blacklist. Fail unconditionally here. | |
scherkus (not reviewing)
2012/11/16 22:36:11
link to mac bug
| |
109 if (true) | |
110 return false; | |
111 | |
107 if (profile < media::H264PROFILE_MIN || profile > media::H264PROFILE_MAX) | 112 if (profile < media::H264PROFILE_MIN || profile > media::H264PROFILE_MAX) |
108 return false; | 113 return false; |
109 | 114 |
110 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize(); | 115 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize(); |
111 if (!io_surface_support) | 116 if (!io_surface_support) |
112 return false; | 117 return false; |
113 | 118 |
114 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( | 119 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( |
115 &MacVideoDecodeAccelerator::NotifyInitializeDone, base::AsWeakPtr(this))); | 120 &MacVideoDecodeAccelerator::NotifyInitializeDone, base::AsWeakPtr(this))); |
116 return true; | 121 return true; |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
375 MacVideoDecodeAccelerator::UsedPictureInfo::~UsedPictureInfo() { | 380 MacVideoDecodeAccelerator::UsedPictureInfo::~UsedPictureInfo() { |
376 } | 381 } |
377 | 382 |
378 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() { | 383 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() { |
379 } | 384 } |
380 | 385 |
381 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() { | 386 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() { |
382 } | 387 } |
383 | 388 |
384 } // namespace content | 389 } // namespace content |
OLD | NEW |