| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |