Lines Matching full:offer
285 void TestTransportInfo(bool offer, const MediaSessionOptions& options,
310 if (offer) {
313 rtc::scoped_ptr<SessionDescription> offer;
314 offer.reset(f1_.CreateOffer(options, NULL));
315 desc.reset(f1_.CreateAnswer(offer.get(), options, current_desc.get()));
380 void TestCryptoWithBundle(bool offer) {
388 if (offer) {
430 // |expected_direction_in_answer| in an answer if the offer direction is set
437 rtc::scoped_ptr<SessionDescription> offer(
439 ASSERT_TRUE(offer.get() != NULL);
440 ContentInfo* ac_offer= offer->GetContentByName("audio");
445 ContentInfo* vc_offer= offer->GetContentByName("video");
452 f2_.CreateAnswer(offer.get(), opts, NULL));
481 // Create a typical audio offer, and ensure it matches what we expect.
484 rtc::scoped_ptr<SessionDescription> offer(
486 ASSERT_TRUE(offer.get() != NULL);
487 const ContentInfo* ac = offer->GetContentByName("audio");
488 const ContentInfo* vc = offer->GetContentByName("video");
503 // Create a typical video offer, and ensure it matches what we expect.
509 offer(f1_.CreateOffer(opts, NULL));
510 ASSERT_TRUE(offer.get() != NULL);
511 const ContentInfo* ac = offer->GetContentByName("audio");
512 const ContentInfo* vc = offer->GetContentByName("video");
537 // Test creating an offer with bundle where the Codecs have the same dynamic
538 // RTP playlod type. The test verifies that the offer don't contain the
553 offer(f2_.CreateOffer(opts, NULL));
555 GetFirstVideoContentDescription(offer.get());
557 GetFirstAudioContentDescription(offer.get());
559 GetFirstDataContentDescription(offer.get());
571 // Test creating an updated offer with with bundle, audio, video and data
582 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
584 f2_.CreateAnswer(offer.get(), opts, NULL));
612 // Create a RTP data offer, and ensure it matches what we expect.
618 offer(f1_.CreateOffer(opts, NULL));
619 ASSERT_TRUE(offer.get() != NULL);
620 const ContentInfo* ac = offer->GetContentByName("audio");
621 const ContentInfo* dc = offer->GetContentByName("data");
647 // Create an SCTP data offer with bundle without error.
654 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
655 EXPECT_TRUE(offer.get() != NULL);
656 EXPECT_TRUE(offer->GetContentByName("data") != NULL);
659 // Test creating an sctp data channel from an already generated offer.
675 // datachannel type that gets generated from the previous offer, is of the
686 // Create an audio, video offer without legacy StreamParams.
693 offer(f1_.CreateOffer(opts, NULL));
694 ASSERT_TRUE(offer.get() != NULL);
695 const ContentInfo* ac = offer->GetContentByName("audio");
696 const ContentInfo* vc = offer->GetContentByName("video");
708 // Creates an audio+video sendonly offer.
716 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(options, NULL));
717 ASSERT_TRUE(offer.get() != NULL);
718 EXPECT_EQ(2u, offer->contents().size());
719 EXPECT_TRUE(IsMediaContentOfType(&offer->contents()[0], MEDIA_TYPE_AUDIO));
720 EXPECT_TRUE(IsMediaContentOfType(&offer->contents()[1], MEDIA_TYPE_VIDEO));
722 EXPECT_EQ(cricket::MD_SENDONLY, GetMediaDirection(&offer->contents()[0]));
723 EXPECT_EQ(cricket::MD_SENDONLY, GetMediaDirection(&offer->contents()[1]));
770 rtc::scoped_ptr<SessionDescription> offer(
772 ASSERT_TRUE(offer.get() != NULL);
774 f2_.CreateAnswer(offer.get(), MediaSessionOptions(), NULL));
797 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
798 ASSERT_TRUE(offer.get() != NULL);
800 f2_.CreateAnswer(offer.get(), opts, NULL));
830 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
831 ASSERT_TRUE(offer.get() != NULL);
833 f2_.CreateAnswer(offer.get(), opts, NULL));
858 // Verifies that the order of the media contents in the offer is preserved in
863 // Creates a data only offer.
869 // Appends audio to the offer.
875 // Appends video to the offer.
891 // the offer is send receive.
897 // the offer is send only.
903 // the offer is recv only.
909 // the offer is inactive.
922 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
923 ContentInfo* dc_offer= offer->GetContentByName("data");
932 f2_.CreateAnswer(offer.get(), opts, NULL));
951 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
953 GetFirstAudioContentDescription(offer.get());
958 f2_.CreateAnswer(offer.get(), opts, NULL));
970 // Create a video offer and answer and ensure the RTP header extensions
981 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
982 ASSERT_TRUE(offer.get() != NULL);
984 f2_.CreateAnswer(offer.get(), opts, NULL));
988 offer.get())->rtp_header_extensions());
991 offer.get())->rtp_header_extensions());
1008 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1009 ASSERT_TRUE(offer.get() != NULL);
1011 f2_.CreateAnswer(offer.get(), opts, NULL));
1035 offer(f1_.CreateOffer(opts, NULL));
1036 ASSERT_TRUE(offer.get() != NULL);
1037 const ContentInfo* ac = offer->GetContentByName("audio");
1038 const ContentInfo* vc = offer->GetContentByName("video");
1039 const ContentInfo* dc = offer->GetContentByName("data");
1075 rtc::scoped_ptr<SessionDescription> offer;
1081 offer.reset(f1_.CreateOffer(offer_opts, NULL));
1082 answer.reset(f2_.CreateAnswer(offer.get(), answer_opts, NULL));
1083 ASSERT_TRUE(NULL != GetFirstAudioContentDescription(offer.get()));
1084 ASSERT_TRUE(NULL != GetFirstVideoContentDescription(offer.get()));
1085 ASSERT_TRUE(NULL != GetFirstDataContentDescription(offer.get()));
1089 EXPECT_TRUE(GetFirstAudioContentDescription(offer.get())->rtcp_mux());
1090 EXPECT_TRUE(GetFirstVideoContentDescription(offer.get())->rtcp_mux());
1091 EXPECT_TRUE(GetFirstDataContentDescription(offer.get())->rtcp_mux());
1099 offer.reset(f1_.CreateOffer(offer_opts, NULL));
1100 answer.reset(f2_.CreateAnswer(offer.get(), answer_opts, NULL));
1101 ASSERT_TRUE(NULL != GetFirstAudioContentDescription(offer.get()));
1102 ASSERT_TRUE(NULL != GetFirstVideoContentDescription(offer.get()));
1103 ASSERT_TRUE(NULL != GetFirstDataContentDescription(offer.get()));
1107 EXPECT_TRUE(GetFirstAudioContentDescription(offer.get())->rtcp_mux());
1108 EXPECT_TRUE(GetFirstVideoContentDescription(offer.get())->rtcp_mux());
1109 EXPECT_TRUE(GetFirstDataContentDescription(offer.get())->rtcp_mux());
1117 offer.reset(f1_.CreateOffer(offer_opts, NULL));
1118 answer.reset(f2_.CreateAnswer(offer.get(), answer_opts, NULL));
1119 ASSERT_TRUE(NULL != GetFirstAudioContentDescription(offer.get()));
1120 ASSERT_TRUE(NULL != GetFirstVideoContentDescription(offer.get()));
1121 ASSERT_TRUE(NULL != GetFirstDataContentDescription(offer.get()));
1125 EXPECT_FALSE(GetFirstAudioContentDescription(offer.get())->rtcp_mux());
1126 EXPECT_FALSE(GetFirstVideoContentDescription(offer.get())->rtcp_mux());
1127 EXPECT_FALSE(GetFirstDataContentDescription(offer.get())->rtcp_mux());
1135 offer.reset(f1_.CreateOffer(offer_opts, NULL));
1136 answer.reset(f2_.CreateAnswer(offer.get(), answer_opts, NULL));
1137 ASSERT_TRUE(NULL != GetFirstAudioContentDescription(offer.get()));
1138 ASSERT_TRUE(NULL != GetFirstVideoContentDescription(offer.get()));
1139 ASSERT_TRUE(NULL != GetFirstDataContentDescription(offer.get()));
1143 EXPECT_FALSE(GetFirstAudioContentDescription(offer.get())->rtcp_mux());
1144 EXPECT_FALSE(GetFirstVideoContentDescription(offer.get())->rtcp_mux());
1145 EXPECT_FALSE(GetFirstDataContentDescription(offer.get())->rtcp_mux());
1151 // Create an audio-only answer to a video offer.
1156 offer(f1_.CreateOffer(opts, NULL));
1157 ASSERT_TRUE(offer.get() != NULL);
1159 f2_.CreateAnswer(offer.get(), MediaSessionOptions(), NULL));
1168 // Create an audio-only answer to an offer with data.
1173 offer(f1_.CreateOffer(opts, NULL));
1174 ASSERT_TRUE(offer.get() != NULL);
1176 f2_.CreateAnswer(offer.get(), MediaSessionOptions(), NULL));
1185 // Create an answer that rejects the contents which are rejected in the offer.
1192 offer(f1_.CreateOffer(opts, NULL));
1193 ASSERT_TRUE(offer.get() != NULL);
1194 ContentInfo* ac = offer->GetContentByName("audio");
1195 ContentInfo* vc = offer->GetContentByName("video");
1196 ContentInfo* dc = offer->GetContentByName("data");
1204 f2_.CreateAnswer(offer.get(), opts, NULL));
1216 // Create an audio and video offer with:
1220 // and ensure it matches what we expect. Also updates the initial offer by
1232 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1234 ASSERT_TRUE(offer.get() != NULL);
1235 const ContentInfo* ac = offer->GetContentByName("audio");
1236 const ContentInfo* vc = offer->GetContentByName("video");
1237 const ContentInfo* dc = offer->GetContentByName("data");
1295 // Update the offer. Add a new video track that is not synched to the
1303 updated_offer(f1_.CreateOffer(opts, offer.get()));
1355 // Create an offer with simulcast video stream.
1360 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1362 ASSERT_TRUE(offer.get() != NULL);
1363 const ContentInfo* vc = offer->GetContentByName("video");
1377 // Create an audio and video answer to a standard video offer with:
1389 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(offer_opts,
1401 answer(f2_.CreateAnswer(offer.get(), opts, NULL));
1469 updated_answer(f2_.CreateAnswer(offer.get(), opts, answer.get()));
1515 // Create an updated offer after creating an answer to the original offer and
1517 // in the updated offer.
1524 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1526 f2_.CreateAnswer(offer.get(), opts, NULL));
1540 // offer/answer exchange plus the audio codecs only |f2_| offer, sorted in
1551 // offer/answer exchange plus the video codecs only |f2_| offer, sorted in
1567 // Create an updated offer after creating an answer to the original offer and
1569 // in the updated offer. In this test Rtx is enabled.
1585 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1586 ASSERT_TRUE(offer.get() != NULL);
1588 f2_.CreateAnswer(offer.get(), opts, NULL));
1600 // if |f2_| creates an updated offer even though the default payload types
1616 // Create an updated offer that adds video after creating an audio only answer
1617 // to the original offer. This test verifies that if a video codec and the RTX
1631 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1633 f2_.CreateAnswer(offer.get(), opts, NULL));
1641 // first offer/answer exchange.
1689 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1690 ASSERT_TRUE(offer.get() != NULL);
1691 // kCodecParamAssociatedPayloadType will always be added to the offer when RTX
1694 // kCodecParamAssociatedPayloadType is missing in the offer.
1697 offer->GetContentDescriptionByName(cricket::CN_VIDEO));
1709 f2_.CreateAnswer(offer.get(), opts, NULL));
1733 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1734 ASSERT_TRUE(offer.get() != NULL);
1738 f2_.CreateAnswer(offer.get(), opts, NULL));
1769 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1770 ASSERT_TRUE(offer.get() != NULL);
1772 f2_.CreateAnswer(offer.get(), opts, NULL));
1798 // Ensure that the offer has an RTX ssrc for each regular ssrc, and that there
1800 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1801 ASSERT_TRUE(offer.get() != NULL);
1803 offer->GetContentDescriptionByName(cricket::CN_VIDEO));
1823 // Create an updated offer after creating an answer to the original offer and
1825 // are not changed in the updated offer.
1837 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1839 f2_.CreateAnswer(offer.get(), opts, NULL));
1851 // The expected RTP header extensions in the new offer are the resulting
1852 // extensions from the first offer/answer exchange plus the extensions only
1853 // |f2_| offer.
1883 // updated offer (this was previously a bug).
1893 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, NULL));
1904 offer.get())->rtp_header_extensions());
1907 offer.get())->rtp_header_extensions());
1909 // Nothing should change when creating a new offer
1911 f1_.CreateOffer(opts, offer.get()));
2053 // Create an offer with bundle enabled and verify the crypto parameters are
2065 // Verifies that creating answer fails if the offer has UDP/TLS/RTP/SAVPF but
2074 rtc::scoped_ptr<SessionDescription> offer(
2076 ASSERT_TRUE(offer.get() != NULL);
2077 ContentInfo* offer_content = offer->GetContentByName("audio");
2084 f2_.CreateAnswer(offer.get(), MediaSessionOptions(), NULL));
2100 rtc::scoped_ptr<SessionDescription> offer(
2102 ASSERT_TRUE(offer.get() != NULL);
2103 ContentInfo* offer_content = offer->GetContentByName("audio");
2110 f2_.CreateAnswer(offer.get(), MediaSessionOptions(), NULL));
2123 // Test that we include both SDES and DTLS in the offer, but only include SDES
2133 rtc::scoped_ptr<SessionDescription> offer, answer;
2139 // Generate an offer with SDES and DTLS support.
2140 offer.reset(f1_.CreateOffer(options, NULL));
2141 ASSERT_TRUE(offer.get() != NULL);
2144 offer->GetContentDescriptionByName("audio"));
2147 offer->GetContentDescriptionByName("video"));
2152 audio_trans_desc = offer->GetTransportDescriptionByName("audio");
2154 video_trans_desc = offer->GetTransportDescriptionByName("video");
2160 answer.reset(f2_.CreateAnswer(offer.get(), options, NULL));
2181 answer.reset(f2_.CreateAnswer(offer.get(), options, NULL));
2204 // Try creating offer again. DTLS enabled now, crypto's should be empty
2205 // in new offer.
2206 offer.reset(f1_.CreateOffer(options, offer.get()));
2207 ASSERT_TRUE(offer.get() != NULL);
2209 offer->GetContentDescriptionByName("audio"));
2212 offer->GetContentDescriptionByName("video"));
2217 audio_trans_desc = offer->GetTransportDescriptionByName("audio");
2219 video_trans_desc = offer->GetTransportDescriptionByName("video");
2225 // Test that an answer can't be created if cryptos are required but the offer is
2234 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(options,
2236 ASSERT_TRUE(offer.get() != NULL);
2238 f2_.CreateAnswer(offer.get(), options, NULL));
2242 // Test that we accept a DTLS offer without SDES and create an appropriate
2254 rtc::scoped_ptr<SessionDescription> offer, answer;
2256 // Generate an offer with DTLS but without SDES.
2257 offer.reset(f1_.CreateOffer(options, NULL));
2258 ASSERT_TRUE(offer.get() != NULL);
2261 GetFirstAudioContentDescription(offer.get());
2264 GetFirstVideoContentDescription(offer.get());
2267 GetFirstDataContentDescription(offer.get());
2271 offer->GetTransportDescriptionByName("audio");
2274 offer->GetTransportDescriptionByName("video");
2277 offer->GetTransportDescriptionByName("data");
2281 answer.reset(f2_.CreateAnswer(offer.get(), options, NULL));
2296 // offer or answer.
2301 rtc::scoped_ptr<SessionDescription> offer(
2303 ASSERT_TRUE(offer.get() != NULL);
2304 const ContentInfo* audio_content = offer->GetContentByName("audio");
2308 offer.reset(f1_.CreateOffer(options, NULL));
2309 ASSERT_TRUE(offer.get() != NULL);
2310 audio_content = offer->GetContentByName("audio");
2313 f1_.CreateAnswer(offer.get(), options, NULL));
2320 // new offer.
2327 // Create offer and modify the default content names.
2328 rtc::scoped_ptr<SessionDescription> offer(f1_.CreateOffer(opts, nullptr));
2329 for (ContentInfo& content : offer->contents()) {
2334 f1_.CreateOffer(opts, offer.get()));