(Auto)update libjingle 63560528-> 63648983
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5762 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
28e83d1a56
commit
1e6cb2c5d2
@ -90,7 +90,7 @@ bool AsyncResolver::GetResolvedAddress(int family, SocketAddress* addr) const {
|
||||
*addr = addr_;
|
||||
for (size_t i = 0; i < addresses_.size(); ++i) {
|
||||
if (family == addresses_[i].family()) {
|
||||
addr->SetIP(addresses_[i]);
|
||||
addr->SetResolvedIP(addresses_[i]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -307,6 +307,7 @@ struct VideoOptions {
|
||||
video_noise_reduction.SetFrom(change.video_noise_reduction);
|
||||
video_one_layer_screencast.SetFrom(change.video_one_layer_screencast);
|
||||
video_high_bitrate.SetFrom(change.video_high_bitrate);
|
||||
video_start_bitrate.SetFrom(change.video_start_bitrate);
|
||||
video_temporal_layer_screencast.SetFrom(
|
||||
change.video_temporal_layer_screencast);
|
||||
video_temporal_layer_realtime.SetFrom(
|
||||
@ -339,6 +340,7 @@ struct VideoOptions {
|
||||
video_noise_reduction == o.video_noise_reduction &&
|
||||
video_one_layer_screencast == o.video_one_layer_screencast &&
|
||||
video_high_bitrate == o.video_high_bitrate &&
|
||||
video_start_bitrate == o.video_start_bitrate &&
|
||||
video_temporal_layer_screencast == o.video_temporal_layer_screencast &&
|
||||
video_temporal_layer_realtime == o.video_temporal_layer_realtime &&
|
||||
video_leaky_bucket == o.video_leaky_bucket &&
|
||||
@ -371,6 +373,7 @@ struct VideoOptions {
|
||||
ost << ToStringIfSet("noise reduction", video_noise_reduction);
|
||||
ost << ToStringIfSet("1 layer screencast", video_one_layer_screencast);
|
||||
ost << ToStringIfSet("high bitrate", video_high_bitrate);
|
||||
ost << ToStringIfSet("start bitrate", video_start_bitrate);
|
||||
ost << ToStringIfSet("video temporal layer screencast",
|
||||
video_temporal_layer_screencast);
|
||||
ost << ToStringIfSet("video temporal layer realtime",
|
||||
@ -412,6 +415,8 @@ struct VideoOptions {
|
||||
Settable<bool> video_one_layer_screencast;
|
||||
// Experimental: Enable WebRtc higher bitrate?
|
||||
Settable<bool> video_high_bitrate;
|
||||
// Experimental: Enable WebRtc higher start bitrate?
|
||||
Settable<int> video_start_bitrate;
|
||||
// Experimental: Enable WebRTC layered screencast.
|
||||
Settable<bool> video_temporal_layer_screencast;
|
||||
// Experimental: Enable WebRTC temporal layer strategy for realtime video.
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "talk/media/webrtc/webrtcvideoencoderfactory.h"
|
||||
#include "talk/media/webrtc/webrtcvie.h"
|
||||
|
||||
#if !defined(USE_WEBRTC_DEV_BRANCH)
|
||||
namespace webrtc {
|
||||
|
||||
bool operator==(const webrtc::VideoCodec& c1, const webrtc::VideoCodec& c2) {
|
||||
@ -48,6 +49,7 @@ bool operator==(const webrtc::VideoCodec& c1, const webrtc::VideoCodec& c2) {
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace cricket {
|
||||
|
||||
@ -544,9 +546,16 @@ class FakeWebRtcVideoEngine
|
||||
bool ReceiveCodecRegistered(int channel,
|
||||
const webrtc::VideoCodec& codec) const {
|
||||
WEBRTC_ASSERT_CHANNEL(channel);
|
||||
#if !defined(USE_WEBRTC_DEV_BRANCH)
|
||||
const std::vector<webrtc::VideoCodec>& codecs =
|
||||
channels_.find(channel)->second->recv_codecs;
|
||||
return std::find(codecs.begin(), codecs.end(), codec) != codecs.end();
|
||||
#else
|
||||
// TODO(mallinath) - Remove this specilization after this change is pushed
|
||||
// to googlecode and operator== from VideoCodecDerived moved inside
|
||||
// VideoCodec.
|
||||
return true;
|
||||
#endif
|
||||
};
|
||||
bool ExternalDecoderRegistered(int channel,
|
||||
unsigned int pl_type) const {
|
||||
|
@ -1843,10 +1843,6 @@ bool WebRtcVideoMediaChannel::AddSendStream(const StreamParams& sp) {
|
||||
|
||||
send_channel->set_stream_params(sp);
|
||||
|
||||
if (IsSimulcastStream(sp)) {
|
||||
DisableAllExternalEncoders(send_channel, channel_id);
|
||||
}
|
||||
|
||||
// Reset send codec after stream parameters changed.
|
||||
if (send_codec_) {
|
||||
if (!SetSendCodec(send_channel, *send_codec_, send_min_bitrate_,
|
||||
@ -2856,9 +2852,17 @@ bool WebRtcVideoMediaChannel::SetOptions(const VideoOptions &options) {
|
||||
expected_bitrate = kMaxVideoBitrate;
|
||||
}
|
||||
|
||||
int options_start_bitrate;
|
||||
bool start_bitrate_changed = false;
|
||||
if (options.video_start_bitrate.Get(&options_start_bitrate) &&
|
||||
options_start_bitrate != send_start_bitrate_) {
|
||||
send_start_bitrate_ = options_start_bitrate;
|
||||
start_bitrate_changed = true;
|
||||
}
|
||||
|
||||
bool reset_send_codec_needed = send_codec_ &&
|
||||
(send_max_bitrate_ != expected_bitrate || denoiser_changed ||
|
||||
adjusted_min_bitrate);
|
||||
adjusted_min_bitrate || start_bitrate_changed);
|
||||
|
||||
|
||||
if (reset_send_codec_needed) {
|
||||
@ -3913,24 +3917,6 @@ void WebRtcVideoMediaChannel::MaybeDisconnectCapturer(VideoCapturer* capturer) {
|
||||
}
|
||||
}
|
||||
|
||||
void WebRtcVideoMediaChannel::DisableAllExternalEncoders(
|
||||
WebRtcVideoChannelSendInfo* send_channel,
|
||||
int channel_id) {
|
||||
const WebRtcVideoChannelSendInfo::EncoderMap& encoder_map =
|
||||
send_channel->registered_encoders();
|
||||
for (WebRtcVideoChannelSendInfo::EncoderMap::const_iterator it =
|
||||
encoder_map.begin(); it != encoder_map.end(); ++it) {
|
||||
if (engine()->vie()->ext_codec()->DeRegisterExternalSendCodec(
|
||||
channel_id, it->first) != 0) {
|
||||
LOG_RTCERR1(DeregisterEncoderObserver, channel_id);
|
||||
}
|
||||
engine()->DestroyExternalEncoder(it->second);
|
||||
}
|
||||
send_channel->ClearRegisteredEncoders();
|
||||
|
||||
engine()->SetExternalEncoderFactory(NULL);
|
||||
}
|
||||
|
||||
} // namespace cricket
|
||||
|
||||
#endif // HAVE_WEBRTC_VIDEO
|
||||
|
@ -414,11 +414,6 @@ class WebRtcVideoMediaChannel : public talk_base::MessageHandler,
|
||||
// to one send channel, i.e. the last send channel.
|
||||
void MaybeDisconnectCapturer(VideoCapturer* capturer);
|
||||
|
||||
// Deregister and free all the external encoders previously register to
|
||||
// |send_channel|. Also disable the external encoder factory.
|
||||
void DisableAllExternalEncoders(WebRtcVideoChannelSendInfo* send_channel,
|
||||
int channel_id);
|
||||
|
||||
// Global state.
|
||||
WebRtcVideoEngine* engine_;
|
||||
VoiceMediaChannel* voice_channel_;
|
||||
|
@ -64,8 +64,8 @@ static const cricket::VideoCodec* const kVideoCodecs[] = {
|
||||
&kUlpFecCodec
|
||||
};
|
||||
|
||||
static const unsigned int kMinBandwidthKbps = 50;
|
||||
static const unsigned int kStartBandwidthKbps = 300;
|
||||
static const unsigned int kMinBandwidthKbps = 50;
|
||||
static const unsigned int kMaxBandwidthKbps = 2000;
|
||||
|
||||
static const unsigned int kNumberOfTemporalLayers = 1;
|
||||
@ -1158,6 +1158,28 @@ TEST_F(WebRtcVideoEngineTestFake, SetStartBandwidth) {
|
||||
max_bandwidth_kbps, kMinBandwidthKbps, start_bandwidth_kbps);
|
||||
}
|
||||
|
||||
// Test that the start bandwidth can be controlled by experiment.
|
||||
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);
|
||||
|
||||
// Set the start bitrate option.
|
||||
start_bandwidth_kbps = 1000;
|
||||
cricket::VideoOptions options;
|
||||
options.video_start_bitrate.Set(
|
||||
start_bandwidth_kbps);
|
||||
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);
|
||||
}
|
||||
|
||||
// Test that SetMaxSendBandwidth is ignored in conference mode.
|
||||
TEST_F(WebRtcVideoEngineTestFake, SetBandwidthInConference) {
|
||||
EXPECT_TRUE(SetupEngine());
|
||||
@ -1585,7 +1607,6 @@ TEST_F(WebRtcVideoEngineTestFake, RegisterEncoderIfFactoryIsGiven) {
|
||||
EXPECT_TRUE(channel_->RemoveSendStream(kSsrc));
|
||||
}
|
||||
|
||||
|
||||
TEST_F(WebRtcVideoEngineTestFake, DontRegisterEncoderMultipleTimes) {
|
||||
encoder_factory_.AddSupportedVideoCodecType(webrtc::kVideoCodecVP8, "VP8");
|
||||
engine_.SetExternalEncoderFactory(&encoder_factory_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user