Revert of WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType (patchset #13 id:260001 of https://codereview.webrtc.org/2686043006/ )

Reason for revert:
Makes perf and Chromium FYI bots unhappy.

Original issue's description:
> WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType
>
> This removes one more place where we were unable to handle codecs not
> in the built-in set.
>
> BUG=webrtc:5805
>
> Review-Url: https://codereview.webrtc.org/2686043006
> Cr-Commit-Position: refs/heads/master@{#17370}
> Committed: 1724cfbdba

TBR=ossu@webrtc.org,solenberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5805

Review-Url: https://codereview.webrtc.org/2772043002
Cr-Commit-Position: refs/heads/master@{#17374}
This commit is contained in:
kwiberg
2017-03-24 05:56:21 -07:00
committed by Commit bot
parent 6d7900de66
commit 670a7f3611
28 changed files with 150 additions and 221 deletions

View File

@ -15,8 +15,6 @@
#include "webrtc/base/byteorder.h"
#include "webrtc/base/timeutils.h"
#include "webrtc/system_wrappers/include/sleep.h"
#include "webrtc/voice_engine/channel_proxy.h"
#include "webrtc/voice_engine/voice_engine_impl.h"
namespace {
static const unsigned int kReflectorSsrc = 0x0000;
@ -64,9 +62,6 @@ ConferenceTransport::ConferenceTransport()
EXPECT_EQ(0, local_base_->Init());
local_sender_ = local_base_->CreateChannel();
static_cast<webrtc::VoiceEngineImpl*>(local_voe_)
->GetChannelProxy(local_sender_)
->RegisterLegacyCodecs();
EXPECT_EQ(0, local_network_->RegisterExternalTransport(local_sender_, *this));
EXPECT_EQ(0, local_rtp_rtcp_->SetLocalSSRC(local_sender_, kLocalSsrc));
EXPECT_EQ(0, local_rtp_rtcp_->
@ -77,9 +72,6 @@ ConferenceTransport::ConferenceTransport()
EXPECT_EQ(0, remote_base_->Init());
reflector_ = remote_base_->CreateChannel();
static_cast<webrtc::VoiceEngineImpl*>(remote_voe_)
->GetChannelProxy(reflector_)
->RegisterLegacyCodecs();
EXPECT_EQ(0, remote_network_->RegisterExternalTransport(reflector_, *this));
EXPECT_EQ(0, remote_rtp_rtcp_->SetLocalSSRC(reflector_, kReflectorSsrc));
@ -230,9 +222,6 @@ void ConferenceTransport::SetRtt(unsigned int rtt_ms) {
unsigned int ConferenceTransport::AddStream(std::string file_name,
webrtc::FileFormats format) {
const int new_sender = remote_base_->CreateChannel();
static_cast<webrtc::VoiceEngineImpl*>(remote_voe_)
->GetChannelProxy(new_sender)
->RegisterLegacyCodecs();
EXPECT_EQ(0, remote_network_->RegisterExternalTransport(new_sender, *this));
const unsigned int remote_ssrc = kFirstRemoteSsrc + stream_count_++;
@ -246,9 +235,6 @@ unsigned int ConferenceTransport::AddStream(std::string file_name,
new_sender, file_name.c_str(), true, false, format, 1.0));
const int new_receiver = local_base_->CreateChannel();
static_cast<webrtc::VoiceEngineImpl*>(local_voe_)
->GetChannelProxy(new_receiver)
->RegisterLegacyCodecs();
EXPECT_EQ(0, local_base_->AssociateSendChannel(new_receiver, local_sender_));
EXPECT_EQ(0, local_network_->RegisterExternalTransport(new_receiver, *this));

View File

@ -16,6 +16,5 @@ AfterStreamingFixture::AfterStreamingFixture()
webrtc::VoiceEngineImpl* voe_impl =
static_cast<webrtc::VoiceEngineImpl*>(voice_engine_);
channel_proxy_ = voe_impl->GetChannelProxy(channel_);
channel_proxy_->RegisterLegacyCodecs();
ResumePlaying();
}

View File

@ -8,9 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/voice_engine/channel_proxy.h"
#include "webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixture.h"
#include "webrtc/voice_engine/voice_engine_impl.h"
class CodecBeforeStreamingTest : public AfterInitializationFixture {
protected:
@ -21,9 +19,6 @@ class CodecBeforeStreamingTest : public AfterInitializationFixture {
codec_instance_.pacsize = 480;
channel_ = voe_base_->CreateChannel();
static_cast<webrtc::VoiceEngineImpl*>(voice_engine_)
->GetChannelProxy(channel_)
->RegisterLegacyCodecs();
}
void TearDown() {