| 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 "media/gpu/vaapi_video_decode_accelerator.h" | 5 #include "media/gpu/vaapi_video_decode_accelerator.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 326 } |
| 327 | 327 |
| 328 VaapiVideoDecodeAccelerator::~VaapiVideoDecodeAccelerator() { | 328 VaapiVideoDecodeAccelerator::~VaapiVideoDecodeAccelerator() { |
| 329 DCHECK(task_runner_->BelongsToCurrentThread()); | 329 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 330 } | 330 } |
| 331 | 331 |
| 332 bool VaapiVideoDecodeAccelerator::Initialize(const Config& config, | 332 bool VaapiVideoDecodeAccelerator::Initialize(const Config& config, |
| 333 Client* client) { | 333 Client* client) { |
| 334 DCHECK(task_runner_->BelongsToCurrentThread()); | 334 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 335 | 335 |
| 336 if (config.is_encrypted) { | 336 if (config.is_encrypted()) { |
| 337 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 337 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
| 338 return false; | 338 return false; |
| 339 } | 339 } |
| 340 | 340 |
| 341 switch (config.output_mode) { | 341 switch (config.output_mode) { |
| 342 case Config::OutputMode::ALLOCATE: | 342 case Config::OutputMode::ALLOCATE: |
| 343 output_format_ = kAllocatePictureFormat; | 343 output_format_ = kAllocatePictureFormat; |
| 344 break; | 344 break; |
| 345 | 345 |
| 346 case Config::OutputMode::IMPORT: | 346 case Config::OutputMode::IMPORT: |
| (...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1882 return vaapi_pic->dec_surface(); | 1882 return vaapi_pic->dec_surface(); |
| 1883 } | 1883 } |
| 1884 | 1884 |
| 1885 // static | 1885 // static |
| 1886 VideoDecodeAccelerator::SupportedProfiles | 1886 VideoDecodeAccelerator::SupportedProfiles |
| 1887 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1887 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
| 1888 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1888 return VaapiWrapper::GetSupportedDecodeProfiles(); |
| 1889 } | 1889 } |
| 1890 | 1890 |
| 1891 } // namespace media | 1891 } // namespace media |
| OLD | NEW |