Add sending Nack to RtcpTransceiver

Bug: webrtc:8239
Change-Id: Idf27bb05958d9eceaf601078019f05444232581f
Reviewed-on: https://webrtc-review.googlesource.com/26260
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20907}
diff --git a/modules/rtp_rtcp/source/rtcp_transceiver.cc b/modules/rtp_rtcp/source/rtcp_transceiver.cc
index 7feca3f..c0b829c 100644
--- a/modules/rtp_rtcp/source/rtcp_transceiver.cc
+++ b/modules/rtp_rtcp/source/rtcp_transceiver.cc
@@ -90,6 +90,22 @@
   });
 }
 
+void RtcpTransceiver::SendNack(uint32_t ssrc,
+                               std::vector<uint16_t> sequence_numbers) {
+  // TODO(danilchap): Replace with lambda with move capture when available.
+  struct Closure {
+    void operator()() {
+      if (ptr)
+        ptr->SendNack(ssrc, std::move(sequence_numbers));
+    }
+
+    rtc::WeakPtr<RtcpTransceiverImpl> ptr;
+    uint32_t ssrc;
+    std::vector<uint16_t> sequence_numbers;
+  };
+  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 {