| 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 "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h" |
| 6 |
| 5 #include <errno.h> | 7 #include <errno.h> |
| 6 #include <fcntl.h> | 8 #include <fcntl.h> |
| 7 #include <linux/videodev2.h> | 9 #include <linux/videodev2.h> |
| 8 #include <poll.h> | 10 #include <poll.h> |
| 9 #include <string.h> | 11 #include <string.h> |
| 10 #include <sys/eventfd.h> | 12 #include <sys/eventfd.h> |
| 11 #include <sys/ioctl.h> | 13 #include <sys/ioctl.h> |
| 12 #include <sys/mman.h> | 14 #include <sys/mman.h> |
| 13 | 15 |
| 16 #include <memory> |
| 17 |
| 14 #include "base/bind.h" | 18 #include "base/bind.h" |
| 15 #include "base/bind_helpers.h" | 19 #include "base/bind_helpers.h" |
| 16 #include "base/callback.h" | 20 #include "base/callback.h" |
| 17 #include "base/callback_helpers.h" | 21 #include "base/callback_helpers.h" |
| 18 #include "base/command_line.h" | 22 #include "base/command_line.h" |
| 19 #include "base/macros.h" | 23 #include "base/macros.h" |
| 20 #include "base/numerics/safe_conversions.h" | 24 #include "base/numerics/safe_conversions.h" |
| 21 #include "base/strings/stringprintf.h" | 25 #include "base/strings/stringprintf.h" |
| 22 #include "content/common/gpu/media/shared_memory_region.h" | 26 #include "content/common/gpu/media/shared_memory_region.h" |
| 23 #include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h" | |
| 24 #include "media/base/bind_to_current_loop.h" | 27 #include "media/base/bind_to_current_loop.h" |
| 25 #include "media/base/media_switches.h" | 28 #include "media/base/media_switches.h" |
| 26 #include "ui/gl/gl_context.h" | 29 #include "ui/gl/gl_context.h" |
| 27 #include "ui/gl/scoped_binders.h" | 30 #include "ui/gl/scoped_binders.h" |
| 28 | 31 |
| 29 #define LOGF(level) LOG(level) << __FUNCTION__ << "(): " | 32 #define LOGF(level) LOG(level) << __FUNCTION__ << "(): " |
| 30 #define DVLOGF(level) DVLOG(level) << __FUNCTION__ << "(): " | 33 #define DVLOGF(level) DVLOG(level) << __FUNCTION__ << "(): " |
| 31 | 34 |
| 32 #define NOTIFY_ERROR(x) \ | 35 #define NOTIFY_ERROR(x) \ |
| 33 do { \ | 36 do { \ |
| (...skipping 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2571 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { | 2574 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { |
| 2572 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); | 2575 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
| 2573 if (!device) | 2576 if (!device) |
| 2574 return SupportedProfiles(); | 2577 return SupportedProfiles(); |
| 2575 | 2578 |
| 2576 return device->GetSupportedDecodeProfiles(arraysize(supported_input_fourccs_), | 2579 return device->GetSupportedDecodeProfiles(arraysize(supported_input_fourccs_), |
| 2577 supported_input_fourccs_); | 2580 supported_input_fourccs_); |
| 2578 } | 2581 } |
| 2579 | 2582 |
| 2580 } // namespace content | 2583 } // namespace content |
| OLD | NEW |