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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 // Otherwise, call the destroy task directly. | 507 // Otherwise, call the destroy task directly. |
508 DestroyTask(); | 508 DestroyTask(); |
509 } | 509 } |
510 | 510 |
511 delete this; | 511 delete this; |
512 } | 512 } |
513 | 513 |
514 bool V4L2VideoDecodeAccelerator::TryToSetupDecodeOnSeparateThread( | 514 bool V4L2VideoDecodeAccelerator::TryToSetupDecodeOnSeparateThread( |
515 const base::WeakPtr<Client>& decode_client, | 515 const base::WeakPtr<Client>& decode_client, |
516 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) { | 516 const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner) { |
517 decode_client_ = decode_client_; | 517 decode_client_ = decode_client; |
518 decode_task_runner_ = decode_task_runner; | 518 decode_task_runner_ = decode_task_runner; |
519 return true; | 519 return true; |
520 } | 520 } |
521 | 521 |
522 // static | 522 // static |
523 media::VideoDecodeAccelerator::SupportedProfiles | 523 media::VideoDecodeAccelerator::SupportedProfiles |
524 V4L2VideoDecodeAccelerator::GetSupportedProfiles() { | 524 V4L2VideoDecodeAccelerator::GetSupportedProfiles() { |
525 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); | 525 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
526 if (!device) | 526 if (!device) |
527 return SupportedProfiles(); | 527 return SupportedProfiles(); |
(...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 Enqueue(); | 2240 Enqueue(); |
2241 } | 2241 } |
2242 } | 2242 } |
2243 | 2243 |
2244 void V4L2VideoDecodeAccelerator::ImageProcessorError() { | 2244 void V4L2VideoDecodeAccelerator::ImageProcessorError() { |
2245 LOG(ERROR) << "Image processor error"; | 2245 LOG(ERROR) << "Image processor error"; |
2246 NOTIFY_ERROR(PLATFORM_FAILURE); | 2246 NOTIFY_ERROR(PLATFORM_FAILURE); |
2247 } | 2247 } |
2248 | 2248 |
2249 } // namespace media | 2249 } // namespace media |
OLD | NEW |