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