| Index: content/common/gpu/media/v4l2_video_encode_accelerator.cc
|
| diff --git a/content/common/gpu/media/v4l2_video_encode_accelerator.cc b/content/common/gpu/media/v4l2_video_encode_accelerator.cc
|
| index d724d8dea40fb159fd6868e52e16281a3e14f41b..4d58cd17c55ff166a1368268750f8455c5ad2d6a 100644
|
| --- a/content/common/gpu/media/v4l2_video_encode_accelerator.cc
|
| +++ b/content/common/gpu/media/v4l2_video_encode_accelerator.cc
|
| @@ -360,15 +360,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";
|
|
|