| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // Otherwise, call the destroy task directly. | 273 // Otherwise, call the destroy task directly. |
| 274 DestroyTask(); | 274 DestroyTask(); |
| 275 } | 275 } |
| 276 | 276 |
| 277 // Set to kError state just in case. | 277 // Set to kError state just in case. |
| 278 SetEncoderState(kError); | 278 SetEncoderState(kError); |
| 279 | 279 |
| 280 delete this; | 280 delete this; |
| 281 } | 281 } |
| 282 | 282 |
| 283 std::vector<media::VideoEncodeAccelerator::SupportedProfile> | 283 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> |
| 284 V4L2VideoEncodeAccelerator::GetSupportedProfiles() { | 284 V4L2VideoEncodeAccelerator::GetSupportedProfiles() { |
| 285 return GetSupportedProfilesStatic(); | 285 return GetSupportedProfilesStatic(); |
| 286 } | 286 } |
| 287 | 287 |
| 288 std::vector<media::VideoEncodeAccelerator::SupportedProfile> | 288 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> |
| 289 V4L2VideoEncodeAccelerator::GetSupportedProfilesStatic() { | 289 V4L2VideoEncodeAccelerator::GetSupportedProfilesStatic() { |
| 290 std::vector<SupportedProfile> profiles; | 290 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> profiles; |
| 291 SupportedProfile profile; | 291 gpu::VideoEncodeAcceleratorSupportedProfile profile; |
| 292 | 292 |
| 293 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 293 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| 294 if (cmd_line->HasSwitch(switches::kEnableWebRtcHWVp8Encoding)) { | 294 if (cmd_line->HasSwitch(switches::kEnableWebRtcHWVp8Encoding)) { |
| 295 profile.profile = media::VP8PROFILE_ANY; | 295 profile.profile = media::VP8PROFILE_ANY; |
| 296 profile.max_resolution.SetSize(1920, 1088); | 296 profile.max_resolution.SetSize(1920, 1088); |
| 297 profile.max_framerate_numerator = 30; | 297 profile.max_framerate_numerator = 30; |
| 298 profile.max_framerate_denominator = 1; | 298 profile.max_framerate_denominator = 1; |
| 299 profiles.push_back(profile); | 299 profiles.push_back(profile); |
| 300 } | 300 } |
| 301 | 301 |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 reqbufs.count = 0; | 1094 reqbufs.count = 0; |
| 1095 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; | 1095 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; |
| 1096 reqbufs.memory = V4L2_MEMORY_MMAP; | 1096 reqbufs.memory = V4L2_MEMORY_MMAP; |
| 1097 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); | 1097 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); |
| 1098 | 1098 |
| 1099 output_buffer_map_.clear(); | 1099 output_buffer_map_.clear(); |
| 1100 free_output_buffers_.clear(); | 1100 free_output_buffers_.clear(); |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 } // namespace content | 1103 } // namespace content |
| OLD | NEW |