Lines Matching refs:answer
430 // |expected_direction_in_answer| in an answer if the offer direction is set
451 rtc::scoped_ptr<SessionDescription> answer(
454 GetFirstAudioContentDescription(answer.get());
457 GetFirstVideoContentDescription(answer.get());
583 rtc::scoped_ptr<SessionDescription> answer(
592 updated_opts, answer.get()));
766 // Create a typical audio answer, and ensure it matches what we expect.
773 rtc::scoped_ptr<SessionDescription> answer(
775 const ContentInfo* ac = answer->GetContentByName("audio");
776 const ContentInfo* vc = answer->GetContentByName("video");
791 // Create a typical video answer, and ensure it matches what we expect.
799 rtc::scoped_ptr<SessionDescription> answer(
801 const ContentInfo* ac = answer->GetContentByName("audio");
802 const ContentInfo* vc = answer->GetContentByName("video");
832 rtc::scoped_ptr<SessionDescription> answer(
834 const ContentInfo* ac = answer->GetContentByName("audio");
835 const ContentInfo* vc = answer->GetContentByName("data");
859 // the answer.
881 rtc::scoped_ptr<SessionDescription> answer(
883 ASSERT_TRUE(answer.get() != NULL);
884 EXPECT_EQ(3u, answer->contents().size());
885 EXPECT_TRUE(IsMediaContentOfType(&answer->contents()[0], MEDIA_TYPE_DATA));
886 EXPECT_TRUE(IsMediaContentOfType(&answer->contents()[1], MEDIA_TYPE_AUDIO));
887 EXPECT_TRUE(IsMediaContentOfType(&answer->contents()[2], MEDIA_TYPE_VIDEO));
890 // This test that the media direction is set to send/receive in an answer if
896 // This test that the media direction is set to receive only in an answer if
902 // This test that the media direction is set to send only in an answer if
908 // This test that the media direction is set to inactive in an answer if
914 // Test that a data content with an unknown protocol is rejected in an answer.
931 rtc::scoped_ptr<SessionDescription> answer(
934 const ContentInfo* dc_answer = answer->GetContentByName("data");
957 rtc::scoped_ptr<SessionDescription> answer(
960 const ContentInfo* ac_answer = answer->GetContentByName("audio");
965 GetFirstAudioContentDescription(answer.get());
970 // Create a video offer and answer and ensure the RTP header extensions
983 rtc::scoped_ptr<SessionDescription> answer(
994 answer.get())->rtp_header_extensions());
997 answer.get())->rtp_header_extensions());
1000 // Create an audio, video, data answer without legacy StreamParams.
1010 rtc::scoped_ptr<SessionDescription> answer(
1012 const ContentInfo* ac = answer->GetContentByName("audio");
1013 const ContentInfo* vc = answer->GetContentByName("video");
1014 const ContentInfo* dc = answer->GetContentByName("data");
1066 // Create a typical video answer, and ensure it matches what we expect.
1076 rtc::scoped_ptr<SessionDescription> answer;
1082 answer.reset(f2_.CreateAnswer(offer.get(), answer_opts, NULL));
1086 ASSERT_TRUE(NULL != GetFirstAudioContentDescription(answer.get()));
1087 ASSERT_TRUE(NULL != GetFirstVideoContentDescription(answer.get()));
1088 ASSERT_TRUE(NULL != GetFirstDataContentDescription(answer.get()));
1092 EXPECT_TRUE(GetFirstAudioContentDescription(answer.get())->rtcp_mux());
1093 EXPECT_TRUE(GetFirstVideoContentDescription(answer.get())->rtcp_mux());
1094 EXPECT_TRUE(GetFirstDataContentDescription(answer.get())->rtcp_mux());
1100 answer.reset(f2_.CreateAnswer(offer.get(), answer_opts, NULL));
1104 ASSERT_TRUE(NULL != GetFirstAudioContentDescription(answer.get()));
1105 ASSERT_TRUE(NULL != GetFirstVideoContentDescription(answer.get()));
1106 ASSERT_TRUE(NULL != GetFirstDataContentDescription(answer.get()));
1110 EXPECT_FALSE(GetFirstAudioContentDescription(answer.get())->rtcp_mux());
1111 EXPECT_FALSE(GetFirstVideoContentDescription(answer.get())->rtcp_mux());
1112 EXPECT_FALSE(GetFirstDataContentDescription(answer.get())->rtcp_mux());
1118 answer.reset(f2_.CreateAnswer(offer.get(), answer_opts, NULL));
1122 ASSERT_TRUE(NULL != GetFirstAudioContentDescription(answer.get()));
1123 ASSERT_TRUE(NULL != GetFirstVideoContentDescription(answer.get()));
1124 ASSERT_TRUE(NULL != GetFirstDataContentDescription(answer.get()));
1128 EXPECT_FALSE(GetFirstAudioContentDescription(answer.get())->rtcp_mux());
1129 EXPECT_FALSE(GetFirstVideoContentDescription(answer.get())->rtcp_mux());
1130 EXPECT_FALSE(GetFirstDataContentDescription(answer.get())->rtcp_mux());
1136 answer.reset(f2_.CreateAnswer(offer.get(), answer_opts, NULL));
1140 ASSERT_TRUE(NULL != GetFirstAudioContentDescription(answer.get()));
1141 ASSERT_TRUE(NULL != GetFirstVideoContentDescription(answer.get()));
1142 ASSERT_TRUE(NULL != GetFirstDataContentDescription(answer
1146 EXPECT_FALSE(GetFirstAudioContentDescription(answer.get())->rtcp_mux());
1147 EXPECT_FALSE(GetFirstVideoContentDescription(answer.get())->rtcp_mux());
1148 EXPECT_FALSE(GetFirstDataContentDescription(answer.get())->rtcp_mux());
1151 // Create an audio-only answer to a video offer.
1158 rtc::scoped_ptr<SessionDescription> answer(
1160 const ContentInfo* ac = answer->GetContentByName("audio");
1161 const ContentInfo* vc = answer->GetContentByName("video");
1168 // Create an audio-only answer to an offer with data.
1175 rtc::scoped_ptr<SessionDescription> answer(
1177 const ContentInfo* ac = answer->GetContentByName("audio");
1178 const ContentInfo* dc = answer->GetContentByName("data");
1185 // Create an answer that rejects the contents which are rejected in the offer.
1203 rtc::scoped_ptr<SessionDescription> answer(
1205 ac = answer->GetContentByName("audio");
1206 vc = answer->GetContentByName("video");
1207 dc = answer->GetContentByName("data");
1377 // Create an audio and video answer to a standard video offer with:
1381 // and ensure it matches what we expect. Also updates the initial answer by
1401 answer(f2_.CreateAnswer(offer.get(), opts, NULL));
1403 ASSERT_TRUE(answer.get() != NULL);
1404 const ContentInfo* ac = answer->GetContentByName("audio");
1405 const ContentInfo* vc = answer->GetContentByName("video");
1406 const ContentInfo* dc = answer->GetContentByName("data");
1463 // Update the answer. Add a new video track that is not synched to the
1469 updated_answer(f2_.CreateAnswer(offer.get(), opts, answer.get()));
1515 // Create an updated offer after creating an answer to the original offer and
1516 // verify that the codecs that were part of the original answer are not changed
1525 rtc::scoped_ptr<SessionDescription> answer(
1529 GetFirstAudioContentDescription(answer.get());
1533 GetFirstVideoContentDescription(answer.get());
1537 f2_.CreateOffer(opts, answer.get()));
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
1568 // verify that the codecs that were part of the original answer are not changed
1587 rtc::scoped_ptr<SessionDescription> answer(
1591 GetFirstVideoContentDescription(answer.get());
1605 f2_.CreateOffer(opts, answer.get()));
1608 f1_.CreateAnswer(updated_offer.get(), opts, answer.get()));
1616 // Create an updated offer that adds video after creating an audio only answer
1632 rtc::scoped_ptr<SessionDescription> answer(
1636 GetFirstAudioContentDescription(answer.get());
1641 // first offer/answer exchange.
1652 f2_.CreateOffer(opts, answer.get()));
1655 f1_.CreateAnswer(updated_offer.get(), opts, answer.get()));
1658 GetFirstAudioContentDescription(answer.get());
1708 rtc::scoped_ptr<SessionDescription> answer(
1712 GetCodecNames(GetFirstVideoContentDescription(answer.get())->codecs());
1717 // Test that RTX will be filtered out in the answer if its associated payload
1736 // the answer.
1737 rtc::scoped_ptr<SessionDescription> answer(
1741 GetCodecNames(GetFirstVideoContentDescription(answer.get())->codecs());
1747 // is added in the answer, and the unsupported RTX codec is filtered out.
1767 // H264-SVC codec is removed in the answer, therefore, associated RTX codec
1771 rtc::scoped_ptr<SessionDescription> answer(
1774 GetFirstVideoContentDescription(answer.get());
1823 // Create an updated offer after creating an answer to the original offer and
1824 // verify that the RTP header extensions that were part of the original answer
1838 rtc::scoped_ptr<SessionDescription> answer(
1843 answer.get())->rtp_header_extensions());
1846 answer.get())->rtp_header_extensions());
1849 f2_.CreateOffer(opts, answer.get()));
1852 // extensions from the first offer/answer exchange plus the extensions only
2059 // Create an answer with bundle enabled and verify the crypto parameters are
2065 // Verifies that creating answer fails if the offer has UDP/TLS/RTP/SAVPF but
2083 rtc::scoped_ptr<SessionDescription> answer(
2085 ASSERT_TRUE(answer != NULL);
2086 ContentInfo* answer_content = answer->GetContentByName("audio");
2092 // Offers UDP/TLS/RTP/SAVPF and verifies the answer can be created and contains
2109 rtc::scoped_ptr<SessionDescription> answer(
2111 ASSERT_TRUE(answer != NULL);
2113 const ContentInfo* answer_content = answer->GetContentByName("audio");
2124 // in the answer if DTLS isn't negotiated.
2133 rtc::scoped_ptr<SessionDescription> offer, answer;
2159 // Generate an answer with only SDES support, since tdf2 has crypto disabled.
2160 answer.reset(f2_.CreateAnswer(offer.get(), options, NULL));
2161 ASSERT_TRUE(answer.get() != NULL);
2164 answer->GetContentDescriptionByName("audio"));
2167 answer->GetContentDescriptionByName("video"));
2172 audio_trans_desc = answer->GetTransportDescriptionByName("audio");
2174 video_trans_desc = answer->GetTransportDescriptionByName("video");
2179 // Enable DTLS; the answer should now only have DTLS support.
2181 answer.reset(f2_.CreateAnswer(offer.get(), options, NULL));
2182 ASSERT_TRUE(answer.get() != NULL);
2185 answer->GetContentDescriptionByName("audio"));
2188 answer->GetContentDescriptionByName("video"));
2197 audio_trans_desc = answer->GetTransportDescriptionByName("audio");
2199 video_trans_desc = answer->GetTransportDescriptionByName("video");
2225 // Test that an answer can't be created if cryptos are required but the offer is
2237 rtc::scoped_ptr<SessionDescription> answer(
2239 EXPECT_TRUE(answer.get() == NULL);
2243 // answer.
2254 rtc::scoped_ptr<SessionDescription> offer, answer;
2280 // Generate an answer with DTLS.
2281 answer.reset(f2_.CreateAnswer(offer.get(), options, NULL));
2282 ASSERT_TRUE(answer.get() != NULL);
2285 answer->GetTransportDescriptionByName("audio");
2288 answer->GetTransportDescriptionByName("video");
2291 answer->GetTransportDescriptionByName("data");
2296 // offer or answer.
2312 rtc::scoped_ptr<SessionDescription> answer(
2314 ASSERT_TRUE(answer.get() != NULL);
2315 audio_content = answer->GetContentByName("audio");