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

Unified Diff: webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc

Issue 2531823002: iOS HW encoder: Enable H264 High profile support (Closed)
Patch Set: Created 4 years, 1 month 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: webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc
diff --git a/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc b/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc
index 8acc1f6e681d9544c406c56ee6684d1fed215035..56093fdfdcf44525537fff5c58e104f08e14e5db 100644
--- a/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc
+++ b/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc
@@ -24,13 +24,23 @@ namespace webrtc {
VideoToolboxVideoEncoderFactory::VideoToolboxVideoEncoderFactory() {
// Hardware H264 encoding only supported on iOS for now.
#if defined(WEBRTC_IOS)
- // TODO(magjed): Push Constrained High profile as well when negotiation is
- // ready, http://crbug/webrtc/6337.
- 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 H264::Level level = H264::kLevel3_1;
+
+ cricket::VideoCodec constrained_high(cricket::kH264CodecName);
+ const H264::ProfileLevelId constrained_high_profile(
+ H264::kProfileConstrainedHigh, level);
+ constrained_high.SetParam(
+ cricket::kH264FmtpProfileLevelId,
+ *H264::ProfileLevelIdToString(constrained_high_profile));
+ constrained_high.SetParam(cricket::kH264FmtpLevelAsymmetryAllowed, "1");
+ constrained_high.SetParam(cricket::kH264FmtpPacketizationMode, "1");
+ supported_codecs_.push_back(constrained_high);
+
+ cricket::VideoCodec constrained_baseline(cricket::kH264CodecName);
const H264::ProfileLevelId constrained_baseline_profile(
- H264::kProfileConstrainedBaseline, H264::kLevel3_1);
+ H264::kProfileConstrainedBaseline, level);
constrained_baseline.SetParam(
cricket::kH264FmtpProfileLevelId,
*H264::ProfileLevelIdToString(constrained_baseline_profile));
« 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