Untangle ViEChannel and ViEEncoder.

Extracts shared members outside the two objects, removing PayloadRouter
from receivers and the VCM for ViEChannel from senders.

Removes Start/StopThreadsAndSetSharedMembers that was used to set the
shared state between them.

Also adding DCHECKs to document what's only used by the
sender/receiver side.

BUG=webrtc:5494
R=stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1654913002 .

Cr-Commit-Position: refs/heads/master@{#11500}
This commit is contained in:
Peter Boström
2016-02-05 11:25:46 +01:00
parent e449915455
commit 1d04ac6f29
13 changed files with 105 additions and 110 deletions

View File

@ -35,7 +35,7 @@ class VCMRobustnessTest : public ::testing::Test {
virtual void SetUp() {
clock_.reset(new SimulatedClock(0));
ASSERT_TRUE(clock_.get() != NULL);
vcm_ = VideoCodingModule::Create(clock_.get(), &event_factory_);
vcm_.reset(VideoCodingModule::Create(clock_.get(), &event_factory_));
ASSERT_TRUE(vcm_ != NULL);
const size_t kMaxNackListSize = 250;
const int kMaxPacketAgeToNack = 450;
@ -47,7 +47,7 @@ class VCMRobustnessTest : public ::testing::Test {
vcm_->RegisterExternalDecoder(&decoder_, video_codec_.plType);
}
virtual void TearDown() { VideoCodingModule::Destroy(vcm_); }
virtual void TearDown() { vcm_.reset(); }
void InsertPacket(uint32_t timestamp,
uint16_t seq_no,
@ -69,7 +69,7 @@ class VCMRobustnessTest : public ::testing::Test {
ASSERT_EQ(VCM_OK, vcm_->IncomingPacket(payload, kPayloadLen, rtp_info));
}
VideoCodingModule* vcm_;
rtc::scoped_ptr<VideoCodingModule> vcm_;
VideoCodec video_codec_;
MockVCMFrameTypeCallback frame_type_callback_;
MockPacketRequestCallback request_callback_;