| 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..9dc5df86daabb9e8f9b3e88e19825d9b51a8887b 100644
|
| --- a/media/gpu/v4l2_video_encode_accelerator.cc
|
| +++ b/media/gpu/v4l2_video_encode_accelerator.cc
|
| @@ -428,15 +428,16 @@ 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
|
| + // controls. Try the old control first.
|
| + // TODO(wuchengli): remove this after http://crosbug.com/p/53598 is fixed.
|
| + 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";
|
|
|