Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Unified Diff: media/gpu/v4l2_video_encode_accelerator.cc

Issue 2069923005: V4L2VEA: fix keyframe is not generated on nyan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698