| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // draft-ietf-mmusic-trickle-ice-01 | 197 // draft-ietf-mmusic-trickle-ice-01 |
| 198 // When no candidates have been gathered, set the connection | 198 // When no candidates have been gathered, set the connection |
| 199 // address to IP6 ::. | 199 // address to IP6 ::. |
| 200 // TODO(perkj): FF can not parse IP6 ::. See http://crbug/430333 | 200 // TODO(perkj): FF can not parse IP6 ::. See http://crbug/430333 |
| 201 // Use IPV4 per default. | 201 // Use IPV4 per default. |
| 202 static const char kDummyAddress[] = "0.0.0.0"; | 202 static const char kDummyAddress[] = "0.0.0.0"; |
| 203 static const char kDummyPort[] = "9"; | 203 static const char kDummyPort[] = "9"; |
| 204 // RFC 3556 | 204 // RFC 3556 |
| 205 static const char kApplicationSpecificMaximum[] = "AS"; | 205 static const char kApplicationSpecificMaximum[] = "AS"; |
| 206 | 206 |
| 207 static const int kDefaultVideoClockrate = 90000; | |
| 208 | |
| 209 static const char kDefaultSctpmapProtocol[] = "webrtc-datachannel"; | 207 static const char kDefaultSctpmapProtocol[] = "webrtc-datachannel"; |
| 210 | 208 |
| 211 // RTP payload type is in the 0-127 range. Use -1 to indicate "all" payload | 209 // RTP payload type is in the 0-127 range. Use -1 to indicate "all" payload |
| 212 // types. | 210 // types. |
| 213 const int kWildcardPayloadType = -1; | 211 const int kWildcardPayloadType = -1; |
| 214 | 212 |
| 215 struct SsrcInfo { | 213 struct SsrcInfo { |
| 216 uint32_t ssrc_id; | 214 uint32_t ssrc_id; |
| 217 std::string cname; | 215 std::string cname; |
| 218 std::string stream_id; | 216 std::string stream_id; |
| (...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1712 const VideoContentDescription* video_desc = | 1710 const VideoContentDescription* video_desc = |
| 1713 static_cast<const VideoContentDescription*>(media_desc); | 1711 static_cast<const VideoContentDescription*>(media_desc); |
| 1714 for (std::vector<cricket::VideoCodec>::const_iterator it = | 1712 for (std::vector<cricket::VideoCodec>::const_iterator it = |
| 1715 video_desc->codecs().begin(); | 1713 video_desc->codecs().begin(); |
| 1716 it != video_desc->codecs().end(); ++it) { | 1714 it != video_desc->codecs().end(); ++it) { |
| 1717 // RFC 4566 | 1715 // RFC 4566 |
| 1718 // a=rtpmap:<payload type> <encoding name>/<clock rate> | 1716 // a=rtpmap:<payload type> <encoding name>/<clock rate> |
| 1719 // [/<encodingparameters>] | 1717 // [/<encodingparameters>] |
| 1720 if (it->id != kWildcardPayloadType) { | 1718 if (it->id != kWildcardPayloadType) { |
| 1721 InitAttrLine(kAttributeRtpmap, &os); | 1719 InitAttrLine(kAttributeRtpmap, &os); |
| 1722 os << kSdpDelimiterColon << it->id << " " << it->name | 1720 os << kSdpDelimiterColon << it->id << " " << it->name << "/" |
| 1723 << "/" << kDefaultVideoClockrate; | 1721 << cricket::kVideoCodecClockrate; |
| 1724 AddLine(os.str(), message); | 1722 AddLine(os.str(), message); |
| 1725 } | 1723 } |
| 1726 AddRtcpFbLines(*it, message); | 1724 AddRtcpFbLines(*it, message); |
| 1727 AddFmtpLine(*it, message); | 1725 AddFmtpLine(*it, message); |
| 1728 } | 1726 } |
| 1729 } else if (media_type == cricket::MEDIA_TYPE_AUDIO) { | 1727 } else if (media_type == cricket::MEDIA_TYPE_AUDIO) { |
| 1730 const AudioContentDescription* audio_desc = | 1728 const AudioContentDescription* audio_desc = |
| 1731 static_cast<const AudioContentDescription*>(media_desc); | 1729 static_cast<const AudioContentDescription*>(media_desc); |
| 1732 std::vector<int> ptimes; | 1730 std::vector<int> ptimes; |
| 1733 std::vector<int> maxptimes; | 1731 std::vector<int> maxptimes; |
| (...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3212 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( | 3210 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( |
| 3213 media_desc, payload_type, feedback_param); | 3211 media_desc, payload_type, feedback_param); |
| 3214 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { | 3212 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { |
| 3215 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( | 3213 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( |
| 3216 media_desc, payload_type, feedback_param); | 3214 media_desc, payload_type, feedback_param); |
| 3217 } | 3215 } |
| 3218 return true; | 3216 return true; |
| 3219 } | 3217 } |
| 3220 | 3218 |
| 3221 } // namespace webrtc | 3219 } // namespace webrtc |
| OLD | NEW |