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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 DCHECK(output_buffer_map_.empty()); | 198 DCHECK(output_buffer_map_.empty()); |
199 } | 199 } |
200 | 200 |
201 bool V4L2VideoDecodeAccelerator::Initialize(const Config& config, | 201 bool V4L2VideoDecodeAccelerator::Initialize(const Config& config, |
202 Client* client) { | 202 Client* client) { |
203 DVLOGF(3) << "profile: " << config.profile | 203 DVLOGF(3) << "profile: " << config.profile |
204 << ", output_mode=" << static_cast<int>(config.output_mode); | 204 << ", output_mode=" << static_cast<int>(config.output_mode); |
205 DCHECK(child_task_runner_->BelongsToCurrentThread()); | 205 DCHECK(child_task_runner_->BelongsToCurrentThread()); |
206 DCHECK_EQ(decoder_state_, kUninitialized); | 206 DCHECK_EQ(decoder_state_, kUninitialized); |
207 | 207 |
208 if (config.is_encrypted) { | 208 if (config.is_encrypted()) { |
209 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 209 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
210 return false; | 210 return false; |
211 } | 211 } |
212 | 212 |
213 if (config.output_mode != Config::OutputMode::ALLOCATE && | 213 if (config.output_mode != Config::OutputMode::ALLOCATE && |
214 config.output_mode != Config::OutputMode::IMPORT) { | 214 config.output_mode != Config::OutputMode::IMPORT) { |
215 NOTREACHED() << "Only ALLOCATE and IMPORT OutputModes are supported"; | 215 NOTREACHED() << "Only ALLOCATE and IMPORT OutputModes are supported"; |
216 return false; | 216 return false; |
217 } | 217 } |
218 | 218 |
(...skipping 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2638 StartResolutionChange(); | 2638 StartResolutionChange(); |
2639 } | 2639 } |
2640 } | 2640 } |
2641 | 2641 |
2642 void V4L2VideoDecodeAccelerator::ImageProcessorError() { | 2642 void V4L2VideoDecodeAccelerator::ImageProcessorError() { |
2643 LOGF(ERROR) << "Image processor error"; | 2643 LOGF(ERROR) << "Image processor error"; |
2644 NOTIFY_ERROR(PLATFORM_FAILURE); | 2644 NOTIFY_ERROR(PLATFORM_FAILURE); |
2645 } | 2645 } |
2646 | 2646 |
2647 } // namespace media | 2647 } // namespace media |
OLD | NEW |