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 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1567 if (fmtp != parameters.begin()) { | 1567 if (fmtp != parameters.begin()) { |
1568 *os << kSdpDelimiterSemicolon; | 1568 *os << kSdpDelimiterSemicolon; |
1569 } | 1569 } |
1570 *os << kSdpDelimiterSpace; | 1570 *os << kSdpDelimiterSpace; |
1571 WriteFmtpParameter(fmtp->first, fmtp->second, os); | 1571 WriteFmtpParameter(fmtp->first, fmtp->second, os); |
1572 } | 1572 } |
1573 } | 1573 } |
1574 | 1574 |
1575 bool IsFmtpParam(const std::string& name) { | 1575 bool IsFmtpParam(const std::string& name) { |
1576 const char* kFmtpParams[] = { | 1576 const char* kFmtpParams[] = { |
1577 kCodecParamMinPTime, kCodecParamSPropStereo, | 1577 // TODO(hta): Split FMTP parameters apart from parameters in general. |
1578 kCodecParamStereo, kCodecParamUseInbandFec, kCodecParamUseDtx, | 1578 // FMTP parameters are codec specific, not generic. |
1579 kCodecParamStartBitrate, kCodecParamMaxBitrate, kCodecParamMinBitrate, | 1579 kCodecParamMinPTime, |
1580 kCodecParamMaxQuantization, kCodecParamSctpProtocol, kCodecParamSctpStreams, | 1580 kCodecParamSPropStereo, |
1581 kCodecParamMaxAverageBitrate, kCodecParamMaxPlaybackRate, | 1581 kCodecParamStereo, |
1582 kCodecParamAssociatedPayloadType | 1582 kCodecParamUseInbandFec, |
1583 }; | 1583 kCodecParamUseDtx, |
1584 kCodecParamStartBitrate, | |
1585 kCodecParamMaxBitrate, | |
1586 kCodecParamMinBitrate, | |
1587 kCodecParamMaxQuantization, | |
1588 kCodecParamSctpProtocol, | |
1589 kCodecParamSctpStreams, | |
1590 kCodecParamMaxAverageBitrate, | |
1591 kCodecParamMaxPlaybackRate, | |
1592 kCodecParamAssociatedPayloadType, | |
1593 cricket::kH264FmtpPacketizationMode, | |
1594 cricket::kH264FmtpLevelAsymmetryAllowed, | |
1595 cricket::kH264FmtpProfileLevelId}; | |
1584 for (size_t i = 0; i < arraysize(kFmtpParams); ++i) { | 1596 for (size_t i = 0; i < arraysize(kFmtpParams); ++i) { |
1585 if (_stricmp(name.c_str(), kFmtpParams[i]) == 0) { | 1597 if (name.compare(kFmtpParams[i]) == 0) { |
juberti2
2016/04/13 20:20:58
These should be case insensitive comparisons. This
hta-webrtc
2016/04/13 20:43:58
Citation? I checked the SDP RFC, and it said "case
| |
1586 return true; | 1598 return true; |
1587 } | 1599 } |
1588 } | 1600 } |
1589 return false; | 1601 return false; |
1590 } | 1602 } |
1591 | 1603 |
1592 // Retreives fmtp parameters from |params|, which may contain other parameters | 1604 // Retreives fmtp parameters from |params|, which may contain other parameters |
1593 // as well, and puts them in |fmtp_parameters|. | 1605 // as well, and puts them in |fmtp_parameters|. |
1594 void GetFmtpParams(const cricket::CodecParameterMap& params, | 1606 void GetFmtpParams(const cricket::CodecParameterMap& params, |
1595 cricket::CodecParameterMap* fmtp_parameters) { | 1607 cricket::CodecParameterMap* fmtp_parameters) { |
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3156 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( | 3168 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( |
3157 media_desc, payload_type, feedback_param); | 3169 media_desc, payload_type, feedback_param); |
3158 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { | 3170 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { |
3159 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( | 3171 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( |
3160 media_desc, payload_type, feedback_param); | 3172 media_desc, payload_type, feedback_param); |
3161 } | 3173 } |
3162 return true; | 3174 return true; |
3163 } | 3175 } |
3164 | 3176 |
3165 } // namespace webrtc | 3177 } // namespace webrtc |
OLD | NEW |