Allow to turn RtcpTransciever on and off at runtime.

Bug: webrtc:8239
Change-Id: I8678d1ee9cd0da194a1243d40b508bb62cb3f257
Reviewed-on: https://webrtc-review.googlesource.com/60180
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22311}
This commit is contained in:
Danil Chapovalov
2018-03-06 14:33:20 +01:00
committed by Commit Bot
parent 70473fcac4
commit e3927c5885
6 changed files with 110 additions and 2 deletions

View File

@ -73,6 +73,14 @@ void RtcpTransceiver::RemoveMediaReceiverRtcpObserver(
task_queue_->PostTaskAndReply(std::move(remove), std::move(on_removed));
}
void RtcpTransceiver::SetReadyToSend(bool ready) {
rtc::WeakPtr<RtcpTransceiverImpl> ptr = ptr_;
task_queue_->PostTask([ptr, ready] {
if (ptr)
ptr->SetReadyToSend(ready);
});
}
void RtcpTransceiver::ReceivePacket(rtc::CopyOnWriteBuffer packet) {
rtc::WeakPtr<RtcpTransceiverImpl> ptr = ptr_;
int64_t now_us = rtc::TimeMicros();