Skip to content

Commit

Permalink
Remove more unused tsan suppressions and fix call test passing the sa…
Browse files Browse the repository at this point in the history
…me decoder to multiple received streams.

R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12949004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6651 4adac7df-926f-26a2-2b94-8c16560cd09d
  • Loading branch information
andresp@webrtc.org committed Jul 10, 2014
1 parent 91f1752 commit 7ae9108
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
14 changes: 0 additions & 14 deletions webrtc/build/tsan_suppressions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,6 @@ char kTSanDefaultSuppressions[] =
"deadlock:webrtc::ViEEncoder::OnLocalSsrcChanged\n"
"deadlock:webrtc::ViESender::RegisterSendTransport\n"

// From Chromium's tsan_suppressions.cc file.

// http://crbug.com/244774
"race:webrtc::RTPReceiver::ProcessBitrate\n"
"race:webrtc::RTPSender::ProcessBitrate\n"
"race:webrtc::VideoCodingModuleImpl::Decode\n"
"race:webrtc::RTPSender::SendOutgoingData\n"
"race:webrtc::VP8EncoderImpl::GetEncodedPartitions\n"
"race:webrtc::VP8EncoderImpl::Encode\n"
"race:webrtc::ViEEncoder::DeliverFrame\n"
"race:webrtc::vcm::VideoReceiver::Decode\n"
"race:webrtc::VCMReceiver::FrameForDecoding\n"
"race:*trace_event_unique_catstatic*\n"

// End of suppressions.
; // Please keep this semicolon.

Expand Down
16 changes: 11 additions & 5 deletions webrtc/test/call_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,23 @@ void CallTest::CreateSendConfig(size_t num_streams) {
void CallTest::CreateMatchingReceiveConfigs() {
assert(!send_config_.rtp.ssrcs.empty());
assert(receive_configs_.empty());
assert(fake_decoders_.empty());
VideoReceiveStream::Config config;
VideoCodec codec =
test::CreateDecoderVideoCodec(send_config_.encoder_settings);
config.codecs.push_back(codec);
config.rtp.local_ssrc = kReceiverLocalSsrc;
if (send_config_.encoder_settings.encoder == &fake_encoder_) {
ExternalVideoDecoder decoder;
decoder.decoder = &fake_decoder_;
decoder.payload_type = send_config_.encoder_settings.payload_type;
config.external_decoders.push_back(decoder);
config.external_decoders.resize(1);
config.external_decoders[0].payload_type =
send_config_.encoder_settings.payload_type;
}
config.rtp.local_ssrc = kReceiverLocalSsrc;
for (size_t i = 0; i < send_config_.rtp.ssrcs.size(); ++i) {
if (send_config_.encoder_settings.encoder == &fake_encoder_) {
FakeDecoder* decoder = new FakeDecoder();
fake_decoders_.push_back(decoder);
config.external_decoders[0].decoder = decoder;
}
config.rtp.remote_ssrc = send_config_.rtp.ssrcs[i];
receive_configs_.push_back(config);
}
Expand Down Expand Up @@ -146,6 +151,7 @@ void CallTest::DestroyStreams() {
for (size_t i = 0; i < receive_streams_.size(); ++i)
receiver_call_->DestroyVideoReceiveStream(receive_streams_[i]);
receive_streams_.clear();
fake_decoders_.clear();
}

const unsigned int CallTest::kDefaultTimeoutMs = 30 * 1000;
Expand Down
3 changes: 2 additions & 1 deletion webrtc/test/call_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <vector>

#include "webrtc/call.h"
#include "webrtc/system_wrappers/interface/scoped_vector.h"
#include "webrtc/test/fake_decoder.h"
#include "webrtc/test/fake_encoder.h"
#include "webrtc/test/frame_generator_capturer.h"
Expand Down Expand Up @@ -72,7 +73,7 @@ class CallTest : public ::testing::Test {

scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_;
test::FakeEncoder fake_encoder_;
test::FakeDecoder fake_decoder_;
ScopedVector<test::FakeDecoder> fake_decoders_;
};

class BaseTest : public RtpRtcpObserver {
Expand Down

0 comments on commit 7ae9108

Please sign in to comment.