| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_video_decode_accelerator.h" | 5 #include "media/gpu/v4l2_video_decode_accelerator.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <fcntl.h> | 9 #include <fcntl.h> |
| 10 #include <linux/videodev2.h> | 10 #include <linux/videodev2.h> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 DCHECK(output_buffer_map_.empty()); | 196 DCHECK(output_buffer_map_.empty()); |
| 197 } | 197 } |
| 198 | 198 |
| 199 bool V4L2VideoDecodeAccelerator::Initialize(const Config& config, | 199 bool V4L2VideoDecodeAccelerator::Initialize(const Config& config, |
| 200 Client* client) { | 200 Client* client) { |
| 201 DVLOGF(3) << "profile: " << config.profile | 201 DVLOGF(3) << "profile: " << config.profile |
| 202 << ", output_mode=" << static_cast<int>(config.output_mode); | 202 << ", output_mode=" << static_cast<int>(config.output_mode); |
| 203 DCHECK(child_task_runner_->BelongsToCurrentThread()); | 203 DCHECK(child_task_runner_->BelongsToCurrentThread()); |
| 204 DCHECK_EQ(decoder_state_, kUninitialized); | 204 DCHECK_EQ(decoder_state_, kUninitialized); |
| 205 | 205 |
| 206 if (config.is_encrypted) { | 206 if (config.is_encrypted()) { |
| 207 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 207 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
| 208 return false; | 208 return false; |
| 209 } | 209 } |
| 210 | 210 |
| 211 if (config.output_mode != Config::OutputMode::ALLOCATE && | 211 if (config.output_mode != Config::OutputMode::ALLOCATE && |
| 212 config.output_mode != Config::OutputMode::IMPORT) { | 212 config.output_mode != Config::OutputMode::IMPORT) { |
| 213 NOTREACHED() << "Only ALLOCATE and IMPORT OutputModes are supported"; | 213 NOTREACHED() << "Only ALLOCATE and IMPORT OutputModes are supported"; |
| 214 return false; | 214 return false; |
| 215 } | 215 } |
| 216 | 216 |
| (...skipping 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2531 StartResolutionChange(); | 2531 StartResolutionChange(); |
| 2532 } | 2532 } |
| 2533 } | 2533 } |
| 2534 | 2534 |
| 2535 void V4L2VideoDecodeAccelerator::ImageProcessorError() { | 2535 void V4L2VideoDecodeAccelerator::ImageProcessorError() { |
| 2536 LOGF(ERROR) << "Image processor error"; | 2536 LOGF(ERROR) << "Image processor error"; |
| 2537 NOTIFY_ERROR(PLATFORM_FAILURE); | 2537 NOTIFY_ERROR(PLATFORM_FAILURE); |
| 2538 } | 2538 } |
| 2539 | 2539 |
| 2540 } // namespace media | 2540 } // namespace media |
| OLD | NEW |