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(child_task_runner_->BelongsToCurrentThread()); | 198 DCHECK(child_task_runner_->BelongsToCurrentThread()); |
199 DCHECK_EQ(decoder_state_, kUninitialized); | 199 DCHECK_EQ(decoder_state_, kUninitialized); |
200 | 200 |
201 if (!device_->SupportsDecodeProfileForV4L2PixelFormats( | 201 if (!device_->SupportsDecodeProfileForV4L2PixelFormats( |
202 config.profile, arraysize(supported_input_fourccs_), | 202 config.profile, arraysize(supported_input_fourccs_), |
203 supported_input_fourccs_)) { | 203 supported_input_fourccs_)) { |
204 DVLOG(1) << "Initialize(): unsupported profile=" << config.profile; | 204 DVLOG(1) << "Initialize(): unsupported profile=" << config.profile; |
205 return false; | 205 return false; |
206 } | 206 } |
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 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; | 214 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
215 return false; | 215 return false; |
216 } | 216 } |
217 | 217 |
218 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { | 218 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { |
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2243 Enqueue(); | 2243 Enqueue(); |
2244 } | 2244 } |
2245 } | 2245 } |
2246 | 2246 |
2247 void V4L2VideoDecodeAccelerator::ImageProcessorError() { | 2247 void V4L2VideoDecodeAccelerator::ImageProcessorError() { |
2248 LOG(ERROR) << "Image processor error"; | 2248 LOG(ERROR) << "Image processor error"; |
2249 NOTIFY_ERROR(PLATFORM_FAILURE); | 2249 NOTIFY_ERROR(PLATFORM_FAILURE); |
2250 } | 2250 } |
2251 | 2251 |
2252 } // namespace media | 2252 } // namespace media |
OLD | NEW |