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 d07574008eddcfc7f83501f1b85cd8b902bd8a57..67f5a1bb9bf30159524f58ccf45aa01052cbcb11 100644 |
--- a/content/common/gpu/media/v4l2_video_encode_accelerator.cc |
+++ b/content/common/gpu/media/v4l2_video_encode_accelerator.cc |
@@ -289,7 +289,6 @@ media::VideoEncodeAccelerator::SupportedProfiles |
V4L2VideoEncodeAccelerator::GetSupportedProfiles() { |
SupportedProfiles profiles; |
SupportedProfile profile; |
- profile.max_resolution.SetSize(1920, 1088); |
profile.max_framerate_numerator = 30; |
profile.max_framerate_denominator = 1; |
@@ -297,6 +296,14 @@ V4L2VideoEncodeAccelerator::GetSupportedProfiles() { |
memset(&fmtdesc, 0, sizeof(fmtdesc)); |
fmtdesc.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; |
for (; device_->Ioctl(VIDIOC_ENUM_FMT, &fmtdesc) == 0; ++fmtdesc.index) { |
+ // Get maximum resolution for each format |
+ profile.max_resolution = V4L2Device::GetSupportedMaxResolution( |
+ device_, fmtdesc.pixelformat); |
+ if (profile.max_resolution.IsEmpty()) { |
wuchengli
2015/04/20 14:05:16
remove
henryhsu
2015/04/21 05:56:28
Done.
|
+ LOG(ERROR) << "GetSupportedMaxResolution failed for format " |
+ << std::hex << fmtdesc.pixelformat; |
+ profile.max_resolution.SetSize(1920, 1088); |
+ } |
switch (fmtdesc.pixelformat) { |
case V4L2_PIX_FMT_H264: |
profile.profile = media::H264PROFILE_MAIN; |