From 97abeee2825ac93b62397feea74d0ad02d42540d Mon Sep 17 00:00:00 2001 From: "buildbot@webrtc.org" Date: Wed, 8 Oct 2014 22:24:30 +0000 Subject: [PATCH] (Auto)update libjingle 77263371-> 77296420 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7400 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/media/base/fakemediaengine.h | 9 ------ talk/media/base/filemediaengine.h | 2 -- talk/media/base/mediachannel.h | 2 -- talk/media/base/rtpdataengine.h | 1 - talk/media/base/videoengine_unittest.h | 1 - talk/media/other/linphonemediaengine.h | 1 - talk/media/sctp/sctpdataengine.h | 1 - talk/media/webrtc/webrtcvideoengine.cc | 19 ----------- talk/media/webrtc/webrtcvideoengine.h | 1 - talk/media/webrtc/webrtcvideoengine2.cc | 6 ---- talk/media/webrtc/webrtcvideoengine2.h | 1 - .../webrtc/webrtcvideoengine_unittest.cc | 32 ++++--------------- talk/media/webrtc/webrtcvoiceengine.cc | 6 ---- talk/media/webrtc/webrtcvoiceengine.h | 1 - 14 files changed, 6 insertions(+), 77 deletions(-) diff --git a/talk/media/base/fakemediaengine.h b/talk/media/base/fakemediaengine.h index a6eabef2f..8c73cfcd2 100644 --- a/talk/media/base/fakemediaengine.h +++ b/talk/media/base/fakemediaengine.h @@ -281,7 +281,6 @@ class FakeVoiceMediaChannel : public RtpHelper { } return set_sending(flag != SEND_NOTHING); } - virtual bool SetStartSendBandwidth(int bps) { return true; } virtual bool SetMaxSendBandwidth(int bps) { return true; } virtual bool AddRecvStream(const StreamParams& sp) { if (!RtpHelper::AddRecvStream(sp)) @@ -477,7 +476,6 @@ class FakeVideoMediaChannel : public RtpHelper { : engine_(engine), sent_intra_frame_(false), requested_intra_frame_(false), - start_bps_(-1), max_bps_(-1) {} ~FakeVideoMediaChannel(); @@ -489,7 +487,6 @@ class FakeVideoMediaChannel : public RtpHelper { const std::map& renderers() const { return renderers_; } - int start_bps() const { return start_bps_; } int max_bps() const { return max_bps_; } bool GetSendStreamFormat(uint32 ssrc, VideoFormat* format) { if (send_formats_.find(ssrc) == send_formats_.end()) { @@ -568,10 +565,6 @@ class FakeVideoMediaChannel : public RtpHelper { bool HasCapturer(uint32 ssrc) const { return capturers_.find(ssrc) != capturers_.end(); } - virtual bool SetStartSendBandwidth(int bps) { - start_bps_ = bps; - return true; - } virtual bool SetMaxSendBandwidth(int bps) { max_bps_ = bps; return true; @@ -633,7 +626,6 @@ class FakeVideoMediaChannel : public RtpHelper { bool sent_intra_frame_; bool requested_intra_frame_; VideoOptions options_; - int start_bps_; int max_bps_; }; @@ -673,7 +665,6 @@ class FakeDataMediaChannel : public RtpHelper { set_playout(receive); return true; } - virtual bool SetStartSendBandwidth(int bps) { return true; } virtual bool SetMaxSendBandwidth(int bps) { max_bps_ = bps; return true; diff --git a/talk/media/base/filemediaengine.h b/talk/media/base/filemediaengine.h index d3e99a89c..5d90f01c7 100644 --- a/talk/media/base/filemediaengine.h +++ b/talk/media/base/filemediaengine.h @@ -241,7 +241,6 @@ class FileVoiceChannel : public VoiceMediaChannel { virtual bool AddRecvStream(const StreamParams& sp) { return true; } virtual bool RemoveRecvStream(uint32 ssrc) { return true; } virtual bool MuteStream(uint32 ssrc, bool on) { return false; } - virtual bool SetStartSendBandwidth(int bps) { return true; } virtual bool SetMaxSendBandwidth(int bps) { return true; } virtual bool SetOptions(const AudioOptions& options) { options_ = options; @@ -312,7 +311,6 @@ class FileVideoChannel : public VideoMediaChannel { virtual bool AddRecvStream(const StreamParams& sp) { return true; } virtual bool RemoveRecvStream(uint32 ssrc) { return true; } virtual bool MuteStream(uint32 ssrc, bool on) { return false; } - virtual bool SetStartSendBandwidth(int bps) { return true; } virtual bool SetMaxSendBandwidth(int bps) { return true; } virtual bool SetOptions(const VideoOptions& options) { options_ = options; diff --git a/talk/media/base/mediachannel.h b/talk/media/base/mediachannel.h index 5232e5d3c..17778d849 100644 --- a/talk/media/base/mediachannel.h +++ b/talk/media/base/mediachannel.h @@ -606,8 +606,6 @@ class MediaChannel : public sigslot::has_slots<> { virtual int GetRtpSendTimeExtnId() const { return -1; } - // Sets the initial bandwidth to use when sending starts. - virtual bool SetStartSendBandwidth(int bps) = 0; // Sets the maximum allowed bandwidth to use when sending data. virtual bool SetMaxSendBandwidth(int bps) = 0; diff --git a/talk/media/base/rtpdataengine.h b/talk/media/base/rtpdataengine.h index 787ba2654..6f47c5b4b 100644 --- a/talk/media/base/rtpdataengine.h +++ b/talk/media/base/rtpdataengine.h @@ -96,7 +96,6 @@ class RtpDataMediaChannel : public DataMediaChannel { timing_ = timing; } - virtual bool SetStartSendBandwidth(int bps) { return true; } virtual bool SetMaxSendBandwidth(int bps); virtual bool SetRecvRtpHeaderExtensions( const std::vector& extensions) { return true; } diff --git a/talk/media/base/videoengine_unittest.h b/talk/media/base/videoengine_unittest.h index 8eab347d5..691bef8d4 100644 --- a/talk/media/base/videoengine_unittest.h +++ b/talk/media/base/videoengine_unittest.h @@ -1010,7 +1010,6 @@ class VideoMediaChannelTest : public testing::Test, // Test that we can set the bandwidth. void SetSendBandwidth() { - EXPECT_TRUE(channel_->SetStartSendBandwidth(64 * 1024)); EXPECT_TRUE(channel_->SetMaxSendBandwidth(-1)); // <= 0 means unlimited. EXPECT_TRUE(channel_->SetMaxSendBandwidth(128 * 1024)); } diff --git a/talk/media/other/linphonemediaengine.h b/talk/media/other/linphonemediaengine.h index b4950dea1..b17f4062d 100644 --- a/talk/media/other/linphonemediaengine.h +++ b/talk/media/other/linphonemediaengine.h @@ -143,7 +143,6 @@ class LinphoneVoiceChannel : public VoiceMediaChannel { virtual void SetSendSsrc(uint32 id) {} // TODO: change RTP packet? virtual bool SetRtcpCName(const std::string& cname) { return true; } virtual bool Mute(bool on) { return mute_; } - virtual bool SetStartSendBandwidth(int bps) { return true; } virtual bool SetMaxSendBandwidth(int bps) { return true; } virtual bool SetOptions(int options) { return true; } virtual bool SetRecvRtpHeaderExtensions( diff --git a/talk/media/sctp/sctpdataengine.h b/talk/media/sctp/sctpdataengine.h index 4e36d6517..205c6c122 100644 --- a/talk/media/sctp/sctpdataengine.h +++ b/talk/media/sctp/sctpdataengine.h @@ -172,7 +172,6 @@ class SctpDataMediaChannel : public DataMediaChannel, // TODO(pthatcher): Cleanup MediaChannel interface, or at least // don't try calling these and return false. Right now, things // don't work if we return false. - virtual bool SetStartSendBandwidth(int bps) { return true; } virtual bool SetMaxSendBandwidth(int bps) { return true; } virtual bool SetRecvRtpHeaderExtensions( const std::vector& extensions) { return true; } diff --git a/talk/media/webrtc/webrtcvideoengine.cc b/talk/media/webrtc/webrtcvideoengine.cc index b2533b312..512506285 100644 --- a/talk/media/webrtc/webrtcvideoengine.cc +++ b/talk/media/webrtc/webrtcvideoengine.cc @@ -2904,25 +2904,6 @@ int WebRtcVideoMediaChannel::GetRtpSendTimeExtnId() const { return -1; } -bool WebRtcVideoMediaChannel::SetStartSendBandwidth(int bps) { - LOG(LS_INFO) << "WebRtcVideoMediaChannel::SetStartSendBandwidth"; - - if (!send_codec_) { - LOG(LS_INFO) << "The send codec has not been set up yet"; - return true; - } - - // On success, SetSendCodec() will reset |send_start_bitrate_| to |bps/1000|, - // by calling SanitizeBitrates. That method will also clamp the - // start bitrate between min and max, consistent with the override behavior - // in SetMaxSendBandwidth. - webrtc::VideoCodec new_codec = *send_codec_; - if (BitrateIsSet(bps)) { - new_codec.startBitrate = bps / 1000; - } - return SetSendCodec(new_codec); -} - bool WebRtcVideoMediaChannel::SetMaxSendBandwidth(int bps) { LOG(LS_INFO) << "WebRtcVideoMediaChannel::SetMaxSendBandwidth"; diff --git a/talk/media/webrtc/webrtcvideoengine.h b/talk/media/webrtc/webrtcvideoengine.h index 6f939d2ab..7a3651ba4 100644 --- a/talk/media/webrtc/webrtcvideoengine.h +++ b/talk/media/webrtc/webrtcvideoengine.h @@ -278,7 +278,6 @@ class WebRtcVideoMediaChannel : public rtc::MessageHandler, virtual bool SetSendRtpHeaderExtensions( const std::vector& extensions); virtual int GetRtpSendTimeExtnId() const; - virtual bool SetStartSendBandwidth(int bps); virtual bool SetMaxSendBandwidth(int bps); virtual bool SetOptions(const VideoOptions &options); virtual bool GetOptions(VideoOptions *options) const { diff --git a/talk/media/webrtc/webrtcvideoengine2.cc b/talk/media/webrtc/webrtcvideoengine2.cc index b68ceb6a3..befe38ef1 100644 --- a/talk/media/webrtc/webrtcvideoengine2.cc +++ b/talk/media/webrtc/webrtcvideoengine2.cc @@ -1230,12 +1230,6 @@ bool WebRtcVideoChannel2::SetSendRtpHeaderExtensions( return true; } -bool WebRtcVideoChannel2::SetStartSendBandwidth(int bps) { - // TODO(pbos): Implement. - LOG(LS_VERBOSE) << "SetStartSendBandwidth: " << bps; - return true; -} - bool WebRtcVideoChannel2::SetMaxSendBandwidth(int bps) { // TODO(pbos): Implement. LOG(LS_VERBOSE) << "SetMaxSendBandwidth: " << bps; diff --git a/talk/media/webrtc/webrtcvideoengine2.h b/talk/media/webrtc/webrtcvideoengine2.h index 3bd335532..e7308ec06 100644 --- a/talk/media/webrtc/webrtcvideoengine2.h +++ b/talk/media/webrtc/webrtcvideoengine2.h @@ -259,7 +259,6 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler, const std::vector& extensions) OVERRIDE; virtual bool SetSendRtpHeaderExtensions( const std::vector& extensions) OVERRIDE; - virtual bool SetStartSendBandwidth(int bps) OVERRIDE; virtual bool SetMaxSendBandwidth(int bps) OVERRIDE; virtual bool SetOptions(const VideoOptions& options) OVERRIDE; virtual bool GetOptions(VideoOptions* options) const OVERRIDE { diff --git a/talk/media/webrtc/webrtcvideoengine_unittest.cc b/talk/media/webrtc/webrtcvideoengine_unittest.cc index 35f05e176..8fc1920d1 100644 --- a/talk/media/webrtc/webrtcvideoengine_unittest.cc +++ b/talk/media/webrtc/webrtcvideoengine_unittest.cc @@ -1488,44 +1488,24 @@ TEST_F(WebRtcVideoEngineTestFake, SetMaxBandwidthBelowMin) { max_bandwidth_kbps, max_bandwidth_kbps, max_bandwidth_kbps); } -// Test that the start bandwidth can be controlled separately from the max -// bandwidth. -TEST_F(WebRtcVideoEngineTestFake, SetStartBandwidth) { - EXPECT_TRUE(SetupEngine()); - int channel_num = vie_.GetLastChannel(); - EXPECT_TRUE(channel_->SetSendCodecs(engine_.codecs())); - int start_bandwidth_kbps = kStartBandwidthKbps + 1; - EXPECT_TRUE(channel_->SetStartSendBandwidth(start_bandwidth_kbps * 1000)); - VerifyVP8SendCodec(channel_num, kVP8Codec.width, kVP8Codec.height, 0, - kMaxBandwidthKbps, kMinBandwidthKbps, start_bandwidth_kbps); - - // Check that SetMaxSendBandwidth doesn't overwrite the start bandwidth. - int max_bandwidth_kbps = kMaxBandwidthKbps + 1; - EXPECT_TRUE(channel_->SetMaxSendBandwidth(max_bandwidth_kbps * 1000)); - VerifyVP8SendCodec(channel_num, kVP8Codec.width, kVP8Codec.height, 0, - max_bandwidth_kbps, kMinBandwidthKbps, start_bandwidth_kbps); -} - -// Test that the start bandwidth can be controlled by experiment. +// Test that the start bandwidth can be controlled by VideoOptions. TEST_F(WebRtcVideoEngineTestFake, SetStartBandwidthOption) { EXPECT_TRUE(SetupEngine()); int channel_num = vie_.GetLastChannel(); EXPECT_TRUE(channel_->SetSendCodecs(engine_.codecs())); - int start_bandwidth_kbps = kStartBandwidthKbps; - EXPECT_TRUE(channel_->SetStartSendBandwidth(start_bandwidth_kbps * 1000)); VerifyVP8SendCodec(channel_num, kVP8Codec.width, kVP8Codec.height, 0, - kMaxBandwidthKbps, kMinBandwidthKbps, start_bandwidth_kbps); + kMaxBandwidthKbps, kMinBandwidthKbps, kStartBandwidthKbps); // Set the start bitrate option. - start_bandwidth_kbps = 1000; + int kBoostedStartBandwidthKbps = 1000; + ASSERT_NE(kStartBandwidthKbps, kBoostedStartBandwidthKbps); cricket::VideoOptions options; - options.video_start_bitrate.Set( - start_bandwidth_kbps); + options.video_start_bitrate.Set(kBoostedStartBandwidthKbps); EXPECT_TRUE(channel_->SetOptions(options)); // Check that start bitrate has changed to the new value. VerifyVP8SendCodec(channel_num, kVP8Codec.width, kVP8Codec.height, 0, - kMaxBandwidthKbps, kMinBandwidthKbps, start_bandwidth_kbps); + kMaxBandwidthKbps, kMinBandwidthKbps, kBoostedStartBandwidthKbps); } // Test that SetMaxSendBandwidth works as expected in conference mode. diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc index a524badc7..f9e787829 100644 --- a/talk/media/webrtc/webrtcvoiceengine.cc +++ b/talk/media/webrtc/webrtcvoiceengine.cc @@ -3206,12 +3206,6 @@ bool WebRtcVoiceMediaChannel::MuteStream(uint32 ssrc, bool muted) { return true; } -bool WebRtcVoiceMediaChannel::SetStartSendBandwidth(int bps) { - // TODO(andresp): Add support for setting an independent start bandwidth when - // bandwidth estimation is enabled for voice engine. - return false; -} - bool WebRtcVoiceMediaChannel::SetMaxSendBandwidth(int bps) { LOG(LS_INFO) << "WebRtcVoiceMediaChanne::SetSendBandwidth."; diff --git a/talk/media/webrtc/webrtcvoiceengine.h b/talk/media/webrtc/webrtcvoiceengine.h index 5557af03c..5d71612b0 100644 --- a/talk/media/webrtc/webrtcvoiceengine.h +++ b/talk/media/webrtc/webrtcvoiceengine.h @@ -374,7 +374,6 @@ class WebRtcVoiceMediaChannel const rtc::PacketTime& packet_time); virtual void OnReadyToSend(bool ready) {} virtual bool MuteStream(uint32 ssrc, bool on); - virtual bool SetStartSendBandwidth(int bps); virtual bool SetMaxSendBandwidth(int bps); virtual bool GetStats(VoiceMediaInfo* info); // Gets last reported error from WebRtc voice engine. This should be only