| 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 <fcntl.h> | 5 #include <fcntl.h> |
| 6 #include <linux/videodev2.h> | 6 #include <linux/videodev2.h> |
| 7 #include <poll.h> | 7 #include <poll.h> |
| 8 #include <sys/eventfd.h> | 8 #include <sys/eventfd.h> |
| 9 #include <sys/ioctl.h> | 9 #include <sys/ioctl.h> |
| 10 #include <sys/mman.h> | 10 #include <sys/mman.h> |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 } | 281 } |
| 282 | 282 |
| 283 // static | 283 // static |
| 284 std::vector<media::VideoEncodeAccelerator::SupportedProfile> | 284 std::vector<media::VideoEncodeAccelerator::SupportedProfile> |
| 285 V4L2VideoEncodeAccelerator::GetSupportedProfiles() { | 285 V4L2VideoEncodeAccelerator::GetSupportedProfiles() { |
| 286 std::vector<SupportedProfile> profiles; | 286 std::vector<SupportedProfile> profiles; |
| 287 SupportedProfile profile; | 287 SupportedProfile profile; |
| 288 | 288 |
| 289 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 289 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| 290 if (cmd_line->HasSwitch(switches::kEnableWebRtcHWVp8Encoding)) { | 290 if (cmd_line->HasSwitch(switches::kEnableWebRtcHWVp8Encoding)) { |
| 291 profile.profile = media::VP8PROFILE_MAIN; | 291 profile.profile = media::VP8PROFILE_ANY; |
| 292 profile.max_resolution.SetSize(1920, 1088); | 292 profile.max_resolution.SetSize(1920, 1088); |
| 293 profile.max_framerate.numerator = 30; | 293 profile.max_framerate.numerator = 30; |
| 294 profile.max_framerate.denominator = 1; | 294 profile.max_framerate.denominator = 1; |
| 295 profiles.push_back(profile); | 295 profiles.push_back(profile); |
| 296 } else { | 296 } else { |
| 297 profile.profile = media::H264PROFILE_MAIN; | 297 profile.profile = media::H264PROFILE_MAIN; |
| 298 profile.max_resolution.SetSize(1920, 1088); | 298 profile.max_resolution.SetSize(1920, 1088); |
| 299 profile.max_framerate.numerator = 30; | 299 profile.max_framerate.numerator = 30; |
| 300 profile.max_framerate.denominator = 1; | 300 profile.max_framerate.denominator = 1; |
| 301 profiles.push_back(profile); | 301 profiles.push_back(profile); |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 reqbufs.count = 0; | 1089 reqbufs.count = 0; |
| 1090 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; | 1090 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; |
| 1091 reqbufs.memory = V4L2_MEMORY_MMAP; | 1091 reqbufs.memory = V4L2_MEMORY_MMAP; |
| 1092 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); | 1092 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); |
| 1093 | 1093 |
| 1094 output_buffer_map_.clear(); | 1094 output_buffer_map_.clear(); |
| 1095 free_output_buffers_.clear(); | 1095 free_output_buffers_.clear(); |
| 1096 } | 1096 } |
| 1097 | 1097 |
| 1098 } // namespace content | 1098 } // namespace content |
| OLD | NEW |