Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Unified Diff: webrtc/video/vie_encoder_unittest.cc

Issue 2604403003: Make FakeEncoder and FakeH264Encoder thread safe. (Closed)
Patch Set: Rebase. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/video_send_stream_tests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_encoder_unittest.cc
diff --git a/webrtc/video/vie_encoder_unittest.cc b/webrtc/video/vie_encoder_unittest.cc
index c42825d05c5cd8fc7ef52c4d7a5955514c3cfa6a..a50f7aaf9833d4fbeccd95ffb582d27407f9fc83 100644
--- a/webrtc/video/vie_encoder_unittest.cc
+++ b/webrtc/video/vie_encoder_unittest.cc
@@ -186,12 +186,12 @@ class ViEEncoderTest : public ::testing::Test {
continue_encode_event_(false, false) {}
VideoCodec codec_config() {
- rtc::CritScope lock(&crit_);
+ rtc::CritScope lock(&crit_sect_);
return config_;
}
void BlockNextEncode() {
- rtc::CritScope lock(&crit_);
+ rtc::CritScope lock(&local_crit_sect_);
block_next_encode_ = true;
}
@@ -203,7 +203,7 @@ class ViEEncoderTest : public ::testing::Test {
void CheckLastTimeStampsMatch(int64_t ntp_time_ms,
uint32_t timestamp) const {
- rtc::CritScope lock(&crit_);
+ rtc::CritScope lock(&local_crit_sect_);
EXPECT_EQ(timestamp_, timestamp);
EXPECT_EQ(ntp_time_ms_, ntp_time_ms);
}
@@ -214,7 +214,7 @@ class ViEEncoderTest : public ::testing::Test {
const std::vector<FrameType>* frame_types) override {
bool block_encode;
{
- rtc::CritScope lock(&crit_);
+ rtc::CritScope lock(&local_crit_sect_);
EXPECT_GT(input_image.timestamp(), timestamp_);
EXPECT_GT(input_image.ntp_time_ms(), ntp_time_ms_);
EXPECT_EQ(input_image.timestamp(), input_image.ntp_time_ms() * 90);
@@ -233,7 +233,7 @@ class ViEEncoderTest : public ::testing::Test {
return result;
}
- rtc::CriticalSection crit_;
+ rtc::CriticalSection local_crit_sect_;
bool block_next_encode_ = false;
rtc::Event continue_encode_event_;
uint32_t timestamp_ = 0;
« no previous file with comments | « webrtc/video/video_send_stream_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698