| 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 <string.h> | 8 #include <string.h> |
| 9 #include <sys/eventfd.h> | 9 #include <sys/eventfd.h> |
| 10 #include <sys/ioctl.h> | 10 #include <sys/ioctl.h> |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 switch (fmtdesc.pixelformat) { | 300 switch (fmtdesc.pixelformat) { |
| 301 case V4L2_PIX_FMT_H264: | 301 case V4L2_PIX_FMT_H264: |
| 302 profile.profile = media::H264PROFILE_MAIN; | 302 profile.profile = media::H264PROFILE_MAIN; |
| 303 profiles.push_back(profile); | 303 profiles.push_back(profile); |
| 304 break; | 304 break; |
| 305 case V4L2_PIX_FMT_VP8: | 305 case V4L2_PIX_FMT_VP8: |
| 306 profile.profile = media::VP8PROFILE_ANY; | 306 profile.profile = media::VP8PROFILE_ANY; |
| 307 profiles.push_back(profile); | 307 profiles.push_back(profile); |
| 308 break; | 308 break; |
| 309 case V4L2_PIX_FMT_VP9: | 309 case V4L2_PIX_FMT_VP9: |
| 310 profile.profile = media::VP9PROFILE_ANY; | 310 profile.profile = media::VP9PROFILE_PROFILE0; |
| 311 profiles.push_back(profile); |
| 312 profile.profile = media::VP9PROFILE_PROFILE1; |
| 313 profiles.push_back(profile); |
| 314 profile.profile = media::VP9PROFILE_PROFILE2; |
| 315 profiles.push_back(profile); |
| 316 profile.profile = media::VP9PROFILE_PROFILE3; |
| 311 profiles.push_back(profile); | 317 profiles.push_back(profile); |
| 312 break; | 318 break; |
| 313 } | 319 } |
| 314 } | 320 } |
| 315 | 321 |
| 316 return profiles; | 322 return profiles; |
| 317 } | 323 } |
| 318 | 324 |
| 319 void V4L2VideoEncodeAccelerator::FrameProcessed( | 325 void V4L2VideoEncodeAccelerator::FrameProcessed( |
| 320 bool force_keyframe, | 326 bool force_keyframe, |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 reqbufs.count = 0; | 1183 reqbufs.count = 0; |
| 1178 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; | 1184 reqbufs.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; |
| 1179 reqbufs.memory = V4L2_MEMORY_MMAP; | 1185 reqbufs.memory = V4L2_MEMORY_MMAP; |
| 1180 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); | 1186 IOCTL_OR_LOG_ERROR(VIDIOC_REQBUFS, &reqbufs); |
| 1181 | 1187 |
| 1182 output_buffer_map_.clear(); | 1188 output_buffer_map_.clear(); |
| 1183 free_output_buffers_.clear(); | 1189 free_output_buffers_.clear(); |
| 1184 } | 1190 } |
| 1185 | 1191 |
| 1186 } // namespace content | 1192 } // namespace content |
| OLD | NEW |