| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 CreateContent(flags1, kPcmuCodec, kH264Codec, | 169 CreateContent(flags1, kPcmuCodec, kH264Codec, |
| 170 &local_media_content1_); | 170 &local_media_content1_); |
| 171 CreateContent(flags2, kPcmuCodec, kH264Codec, | 171 CreateContent(flags2, kPcmuCodec, kH264Codec, |
| 172 &local_media_content2_); | 172 &local_media_content2_); |
| 173 CopyContent(local_media_content1_, &remote_media_content1_); | 173 CopyContent(local_media_content1_, &remote_media_content1_); |
| 174 CopyContent(local_media_content2_, &remote_media_content2_); | 174 CopyContent(local_media_content2_, &remote_media_content2_); |
| 175 | 175 |
| 176 if (flags1 & DTLS) { | 176 if (flags1 & DTLS) { |
| 177 // Confirmed to work with KT_RSA and KT_ECDSA. | 177 // Confirmed to work with KT_RSA and KT_ECDSA. |
| 178 transport_controller1_.SetLocalCertificate(rtc::RTCCertificate::Create( | 178 transport_controller1_.SetLocalCertificate( |
| 179 rtc::scoped_ptr<rtc::SSLIdentity>( | 179 rtc::RTCCertificate::Create(rtc::scoped_ptr<rtc::SSLIdentity>( |
| 180 rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT)) | 180 rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT)))); |
| 181 .Pass())); | |
| 182 } | 181 } |
| 183 if (flags2 & DTLS) { | 182 if (flags2 & DTLS) { |
| 184 // Confirmed to work with KT_RSA and KT_ECDSA. | 183 // Confirmed to work with KT_RSA and KT_ECDSA. |
| 185 transport_controller2_.SetLocalCertificate(rtc::RTCCertificate::Create( | 184 transport_controller2_.SetLocalCertificate( |
| 186 rtc::scoped_ptr<rtc::SSLIdentity>( | 185 rtc::RTCCertificate::Create(rtc::scoped_ptr<rtc::SSLIdentity>( |
| 187 rtc::SSLIdentity::Generate("session2", rtc::KT_DEFAULT)) | 186 rtc::SSLIdentity::Generate("session2", rtc::KT_DEFAULT)))); |
| 188 .Pass())); | |
| 189 } | 187 } |
| 190 | 188 |
| 191 // Add stream information (SSRC) to the local content but not to the remote | 189 // Add stream information (SSRC) to the local content but not to the remote |
| 192 // content. This means that we per default know the SSRC of what we send but | 190 // content. This means that we per default know the SSRC of what we send but |
| 193 // not what we receive. | 191 // not what we receive. |
| 194 AddLegacyStreamInContent(kSsrc1, flags1, &local_media_content1_); | 192 AddLegacyStreamInContent(kSsrc1, flags1, &local_media_content1_); |
| 195 AddLegacyStreamInContent(kSsrc2, flags2, &local_media_content2_); | 193 AddLegacyStreamInContent(kSsrc2, flags2, &local_media_content2_); |
| 196 | 194 |
| 197 // If SSRC_MUX is used we also need to know the SSRC of the incoming stream. | 195 // If SSRC_MUX is used we also need to know the SSRC of the incoming stream. |
| 198 if (flags1 & SSRC_MUX) { | 196 if (flags1 & SSRC_MUX) { |
| (...skipping 2571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2770 }; | 2768 }; |
| 2771 rtc::Buffer payload(data, 3); | 2769 rtc::Buffer payload(data, 3); |
| 2772 cricket::SendDataResult result; | 2770 cricket::SendDataResult result; |
| 2773 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 2771 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
| 2774 EXPECT_EQ(params.ssrc, | 2772 EXPECT_EQ(params.ssrc, |
| 2775 media_channel1_->last_sent_data_params().ssrc); | 2773 media_channel1_->last_sent_data_params().ssrc); |
| 2776 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 2774 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
| 2777 } | 2775 } |
| 2778 | 2776 |
| 2779 // TODO(pthatcher): TestSetReceiver? | 2777 // TODO(pthatcher): TestSetReceiver? |
| OLD | NEW |