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

Side by Side Diff: webrtc/api/webrtcsdp.cc

Issue 1888373002: Don't write spaces after semicolons in FMTP lines. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed a space in an objc test expectation Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/objctests/RTCSessionDescriptionTest.mm ('k') | webrtc/api/webrtcsdp_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 const std::string& parameter_value, 1557 const std::string& parameter_value,
1558 std::ostringstream* os) { 1558 std::ostringstream* os) {
1559 // fmtp parameters: |parameter_name|=|parameter_value| 1559 // fmtp parameters: |parameter_name|=|parameter_value|
1560 *os << parameter_name << kSdpDelimiterEqual << parameter_value; 1560 *os << parameter_name << kSdpDelimiterEqual << parameter_value;
1561 } 1561 }
1562 1562
1563 void WriteFmtpParameters(const cricket::CodecParameterMap& parameters, 1563 void WriteFmtpParameters(const cricket::CodecParameterMap& parameters,
1564 std::ostringstream* os) { 1564 std::ostringstream* os) {
1565 for (cricket::CodecParameterMap::const_iterator fmtp = parameters.begin(); 1565 for (cricket::CodecParameterMap::const_iterator fmtp = parameters.begin();
1566 fmtp != parameters.end(); ++fmtp) { 1566 fmtp != parameters.end(); ++fmtp) {
1567 // Each new parameter, except the first one starts with ";" and " ". 1567 // Parameters are a semicolon-separated list, no spaces.
1568 if (fmtp != parameters.begin()) { 1568 // The list is separated from the header by a space.
1569 if (fmtp == parameters.begin()) {
1570 *os << kSdpDelimiterSpace;
1571 } else {
1569 *os << kSdpDelimiterSemicolon; 1572 *os << kSdpDelimiterSemicolon;
1570 } 1573 }
1571 *os << kSdpDelimiterSpace;
1572 WriteFmtpParameter(fmtp->first, fmtp->second, os); 1574 WriteFmtpParameter(fmtp->first, fmtp->second, os);
1573 } 1575 }
1574 } 1576 }
1575 1577
1576 bool IsFmtpParam(const std::string& name) { 1578 bool IsFmtpParam(const std::string& name) {
1577 const char* kFmtpParams[] = { 1579 const char* kFmtpParams[] = {
1578 // TODO(hta): Split FMTP parameters apart from parameters in general. 1580 // TODO(hta): Split FMTP parameters apart from parameters in general.
1579 // FMTP parameters are codec specific, not generic. 1581 // FMTP parameters are codec specific, not generic.
1580 kCodecParamMinPTime, 1582 kCodecParamMinPTime,
1581 kCodecParamSPropStereo, 1583 kCodecParamSPropStereo,
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
3171 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( 3173 UpdateCodec<AudioContentDescription, cricket::AudioCodec>(
3172 media_desc, payload_type, feedback_param); 3174 media_desc, payload_type, feedback_param);
3173 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { 3175 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
3174 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( 3176 UpdateCodec<VideoContentDescription, cricket::VideoCodec>(
3175 media_desc, payload_type, feedback_param); 3177 media_desc, payload_type, feedback_param);
3176 } 3178 }
3177 return true; 3179 return true;
3178 } 3180 }
3179 3181
3180 } // namespace webrtc 3182 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/objctests/RTCSessionDescriptionTest.mm ('k') | webrtc/api/webrtcsdp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698