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

Unified Diff: webrtc/pc/mediasession.cc

Issue 2483173002: Negotiate H264 profiles in SDP (Closed)
Patch Set: Extract IsSameH264Profile and don't check payload type in FindMatchingCodec 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/pc/DEPS ('k') | webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/mediasession.cc
diff --git a/webrtc/pc/mediasession.cc b/webrtc/pc/mediasession.cc
index cc93a8b170619e834efc44c0f2bdc0f2f860e656..f91a7297204541d7fcf24b82b053273e9dc614f6 100644
--- a/webrtc/pc/mediasession.cc
+++ b/webrtc/pc/mediasession.cc
@@ -22,6 +22,7 @@
#include "webrtc/base/helpers.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/stringutils.h"
+#include "webrtc/common_video/h264/profile_level_id.h"
#include "webrtc/media/base/cryptoparams.h"
#include "webrtc/media/base/mediaconstants.h"
#include "webrtc/p2p/base/p2pconstants.h"
@@ -778,6 +779,10 @@ static void NegotiateCodecs(const std::vector<C>& local_codecs,
RTC_DCHECK(apt_it != theirs.params.end());
negotiated.SetParam(kCodecParamAssociatedPayloadType, apt_it->second);
}
+ if (CodecNamesEq(ours.name.c_str(), kH264CodecName)) {
+ webrtc::H264::GenerateProfileLevelIdForAnswer(
+ ours.params, theirs.params, &negotiated.params);
+ }
negotiated.id = theirs.id;
negotiated.name = theirs.name;
negotiated_codecs->push_back(std::move(negotiated));
« no previous file with comments | « webrtc/pc/DEPS ('k') | webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698