Home | History | Annotate | Download | only in webrtc

Lines Matching refs:cricket

65 using cricket::BaseSession;
66 using cricket::DF_PLAY;
67 using cricket::DF_SEND;
68 using cricket::FakeVoiceMediaChannel;
69 using cricket::NS_GINGLE_P2P;
70 using cricket::NS_JINGLE_ICE_UDP;
71 using cricket::TransportInfo;
98 static const SocketAddress kStunAddr("99.99.99.1", cricket::STUN_SERVER_PORT);
112 static const cricket::AudioCodec
114 static const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0);
115 static const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0);
177 std::vector<cricket::Candidate> mline_0_candidates_;
178 std::vector<cricket::Candidate> mline_1_candidates_;
185 WebRtcSessionForTest(cricket::ChannelManager* cmgr,
188 cricket::PortAllocator* port_allocator,
197 using cricket::BaseSession::GetTransportProxy;
240 class FakeAudioRenderer : public cricket::AudioRenderer {
263 : media_engine_(new cricket::FakeMediaEngine()),
264 data_engine_(new cricket::FakeDataEngine()),
265 device_manager_(new cricket::FakeDeviceManager()),
266 channel_manager_(new cricket::ChannelManager(
268 new cricket::CaptureManager(), talk_base::Thread::Current())),
269 tdesc_factory_(new cricket::TransportDescriptionFactory()),
270 desc_factory_(new cricket::MediaSessionDescriptionFactory(
279 tdesc_factory_->set_protocol(cricket::ICEPROTO_HYBRID);
280 allocator_.set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
281 cricket::PORTALLOCATOR_DISABLE_RELAY |
282 cricket::PORTALLOCATOR_ENABLE_BUNDLE);
309 std::vector<cricket::AudioCodec> codecs;
372 EXPECT_TRUE(session_->GetChannel(cricket::CN_AUDIO, 1) != NULL);
373 EXPECT_TRUE(session_->GetChannel(cricket::CN_AUDIO, 2) != NULL);
374 EXPECT_TRUE(session_->GetChannel(cricket::CN_VIDEO, 1) != NULL);
375 EXPECT_TRUE(session_->GetChannel(cricket::CN_VIDEO, 2) != NULL);
378 void VerifyCryptoParams(const cricket::SessionDescription* sdp) {
380 const cricket::ContentInfo* content = cricket::GetFirstAudioContent(sdp);
382 const cricket::AudioContentDescription* audio_content =
383 static_cast<const cricket::AudioContentDescription*>(
390 EXPECT_EQ(std::string(cricket::kMediaProtocolSavpf),
393 content = cricket::GetFirstVideoContent(sdp);
395 const cricket::VideoContentDescription* video_content =
396 static_cast<const cricket::VideoContentDescription*>(
403 EXPECT_EQ(std::string(cricket::kMediaProtocolSavpf),
407 void VerifyNoCryptoParams(const cricket::SessionDescription* sdp, bool dtls) {
408 const cricket::ContentInfo* content = cricket::GetFirstAudioContent(sdp);
410 const cricket::AudioContentDescription* audio_content =
411 static_cast<const cricket::AudioContentDescription*>(
416 content = cricket::GetFirstVideoContent(sdp);
418 const cricket::VideoContentDescription* video_content =
419 static_cast<const cricket::VideoContentDescription*>(
425 EXPECT_EQ(std::string(cricket::kMediaProtocolSavpf),
427 EXPECT_EQ(std::string(cricket::kMediaProtocolSavpf),
430 EXPECT_EQ(std::string(cricket::kMediaProtocolAvpf),
432 EXPECT_EQ(std::string(cricket::kMediaProtocolAvpf),
439 desc_factory_->set_secure(cricket::SEC_ENABLED);
445 tdesc_factory_->set_secure(cricket::SEC_REQUIRED);
448 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp,
468 cricket::MediaSessionOptions options;
471 CreateRemoteOffer(options, cricket::SEC_DISABLED));
482 cricket::MediaSessionOptions options;
486 CreateRemoteOffer(options, cricket::SEC_REQUIRED));
495 void CompareIceUfragAndPassword(const cricket::SessionDescription* desc1,
496 const cricket::SessionDescription* desc2,
503 const cricket::ContentInfos& contents = desc1->contents();
504 cricket::ContentInfos::const_iterator it = contents.begin();
507 const cricket::TransportDescription* transport_desc1 =
509 const cricket::TransportDescription* transport_desc2 =
567 cricket::MediaSessionOptions options;
570 *offer = CreateRemoteOffer(options, cricket::SEC_ENABLED);
575 cricket::SEC_DISABLED);
580 cricket::MediaSessionOptions options,
581 cricket::SecurePolicy secure_policy,
585 const cricket::SessionDescription* cricket_desc = NULL;
602 cricket::MediaSessionOptions options) {
603 return CreateRemoteOfferWithVersion(options, cricket::SEC_ENABLED,
607 cricket::MediaSessionOptions options, cricket::SecurePolicy policy) {
611 cricket::MediaSessionOptions options,
613 return CreateRemoteOfferWithVersion(options, cricket::SEC_ENABLED,
620 cricket::MediaSessionOptions options;
627 cricket::MediaSessionOptions options,
628 cricket::SecurePolicy policy) {
645 cricket::MediaSessionOptions options) {
646 return CreateRemoteAnswer(offer, options, cricket::SEC_REQUIRED);
655 cricket::MediaSessionOptions options;
657 return CreateRemoteAnswer(offer, options, cricket::SEC_REQUIRED);
698 cricket::Candidate c0 = observer_.mline_0_candidates_[i];
699 cricket::Candidate c1 = observer_.mline_1_candidates_[i];
783 cricket::TransportProtocol protocol) {
784 const cricket::Transport* transport = session_->GetTransport(content_name);
792 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();;
799 bool VerifyNoCNCodecs(const cricket::ContentInfo* content) {
800 const cricket::ContentDescription* description = content->description;
802 const cricket::AudioContentDescription* audio_content_desc =
803 static_cast<const cricket::AudioContentDescription*>(description);
825 cricket::MediaSessionOptions options;
827 CreateRemoteOffer(options, cricket::SEC_REQUIRED));
858 cricket::FakeMediaEngine* media_engine_;
859 cricket::FakeDataEngine* data_engine_;
860 cricket::FakeDeviceManager* device_manager_;
861 talk_base::scoped_ptr<cricket::ChannelManager> channel_manager_;
862 talk_base::scoped_ptr<cricket::TransportDescriptionFactory> tdesc_factory_;
864 talk_base::scoped_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_;
869 cricket::TestStunServer stun_server_;
871 cricket::BasicPortAllocator allocator_;
876 cricket::FakeVideoMediaChannel* video_channel_;
877 cricket::FakeVoiceMediaChannel* voice_channel_;
891 EXPECT_EQ(cricket::SEC_REQUIRED, session_->secure_policy());
1047 cricket::MediaSessionOptions options;
1050 options, cricket::SEC_DISABLED);
1056 offer = CreateRemoteOffer(options, cricket::SEC_DISABLED);
1105 cricket::MediaSessionOptions options;
1130 cricket::MediaSessionOptions options;
1133 options, cricket::SEC_REQUIRED);
1274 cricket::Candidate candidate;
1319 cricket::Candidate candidate1;
1340 cricket::Candidate candidate2;
1408 cricket::Candidate candidate1;
1517 const cricket::ContentInfo* content =
1518 cricket::GetFirstAudioContent(offer->description());
1520 content = cricket::GetFirstVideoContent(offer->description());
1532 const cricket::ContentInfo* content =
1533 cricket::GetFirstAudioContent(offer->description());
1535 content = cricket::GetFirstVideoContent(offer->description());
1541 content = cricket::GetFirstAudioContent(offer->description());
1543 content = cricket::GetFirstVideoContent(offer->description());
1558 const cricket::ContentInfo* content =
1559 cricket::GetFirstAudioContent(offer->description());
1561 content = cricket::GetFirstVideoContent(offer->description());
1574 const cricket::ContentInfo* content =
1575 cricket::GetFirstAudioContent(offer->description());
1577 content = cricket::GetFirstVideoContent(offer->description());
1591 const cricket::ContentInfo* content =
1592 cricket::GetFirstAudioContent(offer->description());
1595 content = cricket::GetFirstVideoContent(offer->description());
1622 const cricket::ContentInfo* content =
1623 cricket::GetFirstAudioContent(answer->description());
1627 content = cricket::GetFirstVideoContent(answer->description());
1637 cricket::MediaSessionOptions options;
1642 ASSERT_TRUE(cricket::GetFirstVideoContent(offer->description()) == NULL);
1643 ASSERT_TRUE(cricket::GetFirstAudioContent(offer->description()) != NULL);
1648 const cricket::ContentInfo* content =
1649 cricket::GetFirstAudioContent(answer->description());
1653 EXPECT_TRUE(cricket::GetFirstVideoContent(answer->description()) == NULL);
1667 const cricket::ContentInfo* content =
1668 cricket::GetFirstAudioContent(answer->description());
1672 content = cricket::GetFirstVideoContent(answer->description());
1691 const cricket::ContentInfo* content =
1692 cricket::GetFirstAudioContent(answer->description());
1696 content = cricket::GetFirstVideoContent(answer->description());
1719 const cricket::ContentInfo* content =
1720 cricket::GetFirstAudioContent(answer->description());
1725 content = cricket::GetFirstVideoContent(answer->description());
1737 const cricket::ContentInfo* content =
1738 cricket::GetFirstAudioContent(offer->description());
1754 const cricket::ContentInfo* content =
1755 cricket::GetFirstAudioContent(answer->description());
1770 cricket::MediaSessionOptions options;
1827 cricket::MediaSessionOptions options;
1831 offer, options, cricket::SEC_ENABLED);
1886 session_->set_secure_policy(cricket::SEC_DISABLED);
1908 EXPECT_TRUE((cricket::PORTALLOCATOR_ENABLE_BUNDLE & allocator_.flags()) ==
1909 cricket::PORTALLOCATOR_ENABLE_BUNDLE);
1912 cricket::SessionDescription* offer_copy =
1914 offer_copy->RemoveGroupByName(cricket::GROUP_TYPE_BUNDLE);
1920 EXPECT_FALSE(allocator_.flags() & cricket::PORTALLOCATOR_ENABLE_BUNDLE);
1926 EXPECT_TRUE((cricket::PORTALLOCATOR_ENABLE_BUNDLE & allocator_.flags()) ==
1927 cricket::PORTALLOCATOR_ENABLE_BUNDLE);
1935 cricket::SessionDescription* answer_copy = answer->description()->Copy();
1936 answer_copy->RemoveGroupByName(cricket::GROUP_TYPE_BUNDLE);
1941 EXPECT_TRUE((cricket::PORTALLOCATOR_ENABLE_BUNDLE & allocator_.flags()) ==
1942 cricket::PORTALLOCATOR_ENABLE_BUNDLE);
1964 EXPECT_TRUE((cricket::PORTALLOCATOR_ENABLE_BUNDLE & allocator_.flags()) ==
1965 cricket::PORTALLOCATOR_ENABLE_BUNDLE);
1993 cricket::FakeVoiceMediaChannel* channel = media_engine_->GetVoiceChannel(0);
2018 cricket::FakeVoiceMediaChannel* channel = media_engine_->GetVoiceChannel(0);
2024 cricket::AudioOptions options;
2045 cricket::FakeVideoMediaChannel* channel = media_engine_->GetVideoChannel(0);
2051 cricket::FakeVideoRenderer renderer;
2062 cricket::FakeVideoMediaChannel* channel = media_engine_->GetVideoChannel(0);
2067 cricket::VideoOptions* options = NULL;
2151 VerifyTransportType("audio", cricket::ICEPROTO_GOOGLE);
2152 VerifyTransportType("video", cricket::ICEPROTO_GOOGLE);
2165 VerifyTransportType("audio", cricket::ICEPROTO_RFC5245);
2166 VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
2187 VerifyTransportType("audio", cricket::ICEPROTO_GOOGLE);
2188 VerifyTransportType("video", cricket::ICEPROTO_GOOGLE);
2200 VerifyTransportType("audio", cricket::ICEPROTO_RFC5245);
2201 VerifyTransportType("video", cricket::ICEPROTO_RFC5245);
2246 cricket::SessionDescription* answer_copy = answer->description()->Copy();
2284 cricket::SessionDescription* answer_copy = answer->description()->Copy();
2302 cricket::Candidate candidate;
2307 cricket::Candidate candidate1;
2352 session_->set_secure_policy(cricket::SEC_DISABLED);
2372 cricket::MediaSessionOptions options;
2404 cricket::MediaSessionOptions options;
2452 allocator_.set_flags(cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG |
2453 cricket::PORTALLOCATOR_DISABLE_TCP |
2454 cricket::PORTALLOCATOR_DISABLE_STUN |
2455 cricket::PORTALLOCATOR_DISABLE_RELAY);
2462 cricket::MediaSessionOptions options;
2466 session_->SetError(cricket::BaseSession::ERROR_CONTENT);
2482 EXPECT_EQ(cricket::DCT_RTP, data_engine_->last_channel_type());
2498 EXPECT_EQ(cricket::DCT_RTP, data_engine_->last_channel_type());
2508 EXPECT_EQ(cricket::DCT_NONE, data_engine_->last_channel_type());
2522 EXPECT_EQ(cricket::DCT_SCTP, data_engine_->last_channel_type());
2542 cricket::MediaSessionOptions options;
2544 CreateRemoteOffer(options, cricket::SEC_REQUIRED));