| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2009 Google Inc. | 3 * Copyright 2009 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 flags2 = (flags2 & ~SECURE); | 188 flags2 = (flags2 & ~SECURE); |
| 189 } | 189 } |
| 190 CreateContent(flags1, kPcmuCodec, kH264Codec, | 190 CreateContent(flags1, kPcmuCodec, kH264Codec, |
| 191 &local_media_content1_); | 191 &local_media_content1_); |
| 192 CreateContent(flags2, kPcmuCodec, kH264Codec, | 192 CreateContent(flags2, kPcmuCodec, kH264Codec, |
| 193 &local_media_content2_); | 193 &local_media_content2_); |
| 194 CopyContent(local_media_content1_, &remote_media_content1_); | 194 CopyContent(local_media_content1_, &remote_media_content1_); |
| 195 CopyContent(local_media_content2_, &remote_media_content2_); | 195 CopyContent(local_media_content2_, &remote_media_content2_); |
| 196 | 196 |
| 197 if (flags1 & DTLS) { | 197 if (flags1 & DTLS) { |
| 198 identity1_.reset(rtc::SSLIdentity::Generate("session1")); | 198 // Confirmed to work with KT_RSA and KT_ECDSA. |
| 199 identity1_.reset(rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT)); |
| 199 session1_.set_ssl_identity(identity1_.get()); | 200 session1_.set_ssl_identity(identity1_.get()); |
| 200 } | 201 } |
| 201 if (flags2 & DTLS) { | 202 if (flags2 & DTLS) { |
| 202 identity2_.reset(rtc::SSLIdentity::Generate("session2")); | 203 // Confirmed to work with KT_RSA and KT_ECDSA. |
| 204 identity2_.reset(rtc::SSLIdentity::Generate("session2", rtc::KT_DEFAULT)); |
| 203 session2_.set_ssl_identity(identity2_.get()); | 205 session2_.set_ssl_identity(identity2_.get()); |
| 204 } | 206 } |
| 205 | 207 |
| 206 // Add stream information (SSRC) to the local content but not to the remote | 208 // Add stream information (SSRC) to the local content but not to the remote |
| 207 // content. This means that we per default know the SSRC of what we send but | 209 // content. This means that we per default know the SSRC of what we send but |
| 208 // not what we receive. | 210 // not what we receive. |
| 209 AddLegacyStreamInContent(kSsrc1, flags1, &local_media_content1_); | 211 AddLegacyStreamInContent(kSsrc1, flags1, &local_media_content1_); |
| 210 AddLegacyStreamInContent(kSsrc2, flags2, &local_media_content2_); | 212 AddLegacyStreamInContent(kSsrc2, flags2, &local_media_content2_); |
| 211 | 213 |
| 212 // If SSRC_MUX is used we also need to know the SSRC of the incoming stream. | 214 // If SSRC_MUX is used we also need to know the SSRC of the incoming stream. |
| (...skipping 2661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2874 }; | 2876 }; |
| 2875 rtc::Buffer payload(data, 3); | 2877 rtc::Buffer payload(data, 3); |
| 2876 cricket::SendDataResult result; | 2878 cricket::SendDataResult result; |
| 2877 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 2879 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
| 2878 EXPECT_EQ(params.ssrc, | 2880 EXPECT_EQ(params.ssrc, |
| 2879 media_channel1_->last_sent_data_params().ssrc); | 2881 media_channel1_->last_sent_data_params().ssrc); |
| 2880 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 2882 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
| 2881 } | 2883 } |
| 2882 | 2884 |
| 2883 // TODO(pthatcher): TestSetReceiver? | 2885 // TODO(pthatcher): TestSetReceiver? |
| OLD | NEW |