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/vaapi_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 if (make_context_current_cb_.is_null() || bind_image_cb_.is_null()) { | 323 if (make_context_current_cb_.is_null() || bind_image_cb_.is_null()) { |
324 NOTREACHED() << "GL callbacks are required for this VDA"; | 324 NOTREACHED() << "GL callbacks are required for this VDA"; |
325 return false; | 325 return false; |
326 } | 326 } |
327 | 327 |
328 if (config.is_encrypted) { | 328 if (config.is_encrypted) { |
329 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 329 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
330 return false; | 330 return false; |
331 } | 331 } |
332 | 332 |
| 333 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
| 334 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
| 335 return false; |
| 336 } |
| 337 |
333 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client)); | 338 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client)); |
334 client_ = client_ptr_factory_->GetWeakPtr(); | 339 client_ = client_ptr_factory_->GetWeakPtr(); |
335 | 340 |
336 media::VideoCodecProfile profile = config.profile; | 341 media::VideoCodecProfile profile = config.profile; |
337 | 342 |
338 base::AutoLock auto_lock(lock_); | 343 base::AutoLock auto_lock(lock_); |
339 DCHECK_EQ(state_, kUninitialized); | 344 DCHECK_EQ(state_, kUninitialized); |
340 DVLOG(2) << "Initializing VAVDA, profile: " << profile; | 345 DVLOG(2) << "Initializing VAVDA, profile: " << profile; |
341 | 346 |
342 #if defined(USE_X11) | 347 #if defined(USE_X11) |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1755 return vaapi_pic->dec_surface(); | 1760 return vaapi_pic->dec_surface(); |
1756 } | 1761 } |
1757 | 1762 |
1758 // static | 1763 // static |
1759 media::VideoDecodeAccelerator::SupportedProfiles | 1764 media::VideoDecodeAccelerator::SupportedProfiles |
1760 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1765 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
1761 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1766 return VaapiWrapper::GetSupportedDecodeProfiles(); |
1762 } | 1767 } |
1763 | 1768 |
1764 } // namespace content | 1769 } // namespace content |
OLD | NEW |