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 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 return vaapi_pic->dec_surface(); | 1883 return vaapi_pic->dec_surface(); |
1884 } | 1884 } |
1885 | 1885 |
1886 // static | 1886 // static |
1887 VideoDecodeAccelerator::SupportedProfiles | 1887 VideoDecodeAccelerator::SupportedProfiles |
1888 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1888 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
1889 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1889 return VaapiWrapper::GetSupportedDecodeProfiles(); |
1890 } | 1890 } |
1891 | 1891 |
1892 } // namespace media | 1892 } // namespace media |
OLD | NEW |