Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Side by Side Diff: webrtc/api/rtpsenderreceiver_unittest.cc

Issue 2614263002: Remove BaseChannel's dependency on TransportController. (Closed)
Patch Set: cr comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 channel_manager_(media_engine_, 57 channel_manager_(media_engine_,
58 rtc::Thread::Current(), 58 rtc::Thread::Current(),
59 rtc::Thread::Current()), 59 rtc::Thread::Current()),
60 fake_call_(Call::Config(&event_log_)), 60 fake_call_(Call::Config(&event_log_)),
61 fake_media_controller_(&channel_manager_, &fake_call_), 61 fake_media_controller_(&channel_manager_, &fake_call_),
62 stream_(MediaStream::Create(kStreamLabel1)) { 62 stream_(MediaStream::Create(kStreamLabel1)) {
63 // Create channels to be used by the RtpSenders and RtpReceivers. 63 // Create channels to be used by the RtpSenders and RtpReceivers.
64 channel_manager_.Init(); 64 channel_manager_.Init();
65 bool rtcp_enabled = false; 65 bool rtcp_enabled = false;
66 bool srtp_required = true; 66 bool srtp_required = true;
67 cricket::TransportChannel* rtp_transport =
68 fake_transport_controller_.CreateTransportChannel(
69 cricket::CN_AUDIO, cricket::ICE_CANDIDATE_COMPONENT_RTP);
67 voice_channel_ = channel_manager_.CreateVoiceChannel( 70 voice_channel_ = channel_manager_.CreateVoiceChannel(
68 &fake_media_controller_, &fake_transport_controller_, cricket::CN_AUDIO, 71 &fake_media_controller_, rtp_transport, nullptr, rtc::Thread::Current(),
69 nullptr, rtcp_enabled, srtp_required, cricket::AudioOptions()); 72 cricket::CN_AUDIO, nullptr, rtcp_enabled, srtp_required,
73 cricket::AudioOptions());
70 video_channel_ = channel_manager_.CreateVideoChannel( 74 video_channel_ = channel_manager_.CreateVideoChannel(
71 &fake_media_controller_, &fake_transport_controller_, cricket::CN_VIDEO, 75 &fake_media_controller_, rtp_transport, nullptr, rtc::Thread::Current(),
72 nullptr, rtcp_enabled, srtp_required, cricket::VideoOptions()); 76 cricket::CN_VIDEO, nullptr, rtcp_enabled, srtp_required,
77 cricket::VideoOptions());
73 voice_media_channel_ = media_engine_->GetVoiceChannel(0); 78 voice_media_channel_ = media_engine_->GetVoiceChannel(0);
74 video_media_channel_ = media_engine_->GetVideoChannel(0); 79 video_media_channel_ = media_engine_->GetVideoChannel(0);
75 RTC_CHECK(voice_channel_); 80 RTC_CHECK(voice_channel_);
76 RTC_CHECK(video_channel_); 81 RTC_CHECK(video_channel_);
77 RTC_CHECK(voice_media_channel_); 82 RTC_CHECK(voice_media_channel_);
78 RTC_CHECK(video_media_channel_); 83 RTC_CHECK(video_media_channel_);
79 84
80 // Create streams for predefined SSRCs. Streams need to exist in order 85 // Create streams for predefined SSRCs. Streams need to exist in order
81 // for the senders and receievers to apply parameters to them. 86 // for the senders and receievers to apply parameters to them.
82 // Normally these would be created by SetLocalDescription and 87 // Normally these would be created by SetLocalDescription and
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 // And removing the hint should go back to false (to verify that false was 715 // And removing the hint should go back to false (to verify that false was
711 // default correctly). 716 // default correctly).
712 video_track_->set_content_hint(VideoTrackInterface::ContentHint::kNone); 717 video_track_->set_content_hint(VideoTrackInterface::ContentHint::kNone);
713 EXPECT_EQ(rtc::Optional<bool>(false), 718 EXPECT_EQ(rtc::Optional<bool>(false),
714 video_media_channel_->options().is_screencast); 719 video_media_channel_->options().is_screencast);
715 720
716 DestroyVideoRtpSender(); 721 DestroyVideoRtpSender();
717 } 722 }
718 723
719 } // namespace webrtc 724 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698