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/pc/webrtcsdp.cc

Issue 2661453003: Simplify IsFmtpParam according to RFC 4855. (Closed)
Patch Set: Removed case-insensitive comparison. Added tests. Created 3 years, 11 months 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 | webrtc/pc/webrtcsdp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/webrtcsdp.cc
diff --git a/webrtc/pc/webrtcsdp.cc b/webrtc/pc/webrtcsdp.cc
index f1b9052b9f6de90f636759ad2d74997f4eed1dcc..11eefe5c3d5098f88ce8a884c5535d7dd14248cf 100644
--- a/webrtc/pc/webrtcsdp.cc
+++ b/webrtc/pc/webrtcsdp.cc
@@ -1597,33 +1597,11 @@ void WriteFmtpParameters(const cricket::CodecParameterMap& parameters,
}
bool IsFmtpParam(const std::string& name) {
- const char* kFmtpParams[] = {
- // TODO(hta): Split FMTP parameters apart from parameters in general.
- // FMTP parameters are codec specific, not generic.
- kCodecParamMinPTime,
- kCodecParamSPropStereo,
- kCodecParamStereo,
- kCodecParamUseInbandFec,
- kCodecParamUseDtx,
- kCodecParamStartBitrate,
- kCodecParamMaxBitrate,
- kCodecParamMinBitrate,
- kCodecParamMaxQuantization,
- kCodecParamSctpProtocol,
- kCodecParamSctpStreams,
- kCodecParamMaxAverageBitrate,
- kCodecParamMaxPlaybackRate,
- kCodecParamAssociatedPayloadType,
- cricket::kH264FmtpPacketizationMode,
- cricket::kH264FmtpLevelAsymmetryAllowed,
- cricket::kH264FmtpProfileLevelId,
- cricket::kFlexfecFmtpRepairWindow};
- for (size_t i = 0; i < arraysize(kFmtpParams); ++i) {
- if (name.compare(kFmtpParams[i]) == 0) {
- return true;
- }
- }
- return false;
+ // RFC 4855, section 3 specifies the mapping of media format parameters to SDP
+ // parameters. Only ptime, maxptime, channels and rate are placed outside of
+ // the fmtp line. In WebRTC, channels and rate are already handled separately
+ // and thus not included in the CodecParameterMap.
+ return name != kCodecParamPTime && name != kCodecParamMaxPTime;
}
// Retreives fmtp parameters from |params|, which may contain other parameters
« no previous file with comments | « no previous file | webrtc/pc/webrtcsdp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698