Allow RTP module thread checking to know PacketRouter status.

Since https://webrtc-review.googlesource.com/c/src/+/228433 both audio
and video now only call Get/SetRtpState while not registered to the
packet router.

We can thus remove the lock around packet sequencer and just use a
thread checker.

Bug: webrtc:11340
Change-Id: Ie6865cc96c36208700c31a75747ff4dd992ce68d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228435
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34755}
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_interface.h b/modules/rtp_rtcp/source/rtp_rtcp_interface.h
index e90d866..c1a44fa 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_interface.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_interface.h
@@ -347,6 +347,15 @@
   // when we expect to send them).
   virtual size_t ExpectedPerPacketOverhead() const = 0;
 
+  // Access to packet state (e.g. sequence numbering) must only be access by
+  // one thread at a time. It may be only one thread, or a construction thread
+  // that calls SetRtpState() - handing over to a pacer thread that calls
+  // TrySendPacket() - and at teardown ownership is handed to a destruciton
+  // thread that calls GetRtpState().
+  // This method is used to signal that "ownership" of the rtp state is being
+  // transferred to another thread.
+  virtual void OnPacketSendingThreadSwitched() = 0;
+
   // **************************************************************************
   // RTCP
   // **************************************************************************