| Index: webrtc/sdk/android/src/jni/androidmediaencoder_jni.cc
|
| diff --git a/webrtc/sdk/android/src/jni/androidmediaencoder_jni.cc b/webrtc/sdk/android/src/jni/androidmediaencoder_jni.cc
|
| index 17c6a1833cbdc59a0f6532f600b95ca7fada2c8b..95bc13974eed9d08218cd2be96916568bf756853 100644
|
| --- a/webrtc/sdk/android/src/jni/androidmediaencoder_jni.cc
|
| +++ b/webrtc/sdk/android/src/jni/androidmediaencoder_jni.cc
|
| @@ -1219,15 +1219,25 @@ MediaCodecVideoEncoderFactory::MediaCodecVideoEncoderFactory()
|
| CHECK_EXCEPTION(jni);
|
| if (is_h264_hw_supported) {
|
| ALOGD << "H.264 HW Encoder supported.";
|
| + // TODO(magjed): Enumerate actual level instead of using hardcoded level
|
| + // 3.1. Level 3.1 is 1280x720@30fps which is enough for now.
|
| + const webrtc::H264::Level level = webrtc::H264::kLevel3_1;
|
| + cricket::VideoCodec constrained_high(cricket::kH264CodecName);
|
| + const webrtc::H264::ProfileLevelId constrained_high_profile(
|
| + webrtc::H264::kProfileConstrainedHigh, level);
|
| + constrained_high.SetParam(
|
| + cricket::kH264FmtpProfileLevelId,
|
| + *webrtc::H264::ProfileLevelIdToString(constrained_high_profile));
|
| + constrained_high.SetParam(cricket::kH264FmtpLevelAsymmetryAllowed, "1");
|
| + constrained_high.SetParam(cricket::kH264FmtpPacketizationMode, "1");
|
| + supported_codecs_.push_back(constrained_high);
|
| // TODO(magjed): Push Constrained High profile as well when negotiation is
|
| // ready, http://crbug/webrtc/6337. We can negotiate Constrained High
|
| // profile as long as we have decode support for it and still send Baseline
|
| // since Baseline is a subset of the High profile.
|
| cricket::VideoCodec constrained_baseline(cricket::kH264CodecName);
|
| - // TODO(magjed): Enumerate actual level instead of using hardcoded level
|
| - // 3.1. Level 3.1 is 1280x720@30fps which is enough for now.
|
| const webrtc::H264::ProfileLevelId constrained_baseline_profile(
|
| - webrtc::H264::kProfileConstrainedBaseline, webrtc::H264::kLevel3_1);
|
| + webrtc::H264::kProfileConstrainedBaseline, level);
|
| constrained_baseline.SetParam(
|
| cricket::kH264FmtpProfileLevelId,
|
| *webrtc::H264::ProfileLevelIdToString(constrained_baseline_profile));
|
|
|