Simpliy RtcpTransceiver::SendImmediateFeedback signature
and add implementation comment
Bug: webrtc:8239
Change-Id: Id24937018d386e386b8241aca8f5d686e7cc527a
Reviewed-on: https://webrtc-review.googlesource.com/26600
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20925}
diff --git a/modules/rtp_rtcp/source/rtcp_transceiver.cc b/modules/rtp_rtcp/source/rtcp_transceiver.cc
index c0b829c..a5dd8dc 100644
--- a/modules/rtp_rtcp/source/rtcp_transceiver.cc
+++ b/modules/rtp_rtcp/source/rtcp_transceiver.cc
@@ -106,18 +106,12 @@
task_queue_->PostTask(Closure{ptr_, ssrc, std::move(sequence_numbers)});
}
-void RtcpTransceiver::SendPictureLossIndication(std::vector<uint32_t> ssrcs) {
- // TODO(danilchap): Replace with lambda with move capture when available.
- struct Closure {
- void operator()() {
- if (ptr)
- ptr->SendPictureLossIndication(ssrcs);
- }
-
- rtc::WeakPtr<RtcpTransceiverImpl> ptr;
- std::vector<uint32_t> ssrcs;
- };
- task_queue_->PostTask(Closure{ptr_, std::move(ssrcs)});
+void RtcpTransceiver::SendPictureLossIndication(uint32_t ssrc) {
+ rtc::WeakPtr<RtcpTransceiverImpl> ptr = ptr_;
+ task_queue_->PostTask([ptr, ssrc] {
+ if (ptr)
+ ptr->SendPictureLossIndication(ssrc);
+ });
}
void RtcpTransceiver::SendFullIntraRequest(std::vector<uint32_t> ssrcs) {