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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { | 333 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
334 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; | 334 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
335 return false; | 335 return false; |
336 } | 336 } |
337 | 337 |
| 338 if (config.flush_mode != Config::FlushMode::KEEP_OUTPUT_BUFFERS) { |
| 339 NOTIMPLEMENTED() << "Modes other than KEEP_OUTPUT_BUFFERS not implemented"; |
| 340 return false; |
| 341 } |
| 342 |
338 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client)); | 343 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client)); |
339 client_ = client_ptr_factory_->GetWeakPtr(); | 344 client_ = client_ptr_factory_->GetWeakPtr(); |
340 | 345 |
341 media::VideoCodecProfile profile = config.profile; | 346 media::VideoCodecProfile profile = config.profile; |
342 | 347 |
343 base::AutoLock auto_lock(lock_); | 348 base::AutoLock auto_lock(lock_); |
344 DCHECK_EQ(state_, kUninitialized); | 349 DCHECK_EQ(state_, kUninitialized); |
345 DVLOG(2) << "Initializing VAVDA, profile: " << profile; | 350 DVLOG(2) << "Initializing VAVDA, profile: " << profile; |
346 | 351 |
347 #if defined(USE_X11) | 352 #if defined(USE_X11) |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1760 return vaapi_pic->dec_surface(); | 1765 return vaapi_pic->dec_surface(); |
1761 } | 1766 } |
1762 | 1767 |
1763 // static | 1768 // static |
1764 media::VideoDecodeAccelerator::SupportedProfiles | 1769 media::VideoDecodeAccelerator::SupportedProfiles |
1765 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1770 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
1766 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1771 return VaapiWrapper::GetSupportedDecodeProfiles(); |
1767 } | 1772 } |
1768 | 1773 |
1769 } // namespace content | 1774 } // namespace content |
OLD | NEW |