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

Unified Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2497773003: Use different RTX payload types for different H264 profiles (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 | « webrtc/media/engine/payload_type_mapper_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index 2ebbd78e9861e837e0a37335794c3a0a7aef1be5..0b8c761170a38d3f19d12870bc68ac287ceeac70 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -22,6 +22,7 @@
#include "webrtc/base/timeutils.h"
#include "webrtc/base/trace_event.h"
#include "webrtc/call.h"
+#include "webrtc/common_video/h264/profile_level_id.h"
#include "webrtc/media/engine/constants.h"
#include "webrtc/media/engine/simulcast.h"
#include "webrtc/media/engine/webrtcmediaengine.h"
@@ -403,7 +404,18 @@ void AddCodecAndMaybeRtxCodec(const VideoCodec& codec,
} else if (CodecNamesEq(codec.name, kVp9CodecName)) {
rtx_payload_type = kDefaultRtxVp9PlType;
} else if (CodecNamesEq(codec.name, kH264CodecName)) {
- rtx_payload_type = kDefaultRtxH264PlType;
+ // Parse H264 profile.
+ const rtc::Optional<webrtc::H264::ProfileLevelId> profile_level_id =
+ webrtc::H264::ParseSdpProfileLevelId(codec.params);
+ if (!profile_level_id)
+ return;
+ const webrtc::H264::Profile profile = profile_level_id->profile;
+ // Only supported rtx for constrained baseline and constrained high profile.
hta-webrtc 2016/11/15 10:41:07 Grammar nit: "In H.264, we only support rtx for co
magjed_webrtc 2016/11/15 17:48:04 Done.
+ if (profile == webrtc::H264::kProfileConstrainedBaseline) {
+ rtx_payload_type = kDefaultRtxH264ConstrainedBaselinePlType;
+ } else if (profile == webrtc::H264::kProfileConstrainedHigh) {
+ rtx_payload_type = kDefaultRtxH264ConstrainedHighPlType;
+ }
hta-webrtc 2016/11/15 10:41:07 "Else" missing - if this is neither of the two abo
magjed_webrtc 2016/11/15 17:48:04 Done.
} else if (CodecNamesEq(codec.name, kRedCodecName)) {
rtx_payload_type = kDefaultRtxRedPlType;
} else {
« no previous file with comments | « webrtc/media/engine/payload_type_mapper_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698