Chromium Code Reviews| Index: media/gpu/v4l2_video_encode_accelerator.cc |
| diff --git a/media/gpu/v4l2_video_encode_accelerator.cc b/media/gpu/v4l2_video_encode_accelerator.cc |
| index 9afa64538a3471af4e9e0b81b86a52a1e7c1a355..2a9a5c24117b95ab2475d01dbbdd21c9a5b0d9f4 100644 |
| --- a/media/gpu/v4l2_video_encode_accelerator.cc |
| +++ b/media/gpu/v4l2_video_encode_accelerator.cc |
| @@ -428,15 +428,15 @@ void V4L2VideoEncodeAccelerator::EncodeTask( |
| std::vector<struct v4l2_ext_control> ctrls; |
| struct v4l2_ext_control ctrl; |
| memset(&ctrl, 0, sizeof(ctrl)); |
| - ctrl.id = V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME; |
| + // Nyan still uses the old control and it reports success for unknown |
|
Pawel Osciak
2016/06/16 07:54:46
Please add a TODO() with a crbug link.
wuchengli
2016/06/16 08:18:57
Done.
|
| + // controls. Try the old control first. |
| + ctrl.id = V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE; |
| + ctrl.value = V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME; |
| ctrls.push_back(ctrl); |
| if (!SetExtCtrls(ctrls)) { |
| - // Some platforms still use the old control. Fallback before they are |
| - // updated. |
| ctrls.clear(); |
| memset(&ctrl, 0, sizeof(ctrl)); |
| - ctrl.id = V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE; |
| - ctrl.value = V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME; |
| + ctrl.id = V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME; |
| ctrls.push_back(ctrl); |
| if (!SetExtCtrls(ctrls)) { |
| LOG(ERROR) << "Failed requesting keyframe"; |