Remove GetDefaultConfigs() from Call.
Defaults for configs are instead placed in the Config constructors. BUG= R=mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/18729004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6608 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
7832648824
commit
bd249bc711
@ -940,7 +940,7 @@ bool WebRtcVideoChannel2::AddSendStream(const StreamParams& sp) {
|
||||
return false;
|
||||
}
|
||||
|
||||
webrtc::VideoSendStream::Config config = call_->GetDefaultSendConfig();
|
||||
webrtc::VideoSendStream::Config config;
|
||||
|
||||
if (!ConfigureSendSsrcs(&config, sp)) {
|
||||
return false;
|
||||
@ -1052,7 +1052,7 @@ bool WebRtcVideoChannel2::AddRecvStream(const StreamParams& sp) {
|
||||
return false;
|
||||
}
|
||||
|
||||
webrtc::VideoReceiveStream::Config config = call_->GetDefaultReceiveConfig();
|
||||
webrtc::VideoReceiveStream::Config config;
|
||||
config.rtp.remote_ssrc = ssrc;
|
||||
config.rtp.local_ssrc = rtcp_receiver_report_ssrc_;
|
||||
|
||||
|
@ -186,13 +186,6 @@ std::vector<webrtc::VideoCodec> FakeCall::GetDefaultVideoCodecs() {
|
||||
return codecs;
|
||||
}
|
||||
|
||||
webrtc::VideoSendStream::Config FakeCall::GetDefaultSendConfig() {
|
||||
webrtc::VideoSendStream::Config config;
|
||||
// TODO(pbos): Encoder settings.
|
||||
// config.codec = GetVideoCodecVp8();
|
||||
return config;
|
||||
}
|
||||
|
||||
webrtc::VideoSendStream* FakeCall::CreateVideoSendStream(
|
||||
const webrtc::VideoSendStream::Config& config,
|
||||
const std::vector<webrtc::VideoStream>& video_streams,
|
||||
@ -216,10 +209,6 @@ void FakeCall::DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) {
|
||||
ADD_FAILURE() << "DestroyVideoSendStream called with unknown paramter.";
|
||||
}
|
||||
|
||||
webrtc::VideoReceiveStream::Config FakeCall::GetDefaultReceiveConfig() {
|
||||
return webrtc::VideoReceiveStream::Config();
|
||||
}
|
||||
|
||||
webrtc::VideoReceiveStream* FakeCall::CreateVideoReceiveStream(
|
||||
const webrtc::VideoReceiveStream::Config& config) {
|
||||
video_receive_streams_.push_back(new FakeVideoReceiveStream(config));
|
||||
|
@ -98,8 +98,6 @@ class FakeCall : public webrtc::Call {
|
||||
std::vector<webrtc::VideoCodec> GetDefaultVideoCodecs();
|
||||
|
||||
private:
|
||||
virtual webrtc::VideoSendStream::Config GetDefaultSendConfig() OVERRIDE;
|
||||
|
||||
virtual webrtc::VideoSendStream* CreateVideoSendStream(
|
||||
const webrtc::VideoSendStream::Config& config,
|
||||
const std::vector<webrtc::VideoStream>& video_streams,
|
||||
@ -108,8 +106,6 @@ class FakeCall : public webrtc::Call {
|
||||
virtual void DestroyVideoSendStream(
|
||||
webrtc::VideoSendStream* send_stream) OVERRIDE;
|
||||
|
||||
virtual webrtc::VideoReceiveStream::Config GetDefaultReceiveConfig() OVERRIDE;
|
||||
|
||||
virtual webrtc::VideoReceiveStream* CreateVideoReceiveStream(
|
||||
const webrtc::VideoReceiveStream::Config& config) OVERRIDE;
|
||||
|
||||
|
@ -86,8 +86,6 @@ class Call {
|
||||
static Call* Create(const Call::Config& config,
|
||||
const webrtc::Config& webrtc_config);
|
||||
|
||||
virtual VideoSendStream::Config GetDefaultSendConfig() = 0;
|
||||
|
||||
virtual VideoSendStream* CreateVideoSendStream(
|
||||
const VideoSendStream::Config& config,
|
||||
const std::vector<VideoStream>& video_streams,
|
||||
@ -95,8 +93,6 @@ class Call {
|
||||
|
||||
virtual void DestroyVideoSendStream(VideoSendStream* send_stream) = 0;
|
||||
|
||||
virtual VideoReceiveStream::Config GetDefaultReceiveConfig() = 0;
|
||||
|
||||
virtual VideoReceiveStream* CreateVideoReceiveStream(
|
||||
const VideoReceiveStream::Config& config) = 0;
|
||||
virtual void DestroyVideoReceiveStream(
|
||||
|
@ -85,7 +85,7 @@ void CallTest::CreateReceiverCall(const Call::Config& config) {
|
||||
|
||||
void CallTest::CreateSendConfig(size_t num_streams) {
|
||||
assert(num_streams <= kNumSsrcs);
|
||||
send_config_ = sender_call_->GetDefaultSendConfig();
|
||||
send_config_ = VideoSendStream::Config();
|
||||
send_config_.encoder_settings.encoder = &fake_encoder_;
|
||||
send_config_.encoder_settings.payload_name = "FAKE";
|
||||
send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
|
||||
@ -97,7 +97,7 @@ void CallTest::CreateSendConfig(size_t num_streams) {
|
||||
void CallTest::CreateMatchingReceiveConfigs() {
|
||||
assert(!send_config_.rtp.ssrcs.empty());
|
||||
assert(receive_configs_.empty());
|
||||
VideoReceiveStream::Config config = receiver_call_->GetDefaultReceiveConfig();
|
||||
VideoReceiveStream::Config config;
|
||||
VideoCodec codec =
|
||||
test::CreateDecoderVideoCodec(send_config_.encoder_settings);
|
||||
config.codecs.push_back(codec);
|
||||
|
@ -62,7 +62,7 @@ class BitrateEstimatorTest : public test::CallTest {
|
||||
send_transport_.SetReceiver(receiver_call_->Receiver());
|
||||
receive_transport_.SetReceiver(sender_call_->Receiver());
|
||||
|
||||
send_config_ = sender_call_->GetDefaultSendConfig();
|
||||
send_config_ = VideoSendStream::Config();
|
||||
send_config_.rtp.ssrcs.push_back(kSendSsrcs[0]);
|
||||
// Encoders will be set separately per stream.
|
||||
send_config_.encoder_settings.encoder = NULL;
|
||||
@ -70,7 +70,7 @@ class BitrateEstimatorTest : public test::CallTest {
|
||||
send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
|
||||
video_streams_ = test::CreateVideoStreams(1);
|
||||
|
||||
receive_config_ = receiver_call_->GetDefaultReceiveConfig();
|
||||
receive_config_ = VideoReceiveStream::Config();
|
||||
assert(receive_config_.codecs.empty());
|
||||
VideoCodec codec =
|
||||
test::CreateDecoderVideoCodec(send_config_.encoder_settings);
|
||||
|
@ -67,8 +67,6 @@ class Call : public webrtc::Call, public PacketReceiver {
|
||||
|
||||
virtual PacketReceiver* Receiver() OVERRIDE;
|
||||
|
||||
virtual VideoSendStream::Config GetDefaultSendConfig() OVERRIDE;
|
||||
|
||||
virtual VideoSendStream* CreateVideoSendStream(
|
||||
const VideoSendStream::Config& config,
|
||||
const std::vector<VideoStream>& video_streams,
|
||||
@ -77,8 +75,6 @@ class Call : public webrtc::Call, public PacketReceiver {
|
||||
virtual void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream)
|
||||
OVERRIDE;
|
||||
|
||||
virtual VideoReceiveStream::Config GetDefaultReceiveConfig() OVERRIDE;
|
||||
|
||||
virtual VideoReceiveStream* CreateVideoReceiveStream(
|
||||
const VideoReceiveStream::Config& config) OVERRIDE;
|
||||
|
||||
@ -173,11 +169,6 @@ Call::~Call() {
|
||||
|
||||
PacketReceiver* Call::Receiver() { return this; }
|
||||
|
||||
VideoSendStream::Config Call::GetDefaultSendConfig() {
|
||||
VideoSendStream::Config config;
|
||||
return config;
|
||||
}
|
||||
|
||||
VideoSendStream* Call::CreateVideoSendStream(
|
||||
const VideoSendStream::Config& config,
|
||||
const std::vector<VideoStream>& video_streams,
|
||||
@ -227,12 +218,6 @@ void Call::DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) {
|
||||
delete send_stream_impl;
|
||||
}
|
||||
|
||||
VideoReceiveStream::Config Call::GetDefaultReceiveConfig() {
|
||||
VideoReceiveStream::Config config;
|
||||
config.rtp.remb = true;
|
||||
return config;
|
||||
}
|
||||
|
||||
VideoReceiveStream* Call::CreateVideoReceiveStream(
|
||||
const VideoReceiveStream::Config& config) {
|
||||
VideoReceiveStream* receive_stream =
|
||||
|
@ -917,7 +917,7 @@ TEST_F(EndToEndTest, SendsAndReceivesMultipleStreams) {
|
||||
int height = codec_settings[i].height;
|
||||
observers[i] = new VideoOutputObserver(&frame_generators[i], width, height);
|
||||
|
||||
VideoSendStream::Config send_config = sender_call->GetDefaultSendConfig();
|
||||
VideoSendStream::Config send_config;
|
||||
send_config.rtp.ssrcs.push_back(ssrc);
|
||||
send_config.encoder_settings.encoder = encoders[i].get();
|
||||
send_config.encoder_settings.payload_name = "VP8";
|
||||
@ -933,8 +933,7 @@ TEST_F(EndToEndTest, SendsAndReceivesMultipleStreams) {
|
||||
sender_call->CreateVideoSendStream(send_config, video_streams, NULL);
|
||||
send_streams[i]->Start();
|
||||
|
||||
VideoReceiveStream::Config receive_config =
|
||||
receiver_call->GetDefaultReceiveConfig();
|
||||
VideoReceiveStream::Config receive_config;
|
||||
receive_config.renderer = observers[i];
|
||||
receive_config.rtp.remote_ssrc = ssrc;
|
||||
receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
|
||||
|
@ -71,7 +71,7 @@ void Loopback() {
|
||||
// Loopback, call sends to itself.
|
||||
transport.SetReceiver(call->Receiver());
|
||||
|
||||
VideoSendStream::Config send_config = call->GetDefaultSendConfig();
|
||||
VideoSendStream::Config send_config;
|
||||
send_config.rtp.ssrcs.push_back(kSendSsrc);
|
||||
|
||||
send_config.local_renderer = local_preview.get();
|
||||
@ -108,7 +108,7 @@ void Loopback() {
|
||||
flags::Fps(),
|
||||
test_clock));
|
||||
|
||||
VideoReceiveStream::Config receive_config = call->GetDefaultReceiveConfig();
|
||||
VideoReceiveStream::Config receive_config;
|
||||
receive_config.rtp.remote_ssrc = send_config.rtp.ssrcs[0];
|
||||
receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
|
||||
receive_config.renderer = loopback_video.get();
|
||||
|
@ -90,7 +90,7 @@ class VideoReceiveStream {
|
||||
: remote_ssrc(0),
|
||||
local_ssrc(0),
|
||||
rtcp_mode(newapi::kRtcpReducedSize),
|
||||
remb(false) {}
|
||||
remb(true) {}
|
||||
|
||||
// Synchronization source (stream identifier) to be received.
|
||||
uint32_t remote_ssrc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user