OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/v4l2_slice_video_decode_accelerator.h" | 5 #include "media/gpu/v4l2_slice_video_decode_accelerator.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <linux/videodev2.h> | 9 #include <linux/videodev2.h> |
10 #include <poll.h> | 10 #include <poll.h> |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 DCHECK(child_task_runner_->BelongsToCurrentThread()); | 438 DCHECK(child_task_runner_->BelongsToCurrentThread()); |
439 DCHECK_EQ(state_, kUninitialized); | 439 DCHECK_EQ(state_, kUninitialized); |
440 | 440 |
441 if (!device_->SupportsDecodeProfileForV4L2PixelFormats( | 441 if (!device_->SupportsDecodeProfileForV4L2PixelFormats( |
442 config.profile, arraysize(supported_input_fourccs_), | 442 config.profile, arraysize(supported_input_fourccs_), |
443 supported_input_fourccs_)) { | 443 supported_input_fourccs_)) { |
444 DVLOGF(1) << "unsupported profile " << config.profile; | 444 DVLOGF(1) << "unsupported profile " << config.profile; |
445 return false; | 445 return false; |
446 } | 446 } |
447 | 447 |
448 if (config.is_encrypted) { | 448 if (config.is_encrypted()) { |
449 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 449 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
450 return false; | 450 return false; |
451 } | 451 } |
452 | 452 |
453 if (config.output_mode != Config::OutputMode::ALLOCATE && | 453 if (config.output_mode != Config::OutputMode::ALLOCATE && |
454 config.output_mode != Config::OutputMode::IMPORT) { | 454 config.output_mode != Config::OutputMode::IMPORT) { |
455 NOTREACHED() << "Only ALLOCATE and IMPORT OutputModes are supported"; | 455 NOTREACHED() << "Only ALLOCATE and IMPORT OutputModes are supported"; |
456 return false; | 456 return false; |
457 } | 457 } |
458 | 458 |
(...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2801 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { | 2801 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { |
2802 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); | 2802 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
2803 if (!device) | 2803 if (!device) |
2804 return SupportedProfiles(); | 2804 return SupportedProfiles(); |
2805 | 2805 |
2806 return device->GetSupportedDecodeProfiles(arraysize(supported_input_fourccs_), | 2806 return device->GetSupportedDecodeProfiles(arraysize(supported_input_fourccs_), |
2807 supported_input_fourccs_); | 2807 supported_input_fourccs_); |
2808 } | 2808 } |
2809 | 2809 |
2810 } // namespace media | 2810 } // namespace media |
OLD | NEW |