Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1023 return false; | 1023 return false; |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 if (!AddStreamParams(answer->type(), options, current_streams, answer, | 1026 if (!AddStreamParams(answer->type(), options, current_streams, answer, |
| 1027 add_legacy_stream)) { | 1027 add_legacy_stream)) { |
| 1028 return false; // Something went seriously wrong. | 1028 return false; // Something went seriously wrong. |
| 1029 } | 1029 } |
| 1030 | 1030 |
| 1031 // Make sure the answer media content direction is per default set as | 1031 // Make sure the answer media content direction is per default set as |
| 1032 // described in RFC3264 section 6.1. | 1032 // described in RFC3264 section 6.1. |
| 1033 const bool should_send = | |
| 1034 !IsRtpProtocol(answer->protocol()) || !answer->streams().empty(); | |
|
pthatcher1
2016/05/31 21:52:36
This would be more clear as:
const bool is_data =
ossu
2016/06/02 13:28:02
Acknowledged.
| |
| 1035 const bool should_receive = | |
| 1036 answer->type() == cricket::MEDIA_TYPE_VIDEO ? options.recv_video : | |
| 1037 (answer->type() == cricket::MEDIA_TYPE_AUDIO ? options.recv_audio : true); | |
|
ossu
2016/05/25 11:26:14
I expect that since there's no flag for data, we'l
| |
| 1038 | |
| 1033 switch (offer->direction()) { | 1039 switch (offer->direction()) { |
| 1034 case MD_INACTIVE: | 1040 case MD_INACTIVE: |
| 1035 answer->set_direction(MD_INACTIVE); | 1041 answer->set_direction(MD_INACTIVE); |
| 1036 break; | 1042 break; |
| 1037 case MD_SENDONLY: | 1043 case MD_SENDONLY: |
| 1038 answer->set_direction(MD_RECVONLY); | 1044 answer->set_direction(should_receive ? MD_RECVONLY : MD_INACTIVE); |
| 1039 break; | 1045 break; |
| 1040 case MD_RECVONLY: | 1046 case MD_RECVONLY: |
| 1041 answer->set_direction(IsRtpProtocol(answer->protocol()) && | 1047 answer->set_direction(should_send ? MD_SENDONLY : MD_INACTIVE); |
| 1042 answer->streams().empty() | |
| 1043 ? MD_INACTIVE | |
| 1044 : MD_SENDONLY); | |
| 1045 break; | 1048 break; |
| 1046 case MD_SENDRECV: | 1049 case MD_SENDRECV: |
| 1047 answer->set_direction(IsRtpProtocol(answer->protocol()) && | 1050 answer->set_direction(should_send |
| 1048 answer->streams().empty() | 1051 ? (should_receive ? MD_SENDRECV : MD_SENDONLY) |
| 1049 ? MD_RECVONLY | 1052 : (should_receive ? MD_RECVONLY : MD_INACTIVE)); |
| 1050 : MD_SENDRECV); | |
| 1051 break; | 1053 break; |
|
pthatcher1
2016/05/31 21:52:36
I think this would be more clear if we made an Rtp
ossu
2016/06/02 13:28:02
I've put an RtpTranscieverDirection in and changed
| |
| 1052 default: | 1054 default: |
| 1053 RTC_DCHECK(false && "MediaContentDescription has unexpected direction."); | 1055 RTC_DCHECK(false && "MediaContentDescription has unexpected direction."); |
| 1054 break; | 1056 break; |
| 1055 } | 1057 } |
| 1056 | 1058 |
| 1057 return true; | 1059 return true; |
| 1058 } | 1060 } |
| 1059 | 1061 |
| 1060 static bool IsDtlsRtp(const std::string& protocol) { | 1062 static bool IsDtlsRtp(const std::string& protocol) { |
| 1061 // Most-likely values first. | 1063 // Most-likely values first. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1166 case MEDIA_TYPE_DATA: | 1168 case MEDIA_TYPE_DATA: |
| 1167 type_str = "data"; | 1169 type_str = "data"; |
| 1168 break; | 1170 break; |
| 1169 default: | 1171 default: |
| 1170 ASSERT(false); | 1172 ASSERT(false); |
| 1171 break; | 1173 break; |
| 1172 } | 1174 } |
| 1173 return type_str; | 1175 return type_str; |
| 1174 } | 1176 } |
| 1175 | 1177 |
| 1178 std::string MediaContentDirectionToString(MediaContentDirection direction) { | |
| 1179 switch (direction) { | |
| 1180 case MD_INACTIVE: | |
| 1181 return "inactive"; | |
| 1182 case MD_SENDONLY: | |
| 1183 return "sendonly"; | |
| 1184 case MD_RECVONLY: | |
| 1185 return "recvonly"; | |
| 1186 case MD_SENDRECV: | |
| 1187 return "sendrecv"; | |
| 1188 default: | |
| 1189 ASSERT(false); | |
| 1190 break; | |
| 1191 } | |
| 1192 } | |
| 1193 | |
| 1176 void MediaSessionOptions::AddSendStream(MediaType type, | 1194 void MediaSessionOptions::AddSendStream(MediaType type, |
| 1177 const std::string& id, | 1195 const std::string& id, |
| 1178 const std::string& sync_label) { | 1196 const std::string& sync_label) { |
| 1179 AddSendStreamInternal(type, id, sync_label, 1); | 1197 AddSendStreamInternal(type, id, sync_label, 1); |
| 1180 } | 1198 } |
| 1181 | 1199 |
| 1182 void MediaSessionOptions::AddSendVideoStream( | 1200 void MediaSessionOptions::AddSendVideoStream( |
| 1183 const std::string& id, | 1201 const std::string& id, |
| 1184 const std::string& sync_label, | 1202 const std::string& sync_label, |
| 1185 int num_sim_layers) { | 1203 int num_sim_layers) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1227 add_legacy_(true), | 1245 add_legacy_(true), |
| 1228 transport_desc_factory_(transport_desc_factory) { | 1246 transport_desc_factory_(transport_desc_factory) { |
| 1229 } | 1247 } |
| 1230 | 1248 |
| 1231 MediaSessionDescriptionFactory::MediaSessionDescriptionFactory( | 1249 MediaSessionDescriptionFactory::MediaSessionDescriptionFactory( |
| 1232 ChannelManager* channel_manager, | 1250 ChannelManager* channel_manager, |
| 1233 const TransportDescriptionFactory* transport_desc_factory) | 1251 const TransportDescriptionFactory* transport_desc_factory) |
| 1234 : secure_(SEC_DISABLED), | 1252 : secure_(SEC_DISABLED), |
| 1235 add_legacy_(true), | 1253 add_legacy_(true), |
| 1236 transport_desc_factory_(transport_desc_factory) { | 1254 transport_desc_factory_(transport_desc_factory) { |
| 1237 channel_manager->GetSupportedAudioCodecs(&audio_codecs_); | 1255 channel_manager->GetSupportedAudioCodecs(&audio_sendrecv_codecs_); |
| 1238 channel_manager->GetSupportedAudioRtpHeaderExtensions(&audio_rtp_extensions_); | 1256 channel_manager->GetSupportedAudioRtpHeaderExtensions(&audio_rtp_extensions_); |
| 1239 channel_manager->GetSupportedVideoCodecs(&video_codecs_); | 1257 channel_manager->GetSupportedVideoCodecs(&video_codecs_); |
| 1240 channel_manager->GetSupportedVideoRtpHeaderExtensions(&video_rtp_extensions_); | 1258 channel_manager->GetSupportedVideoRtpHeaderExtensions(&video_rtp_extensions_); |
| 1241 channel_manager->GetSupportedDataCodecs(&data_codecs_); | 1259 channel_manager->GetSupportedDataCodecs(&data_codecs_); |
| 1260 audio_send_codecs_ = audio_sendrecv_codecs_; | |
| 1261 audio_recv_codecs_ = audio_sendrecv_codecs_; | |
| 1262 } | |
| 1263 | |
| 1264 const AudioCodecs& MediaSessionDescriptionFactory::audio_codecs() const { | |
|
pthatcher1
2016/05/31 21:52:35
This could be renamed to audio_sendrecv_codecs().
| |
| 1265 return audio_sendrecv_codecs_; | |
| 1266 } | |
| 1267 | |
| 1268 const AudioCodecs& MediaSessionDescriptionFactory::audio_send_codecs() const { | |
| 1269 return audio_send_codecs_; | |
| 1270 } | |
| 1271 | |
| 1272 const AudioCodecs& MediaSessionDescriptionFactory::audio_recv_codecs() const { | |
| 1273 return audio_recv_codecs_; | |
| 1274 } | |
| 1275 | |
| 1276 void MediaSessionDescriptionFactory::set_audio_codecs( | |
| 1277 const AudioCodecs& send_and_recv_codecs) { | |
| 1278 audio_send_codecs_ = send_and_recv_codecs; | |
| 1279 audio_recv_codecs_ = send_and_recv_codecs; | |
| 1280 audio_sendrecv_codecs_ = send_and_recv_codecs; | |
| 1281 } | |
| 1282 | |
| 1283 void MediaSessionDescriptionFactory::set_audio_codecs( | |
| 1284 const AudioCodecs& send_codecs, const AudioCodecs& recv_codecs) { | |
| 1285 audio_send_codecs_ = send_codecs; | |
| 1286 audio_recv_codecs_ = recv_codecs; | |
| 1287 audio_sendrecv_codecs_.clear(); | |
| 1288 | |
| 1289 // Intersect the two lists of codecs, preserving the order of the send codecs. | |
| 1290 // If there's any difference in priorities, chances are encoding is more | |
| 1291 // expensive than decoding, and high-priority send codecs are likely handled | |
| 1292 // better (e.g. through hardware encoder support) than low-priority ones. | |
| 1293 // TODO(ossu): This is O(n^2). However, each list should generally be small | |
| 1294 // enough for this to not be a problem. They are also nicely local in memory | |
| 1295 // like this. | |
| 1296 for (const auto& sc : audio_send_codecs_) { | |
| 1297 for (const auto& rc : audio_recv_codecs_) { | |
| 1298 const size_t send_channels = (sc.channels == 0) ? 1 : sc.channels; | |
| 1299 const size_t recv_channels = (rc.channels == 0) ? 1 : rc.channels; | |
| 1300 if (sc.clockrate == rc.clockrate && | |
| 1301 sc.bitrate == rc.bitrate && | |
| 1302 send_channels == recv_channels && | |
| 1303 (_stricmp(sc.name.c_str(), rc.name.c_str()) == 0) && | |
| 1304 sc.params == rc.params && | |
| 1305 sc.feedback_params == rc.feedback_params) { | |
| 1306 AudioCodec out_codec = sc; | |
| 1307 out_codec.channels = send_channels; | |
| 1308 audio_sendrecv_codecs_.push_back(out_codec); | |
| 1309 break; | |
| 1310 } | |
| 1311 } | |
| 1312 } | |
| 1242 } | 1313 } |
| 1243 | 1314 |
| 1244 SessionDescription* MediaSessionDescriptionFactory::CreateOffer( | 1315 SessionDescription* MediaSessionDescriptionFactory::CreateOffer( |
| 1245 const MediaSessionOptions& options, | 1316 const MediaSessionOptions& options, |
| 1246 const SessionDescription* current_description) const { | 1317 const SessionDescription* current_description) const { |
| 1247 std::unique_ptr<SessionDescription> offer(new SessionDescription()); | 1318 std::unique_ptr<SessionDescription> offer(new SessionDescription()); |
| 1248 | 1319 |
| 1249 StreamParamsVec current_streams; | 1320 StreamParamsVec current_streams; |
| 1250 GetCurrentStreamParams(current_description, ¤t_streams); | 1321 GetCurrentStreamParams(current_description, ¤t_streams); |
| 1251 | 1322 |
| 1323 const AudioCodecs *supported_audio_codecs; | |
| 1324 if (options.HasSendMediaStream(MEDIA_TYPE_AUDIO) || add_legacy_) { | |
| 1325 if (options.recv_audio) { | |
| 1326 // sendrecv | |
| 1327 supported_audio_codecs = &audio_sendrecv_codecs_; | |
| 1328 } else { | |
| 1329 // sendonly | |
| 1330 supported_audio_codecs = &audio_send_codecs_; | |
| 1331 } | |
| 1332 } else if (options.recv_audio) { | |
| 1333 // recvonly | |
| 1334 supported_audio_codecs = &audio_recv_codecs_; | |
| 1335 } else { | |
| 1336 // Stream is inactive - generate list as if sendrecv. | |
| 1337 // See RFC 3264 Section 6.1. | |
| 1338 supported_audio_codecs = &audio_sendrecv_codecs_; | |
| 1339 } | |
|
pthatcher1
2016/05/31 21:52:36
Would it make sense to make a method like this?
c
ossu
2016/06/02 13:28:02
Why not have it take an RtpTranscieverDirection di
pthatcher1
2016/06/02 22:29:17
Sounds like a great idea.
| |
| 1340 | |
| 1252 AudioCodecs audio_codecs; | 1341 AudioCodecs audio_codecs; |
| 1253 VideoCodecs video_codecs; | 1342 VideoCodecs video_codecs; |
| 1254 DataCodecs data_codecs; | 1343 DataCodecs data_codecs; |
| 1255 GetCodecsToOffer(current_description, &audio_codecs, &video_codecs, | 1344 GetCodecsToOffer(current_description, *supported_audio_codecs, |
| 1256 &data_codecs); | 1345 video_codecs_, data_codecs_, |
| 1346 &audio_codecs, &video_codecs, &data_codecs); | |
| 1257 | 1347 |
| 1258 if (!options.vad_enabled) { | 1348 if (!options.vad_enabled) { |
| 1259 // If application doesn't want CN codecs in offer. | 1349 // If application doesn't want CN codecs in offer. |
| 1260 StripCNCodecs(&audio_codecs); | 1350 StripCNCodecs(&audio_codecs); |
| 1261 } | 1351 } |
| 1262 | 1352 |
| 1263 RtpHeaderExtensions audio_rtp_extensions; | 1353 RtpHeaderExtensions audio_rtp_extensions; |
| 1264 RtpHeaderExtensions video_rtp_extensions; | 1354 RtpHeaderExtensions video_rtp_extensions; |
| 1265 GetRtpHdrExtsToOffer(current_description, &audio_rtp_extensions, | 1355 GetRtpHdrExtsToOffer(current_description, &audio_rtp_extensions, |
| 1266 &video_rtp_extensions); | 1356 &video_rtp_extensions); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1407 return NULL; | 1497 return NULL; |
| 1408 } | 1498 } |
| 1409 } | 1499 } |
| 1410 } | 1500 } |
| 1411 | 1501 |
| 1412 return answer.release(); | 1502 return answer.release(); |
| 1413 } | 1503 } |
| 1414 | 1504 |
| 1415 void MediaSessionDescriptionFactory::GetCodecsToOffer( | 1505 void MediaSessionDescriptionFactory::GetCodecsToOffer( |
| 1416 const SessionDescription* current_description, | 1506 const SessionDescription* current_description, |
| 1507 const AudioCodecs& supported_audio_codecs, | |
| 1508 const VideoCodecs& supported_video_codecs, | |
| 1509 const DataCodecs& supported_data_codecs, | |
| 1417 AudioCodecs* audio_codecs, | 1510 AudioCodecs* audio_codecs, |
| 1418 VideoCodecs* video_codecs, | 1511 VideoCodecs* video_codecs, |
| 1419 DataCodecs* data_codecs) const { | 1512 DataCodecs* data_codecs) const { |
| 1420 UsedPayloadTypes used_pltypes; | 1513 UsedPayloadTypes used_pltypes; |
| 1421 audio_codecs->clear(); | 1514 audio_codecs->clear(); |
| 1422 video_codecs->clear(); | 1515 video_codecs->clear(); |
| 1423 data_codecs->clear(); | 1516 data_codecs->clear(); |
| 1424 | 1517 |
| 1425 | 1518 |
| 1426 // First - get all codecs from the current description if the media type | 1519 // First - get all codecs from the current description if the media type |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 1442 } | 1535 } |
| 1443 const DataContentDescription* data = | 1536 const DataContentDescription* data = |
| 1444 GetFirstDataContentDescription(current_description); | 1537 GetFirstDataContentDescription(current_description); |
| 1445 if (data) { | 1538 if (data) { |
| 1446 *data_codecs = data->codecs(); | 1539 *data_codecs = data->codecs(); |
| 1447 used_pltypes.FindAndSetIdUsed<DataCodec>(data_codecs); | 1540 used_pltypes.FindAndSetIdUsed<DataCodec>(data_codecs); |
| 1448 } | 1541 } |
| 1449 } | 1542 } |
| 1450 | 1543 |
| 1451 // Add our codecs that are not in |current_description|. | 1544 // Add our codecs that are not in |current_description|. |
| 1452 FindCodecsToOffer<AudioCodec>(audio_codecs_, audio_codecs, &used_pltypes); | 1545 FindCodecsToOffer<AudioCodec>(supported_audio_codecs, audio_codecs, |
| 1453 FindCodecsToOffer<VideoCodec>(video_codecs_, video_codecs, &used_pltypes); | 1546 &used_pltypes); |
| 1454 FindCodecsToOffer<DataCodec>(data_codecs_, data_codecs, &used_pltypes); | 1547 FindCodecsToOffer<VideoCodec>(supported_video_codecs, video_codecs, |
| 1548 &used_pltypes); | |
| 1549 FindCodecsToOffer<DataCodec>(supported_data_codecs, data_codecs, | |
| 1550 &used_pltypes); | |
| 1455 } | 1551 } |
| 1456 | 1552 |
| 1457 void MediaSessionDescriptionFactory::GetRtpHdrExtsToOffer( | 1553 void MediaSessionDescriptionFactory::GetRtpHdrExtsToOffer( |
| 1458 const SessionDescription* current_description, | 1554 const SessionDescription* current_description, |
| 1459 RtpHeaderExtensions* audio_extensions, | 1555 RtpHeaderExtensions* audio_extensions, |
| 1460 RtpHeaderExtensions* video_extensions) const { | 1556 RtpHeaderExtensions* video_extensions) const { |
| 1461 // All header extensions allocated from the same range to avoid potential | 1557 // All header extensions allocated from the same range to avoid potential |
| 1462 // issues when using BUNDLE. | 1558 // issues when using BUNDLE. |
| 1463 UsedRtpHeaderExtensionIds used_ids; | 1559 UsedRtpHeaderExtensionIds used_ids; |
| 1464 RtpHeaderExtensions all_extensions; | 1560 RtpHeaderExtensions all_extensions; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1726 return true; | 1822 return true; |
| 1727 } | 1823 } |
| 1728 | 1824 |
| 1729 bool MediaSessionDescriptionFactory::AddAudioContentForAnswer( | 1825 bool MediaSessionDescriptionFactory::AddAudioContentForAnswer( |
| 1730 const SessionDescription* offer, | 1826 const SessionDescription* offer, |
| 1731 const MediaSessionOptions& options, | 1827 const MediaSessionOptions& options, |
| 1732 const SessionDescription* current_description, | 1828 const SessionDescription* current_description, |
| 1733 StreamParamsVec* current_streams, | 1829 StreamParamsVec* current_streams, |
| 1734 SessionDescription* answer) const { | 1830 SessionDescription* answer) const { |
| 1735 const ContentInfo* audio_content = GetFirstAudioContent(offer); | 1831 const ContentInfo* audio_content = GetFirstAudioContent(offer); |
| 1832 const AudioContentDescription* audio_content_description = | |
|
pthatcher1
2016/05/31 21:52:36
A better name would be offer_audio.
| |
| 1833 static_cast<const AudioContentDescription*>(audio_content->description); | |
| 1736 | 1834 |
| 1737 std::unique_ptr<TransportDescription> audio_transport(CreateTransportAnswer( | 1835 std::unique_ptr<TransportDescription> audio_transport(CreateTransportAnswer( |
| 1738 audio_content->name, offer, | 1836 audio_content->name, offer, |
| 1739 GetTransportOptions(options, audio_content->name), current_description)); | 1837 GetTransportOptions(options, audio_content->name), current_description)); |
| 1740 if (!audio_transport) { | 1838 if (!audio_transport) { |
| 1741 return false; | 1839 return false; |
| 1742 } | 1840 } |
| 1743 | 1841 |
| 1744 AudioCodecs audio_codecs = audio_codecs_; | 1842 // Pick codecs based on the requested communications direction in the offer. |
| 1843 // According to RFC 3264 Section 6.1, inactive is to be treated as sendrecv | |
| 1844 // when constructing the list of supported formats. | |
| 1845 AudioCodecs audio_codecs; | |
| 1846 switch (audio_content_description->direction()) { | |
| 1847 case MD_INACTIVE: | |
| 1848 audio_codecs = audio_sendrecv_codecs_; | |
| 1849 break; | |
| 1850 case MD_SENDRECV: | |
| 1851 if (options.HasSendMediaStream(MEDIA_TYPE_AUDIO) || add_legacy_) { | |
| 1852 audio_codecs = options.recv_audio | |
| 1853 ? audio_sendrecv_codecs_ | |
| 1854 : audio_send_codecs_; | |
| 1855 } else { | |
| 1856 audio_codecs = options.recv_audio | |
| 1857 ? audio_recv_codecs_ | |
| 1858 : audio_sendrecv_codecs_; // inactive | |
| 1859 } | |
| 1860 break; | |
| 1861 case MD_RECVONLY: | |
| 1862 if (options.HasSendMediaStream(MEDIA_TYPE_AUDIO) || add_legacy_) | |
| 1863 audio_codecs = audio_send_codecs_; | |
| 1864 else | |
| 1865 audio_codecs = audio_sendrecv_codecs_; // inactive | |
| 1866 break; | |
| 1867 case MD_SENDONLY: | |
| 1868 if (options.recv_audio) | |
| 1869 audio_codecs = audio_recv_codecs_; | |
| 1870 else | |
| 1871 audio_codecs = audio_sendrecv_codecs_; // inactive | |
| 1872 break; | |
| 1873 } | |
|
pthatcher1
2016/05/31 21:52:36
This could be more simple also:
auto offer_rtd =
| |
| 1874 | |
| 1745 if (!options.vad_enabled) { | 1875 if (!options.vad_enabled) { |
| 1746 StripCNCodecs(&audio_codecs); | 1876 StripCNCodecs(&audio_codecs); |
| 1747 } | 1877 } |
| 1748 | 1878 |
| 1749 bool bundle_enabled = | 1879 bool bundle_enabled = |
| 1750 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled; | 1880 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled; |
| 1751 std::unique_ptr<AudioContentDescription> audio_answer( | 1881 std::unique_ptr<AudioContentDescription> audio_answer( |
| 1752 new AudioContentDescription()); | 1882 new AudioContentDescription()); |
| 1753 // Do not require or create SDES cryptos if DTLS is used. | 1883 // Do not require or create SDES cryptos if DTLS is used. |
| 1754 cricket::SecurePolicy sdes_policy = | 1884 cricket::SecurePolicy sdes_policy = |
| 1755 audio_transport->secure() ? cricket::SEC_DISABLED : secure(); | 1885 audio_transport->secure() ? cricket::SEC_DISABLED : secure(); |
| 1756 if (!CreateMediaContentAnswer( | 1886 if (!CreateMediaContentAnswer( |
| 1757 static_cast<const AudioContentDescription*>( | 1887 audio_content_description, |
| 1758 audio_content->description), | |
| 1759 options, | 1888 options, |
| 1760 audio_codecs, | 1889 audio_codecs, |
| 1761 sdes_policy, | 1890 sdes_policy, |
| 1762 GetCryptos(GetFirstAudioContentDescription(current_description)), | 1891 GetCryptos(GetFirstAudioContentDescription(current_description)), |
| 1763 audio_rtp_extensions_, | 1892 audio_rtp_extensions_, |
| 1764 current_streams, | 1893 current_streams, |
| 1765 add_legacy_, | 1894 add_legacy_, |
| 1766 bundle_enabled, | 1895 bundle_enabled, |
| 1767 audio_answer.get())) { | 1896 audio_answer.get())) { |
| 1768 return false; // Fails the session setup. | 1897 return false; // Fails the session setup. |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1980 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); | 2109 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); |
| 1981 } | 2110 } |
| 1982 | 2111 |
| 1983 const DataContentDescription* GetFirstDataContentDescription( | 2112 const DataContentDescription* GetFirstDataContentDescription( |
| 1984 const SessionDescription* sdesc) { | 2113 const SessionDescription* sdesc) { |
| 1985 return static_cast<const DataContentDescription*>( | 2114 return static_cast<const DataContentDescription*>( |
| 1986 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); | 2115 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); |
| 1987 } | 2116 } |
| 1988 | 2117 |
| 1989 } // namespace cricket | 2118 } // namespace cricket |
| OLD | NEW |