Remove EventWrapper::Reset().

This simplifies the event wrapper which we've recently found issues in.
Also refactoring EndToEndTest.RespectsNetworkState to not depend on it.

BUG=
R=stefan@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8366}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8366 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2015-02-13 14:58:18 +00:00
parent 5a7dc39277
commit d5ce2e63df
14 changed files with 79 additions and 102 deletions

View File

@ -214,7 +214,6 @@ void VCMJitterBuffer::Start() {
time_first_packet_ms_ = 0;
// Start in a non-signaled state.
frame_event_->Reset();
waiting_for_completion_.frame_size = 0;
waiting_for_completion_.timestamp = 0;
waiting_for_completion_.latest_packet_time = -1;
@ -258,7 +257,6 @@ void VCMJitterBuffer::Flush() {
decodable_frames_.Reset(&free_frames_);
incomplete_frames_.Reset(&free_frames_);
last_decoded_state_.Reset(); // TODO(mikhal): sync reset.
frame_event_->Reset();
num_consecutive_old_packets_ = 0;
// Also reset the jitter and delay estimates
jitter_estimate_.Reset();
@ -409,10 +407,6 @@ bool VCMJitterBuffer::NextCompleteTimestamp(
break;
}
}
// Inside |crit_sect_|.
} else {
// We already have a frame, reset the event.
frame_event_->Reset();
}
if (decodable_frames_.empty() ||
decodable_frames_.Front()->GetState() != kStateComplete) {