From 7fb711f68312f61f392b3f33b950e97cb07da71f Mon Sep 17 00:00:00 2001 From: Fredrik Solenberg Date: Wed, 22 Apr 2015 15:30:51 +0200 Subject: [PATCH] Remove unused voice channel argument from cricket::VideoChannel ctor and corresponding field in class. BUG=4574 R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/50769004 Cr-Commit-Position: refs/heads/master@{#9056} --- talk/app/webrtc/statscollector_unittest.cc | 16 ++++++++-------- talk/session/media/channel.cc | 4 +--- talk/session/media/channel.h | 4 +--- talk/session/media/channel_unittest.cc | 2 +- talk/session/media/channelmanager.cc | 2 +- talk/session/media/mediarecorder_unittest.cc | 2 +- 6 files changed, 13 insertions(+), 17 deletions(-) diff --git a/talk/app/webrtc/statscollector_unittest.cc b/talk/app/webrtc/statscollector_unittest.cc index dfefd68ad..4e2bbedf7 100644 --- a/talk/app/webrtc/statscollector_unittest.cc +++ b/talk/app/webrtc/statscollector_unittest.cc @@ -790,7 +790,7 @@ TEST_F(StatsCollectorTest, BytesCounterHandles64Bits) { MockVideoMediaChannel* media_channel = new MockVideoMediaChannel(); cricket::VideoChannel video_channel(rtc::Thread::Current(), - media_engine_, media_channel, NULL, kVideoChannelName, false, NULL); + media_engine_, media_channel, NULL, kVideoChannelName, false); StatsReports reports; // returned values. cricket::VideoSenderInfo video_sender_info; cricket::VideoMediaInfo stats_read; @@ -833,7 +833,7 @@ TEST_F(StatsCollectorTest, BandwidthEstimationInfoIsReported) { MockVideoMediaChannel* media_channel = new MockVideoMediaChannel(); cricket::VideoChannel video_channel(rtc::Thread::Current(), - media_engine_, media_channel, NULL, kVideoChannelName, false, NULL); + media_engine_, media_channel, NULL, kVideoChannelName, false); StatsReports reports; // returned values. cricket::VideoSenderInfo video_sender_info; @@ -912,7 +912,7 @@ TEST_F(StatsCollectorTest, TrackObjectExistsWithoutUpdateStats) { MockVideoMediaChannel* media_channel = new MockVideoMediaChannel(); cricket::VideoChannel video_channel(rtc::Thread::Current(), - media_engine_, media_channel, NULL, "video", false, NULL); + media_engine_, media_channel, NULL, "video", false); AddOutgoingVideoTrackStats(); stats.AddStream(stream_); @@ -944,7 +944,7 @@ TEST_F(StatsCollectorTest, TrackAndSsrcObjectExistAfterUpdateSsrcStats) { MockVideoMediaChannel* media_channel = new MockVideoMediaChannel(); cricket::VideoChannel video_channel(rtc::Thread::Current(), - media_engine_, media_channel, NULL, kVideoChannelName, false, NULL); + media_engine_, media_channel, NULL, kVideoChannelName, false); AddOutgoingVideoTrackStats(); stats.AddStream(stream_); @@ -1005,7 +1005,7 @@ TEST_F(StatsCollectorTest, TransportObjectLinkedFromSsrcObject) { // The content_name known by the video channel. const std::string kVcName("vcname"); cricket::VideoChannel video_channel(rtc::Thread::Current(), - media_engine_, media_channel, NULL, kVcName, false, NULL); + media_engine_, media_channel, NULL, kVcName, false); AddOutgoingVideoTrackStats(); stats.AddStream(stream_); @@ -1063,7 +1063,7 @@ TEST_F(StatsCollectorTest, RemoteSsrcInfoIsAbsent) { // The content_name known by the video channel. const std::string kVcName("vcname"); cricket::VideoChannel video_channel(rtc::Thread::Current(), - media_engine_, media_channel, NULL, kVcName, false, NULL); + media_engine_, media_channel, NULL, kVcName, false); AddOutgoingVideoTrackStats(); stats.AddStream(stream_); @@ -1090,7 +1090,7 @@ TEST_F(StatsCollectorTest, RemoteSsrcInfoIsPresent) { // The content_name known by the video channel. const std::string kVcName("vcname"); cricket::VideoChannel video_channel(rtc::Thread::Current(), - media_engine_, media_channel, NULL, kVcName, false, NULL); + media_engine_, media_channel, NULL, kVcName, false); AddOutgoingVideoTrackStats(); stats.AddStream(stream_); @@ -1142,7 +1142,7 @@ TEST_F(StatsCollectorTest, ReportsFromRemoteTrack) { MockVideoMediaChannel* media_channel = new MockVideoMediaChannel(); cricket::VideoChannel video_channel(rtc::Thread::Current(), - media_engine_, media_channel, NULL, kVideoChannelName, false, NULL); + media_engine_, media_channel, NULL, kVideoChannelName, false); AddIncomingVideoTrackStats(); stats.AddStream(stream_); diff --git a/talk/session/media/channel.cc b/talk/session/media/channel.cc index fb0f8e255..1ce65fafd 100644 --- a/talk/session/media/channel.cc +++ b/talk/session/media/channel.cc @@ -1724,11 +1724,9 @@ VideoChannel::VideoChannel(rtc::Thread* thread, VideoMediaChannel* media_channel, BaseSession* session, const std::string& content_name, - bool rtcp, - VoiceChannel* voice_channel) + bool rtcp) : BaseChannel(thread, media_engine, media_channel, session, content_name, rtcp), - voice_channel_(voice_channel), renderer_(NULL), previous_we_(rtc::WE_CLOSE) { } diff --git a/talk/session/media/channel.h b/talk/session/media/channel.h index aebb41fa8..14dae3b14 100644 --- a/talk/session/media/channel.h +++ b/talk/session/media/channel.h @@ -522,8 +522,7 @@ class VideoChannel : public BaseChannel { public: VideoChannel(rtc::Thread* thread, MediaEngineInterface* media_engine, VideoMediaChannel* channel, BaseSession* session, - const std::string& content_name, bool rtcp, - VoiceChannel* voice_channel); + const std::string& content_name, bool rtcp); ~VideoChannel(); bool Init(); @@ -602,7 +601,6 @@ class VideoChannel : public BaseChannel { void OnVideoChannelError(uint32 ssrc, VideoMediaChannel::Error error); void OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode, SrtpFilter::Error error); - VoiceChannel* voice_channel_; VideoRenderer* renderer_; ScreencastMap screencast_capturers_; rtc::scoped_ptr media_monitor_; diff --git a/talk/session/media/channel_unittest.cc b/talk/session/media/channel_unittest.cc index 578e2c919..a55f6e8cb 100644 --- a/talk/session/media/channel_unittest.cc +++ b/talk/session/media/channel_unittest.cc @@ -1911,7 +1911,7 @@ cricket::VideoChannel* ChannelTest::CreateChannel( cricket::FakeVideoMediaChannel* ch, cricket::BaseSession* session, bool rtcp) { cricket::VideoChannel* channel = new cricket::VideoChannel( - thread, engine, ch, session, cricket::CN_VIDEO, rtcp, NULL); + thread, engine, ch, session, cricket::CN_VIDEO, rtcp); if (!channel->Init()) { delete channel; channel = NULL; diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc index 548c84bba..e4de6d4d2 100644 --- a/talk/session/media/channelmanager.cc +++ b/talk/session/media/channelmanager.cc @@ -424,7 +424,7 @@ VideoChannel* ChannelManager::CreateVideoChannel_w( VideoChannel* video_channel = new VideoChannel( worker_thread_, media_engine_.get(), media_channel, - session, content_name, rtcp, voice_channel); + session, content_name, rtcp); if (!video_channel->Init()) { delete video_channel; return NULL; diff --git a/talk/session/media/mediarecorder_unittest.cc b/talk/session/media/mediarecorder_unittest.cc index 2a36e6778..52a92457f 100644 --- a/talk/session/media/mediarecorder_unittest.cc +++ b/talk/session/media/mediarecorder_unittest.cc @@ -347,7 +347,7 @@ TEST(MediaRecorderTest, TestMediaRecorderVideoChannel) { FakeMediaEngine media_engine; FakeVideoMediaChannel* media_channel = new FakeVideoMediaChannel(NULL); VideoChannel channel(rtc::Thread::Current(), &media_engine, - media_channel, NULL, "", false, NULL); + media_channel, NULL, "", false); TestMediaRecorder(&channel, media_channel, PF_RTPPACKET); TestMediaRecorder(&channel, media_channel, PF_RTPHEADER); TestRecordHeaderAndMedia(&channel, media_channel);