Signal threads for faster receiver destruction.

Unblocks pending threads (render thread + decoder thread) when
destroying renderers and shutting down decoders.

Speeds up SetLocalDescription significantly (10x or so) under
WebRtcVideoEngine2 but also shutdown times in ~ViEChannel and
~ViEReceiver in general.

BUG=1788
R=mflodman@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8387}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8387 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2015-02-17 13:22:43 +00:00
parent 0a7d4eed98
commit 4dd40d6b88
8 changed files with 36 additions and 12 deletions

View File

@ -54,7 +54,6 @@ void VCMReceiver::Reset() {
int32_t VCMReceiver::Initialize() {
Reset();
CriticalSectionScoped cs(crit_sect_);
return VCM_OK;
}
@ -86,6 +85,11 @@ int32_t VCMReceiver::InsertPacket(const VCMPacket& packet,
return VCM_OK;
}
void VCMReceiver::TriggerDecoderShutdown() {
jitter_buffer_.Stop();
render_wait_event_->Set();
}
VCMEncodedFrame* VCMReceiver::FrameForDecoding(uint16_t max_wait_time_ms,
int64_t& next_render_time_ms,
bool render_timing) {