xref: /aosp_15_r20/external/webrtc/pc/rtp_transmission_manager.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1*d9f75844SAndroid Build Coastguard Worker /*
2*d9f75844SAndroid Build Coastguard Worker  *  Copyright 2020 The WebRTC project authors. All Rights Reserved.
3*d9f75844SAndroid Build Coastguard Worker  *
4*d9f75844SAndroid Build Coastguard Worker  *  Use of this source code is governed by a BSD-style license
5*d9f75844SAndroid Build Coastguard Worker  *  that can be found in the LICENSE file in the root of the source
6*d9f75844SAndroid Build Coastguard Worker  *  tree. An additional intellectual property rights grant can be found
7*d9f75844SAndroid Build Coastguard Worker  *  in the file PATENTS.  All contributing project authors may
8*d9f75844SAndroid Build Coastguard Worker  *  be found in the AUTHORS file in the root of the source tree.
9*d9f75844SAndroid Build Coastguard Worker  */
10*d9f75844SAndroid Build Coastguard Worker 
11*d9f75844SAndroid Build Coastguard Worker #ifndef PC_RTP_TRANSMISSION_MANAGER_H_
12*d9f75844SAndroid Build Coastguard Worker #define PC_RTP_TRANSMISSION_MANAGER_H_
13*d9f75844SAndroid Build Coastguard Worker 
14*d9f75844SAndroid Build Coastguard Worker #include <stdint.h>
15*d9f75844SAndroid Build Coastguard Worker 
16*d9f75844SAndroid Build Coastguard Worker #include <functional>
17*d9f75844SAndroid Build Coastguard Worker #include <string>
18*d9f75844SAndroid Build Coastguard Worker #include <vector>
19*d9f75844SAndroid Build Coastguard Worker 
20*d9f75844SAndroid Build Coastguard Worker #include "api/media_stream_interface.h"
21*d9f75844SAndroid Build Coastguard Worker #include "api/media_types.h"
22*d9f75844SAndroid Build Coastguard Worker #include "api/peer_connection_interface.h"
23*d9f75844SAndroid Build Coastguard Worker #include "api/rtc_error.h"
24*d9f75844SAndroid Build Coastguard Worker #include "api/rtp_parameters.h"
25*d9f75844SAndroid Build Coastguard Worker #include "api/rtp_receiver_interface.h"
26*d9f75844SAndroid Build Coastguard Worker #include "api/rtp_sender_interface.h"
27*d9f75844SAndroid Build Coastguard Worker #include "api/scoped_refptr.h"
28*d9f75844SAndroid Build Coastguard Worker #include "api/sequence_checker.h"
29*d9f75844SAndroid Build Coastguard Worker #include "media/base/media_channel.h"
30*d9f75844SAndroid Build Coastguard Worker #include "pc/legacy_stats_collector_interface.h"
31*d9f75844SAndroid Build Coastguard Worker #include "pc/rtp_receiver.h"
32*d9f75844SAndroid Build Coastguard Worker #include "pc/rtp_receiver_proxy.h"
33*d9f75844SAndroid Build Coastguard Worker #include "pc/rtp_sender.h"
34*d9f75844SAndroid Build Coastguard Worker #include "pc/rtp_sender_proxy.h"
35*d9f75844SAndroid Build Coastguard Worker #include "pc/rtp_transceiver.h"
36*d9f75844SAndroid Build Coastguard Worker #include "pc/transceiver_list.h"
37*d9f75844SAndroid Build Coastguard Worker #include "pc/usage_pattern.h"
38*d9f75844SAndroid Build Coastguard Worker #include "rtc_base/third_party/sigslot/sigslot.h"
39*d9f75844SAndroid Build Coastguard Worker #include "rtc_base/thread.h"
40*d9f75844SAndroid Build Coastguard Worker #include "rtc_base/thread_annotations.h"
41*d9f75844SAndroid Build Coastguard Worker #include "rtc_base/weak_ptr.h"
42*d9f75844SAndroid Build Coastguard Worker 
43*d9f75844SAndroid Build Coastguard Worker namespace rtc {
44*d9f75844SAndroid Build Coastguard Worker class Thread;
45*d9f75844SAndroid Build Coastguard Worker }
46*d9f75844SAndroid Build Coastguard Worker 
47*d9f75844SAndroid Build Coastguard Worker namespace webrtc {
48*d9f75844SAndroid Build Coastguard Worker 
49*d9f75844SAndroid Build Coastguard Worker // This class contains information about
50*d9f75844SAndroid Build Coastguard Worker // an RTPSender, used for things like looking it up by SSRC.
51*d9f75844SAndroid Build Coastguard Worker struct RtpSenderInfo {
RtpSenderInfoRtpSenderInfo52*d9f75844SAndroid Build Coastguard Worker   RtpSenderInfo() : first_ssrc(0) {}
RtpSenderInfoRtpSenderInfo53*d9f75844SAndroid Build Coastguard Worker   RtpSenderInfo(const std::string& stream_id,
54*d9f75844SAndroid Build Coastguard Worker                 const std::string& sender_id,
55*d9f75844SAndroid Build Coastguard Worker                 uint32_t ssrc)
56*d9f75844SAndroid Build Coastguard Worker       : stream_id(stream_id), sender_id(sender_id), first_ssrc(ssrc) {}
57*d9f75844SAndroid Build Coastguard Worker   bool operator==(const RtpSenderInfo& other) {
58*d9f75844SAndroid Build Coastguard Worker     return this->stream_id == other.stream_id &&
59*d9f75844SAndroid Build Coastguard Worker            this->sender_id == other.sender_id &&
60*d9f75844SAndroid Build Coastguard Worker            this->first_ssrc == other.first_ssrc;
61*d9f75844SAndroid Build Coastguard Worker   }
62*d9f75844SAndroid Build Coastguard Worker   std::string stream_id;
63*d9f75844SAndroid Build Coastguard Worker   std::string sender_id;
64*d9f75844SAndroid Build Coastguard Worker   // An RtpSender can have many SSRCs. The first one is used as a sort of ID
65*d9f75844SAndroid Build Coastguard Worker   // for communicating with the lower layers.
66*d9f75844SAndroid Build Coastguard Worker   uint32_t first_ssrc;
67*d9f75844SAndroid Build Coastguard Worker };
68*d9f75844SAndroid Build Coastguard Worker 
69*d9f75844SAndroid Build Coastguard Worker // The RtpTransmissionManager class is responsible for managing the lifetime
70*d9f75844SAndroid Build Coastguard Worker // and relationships between objects of type RtpSender, RtpReceiver and
71*d9f75844SAndroid Build Coastguard Worker // RtpTransceiver.
72*d9f75844SAndroid Build Coastguard Worker class RtpTransmissionManager : public RtpSenderBase::SetStreamsObserver {
73*d9f75844SAndroid Build Coastguard Worker  public:
74*d9f75844SAndroid Build Coastguard Worker   RtpTransmissionManager(bool is_unified_plan,
75*d9f75844SAndroid Build Coastguard Worker                          ConnectionContext* context,
76*d9f75844SAndroid Build Coastguard Worker                          UsagePattern* usage_pattern,
77*d9f75844SAndroid Build Coastguard Worker                          PeerConnectionObserver* observer,
78*d9f75844SAndroid Build Coastguard Worker                          LegacyStatsCollectorInterface* legacy_stats,
79*d9f75844SAndroid Build Coastguard Worker                          std::function<void()> on_negotiation_needed);
80*d9f75844SAndroid Build Coastguard Worker 
81*d9f75844SAndroid Build Coastguard Worker   // No move or copy permitted.
82*d9f75844SAndroid Build Coastguard Worker   RtpTransmissionManager(const RtpTransmissionManager&) = delete;
83*d9f75844SAndroid Build Coastguard Worker   RtpTransmissionManager& operator=(const RtpTransmissionManager&) = delete;
84*d9f75844SAndroid Build Coastguard Worker 
85*d9f75844SAndroid Build Coastguard Worker   // Stop activity. In particular, don't call observer_ any more.
86*d9f75844SAndroid Build Coastguard Worker   void Close();
87*d9f75844SAndroid Build Coastguard Worker 
88*d9f75844SAndroid Build Coastguard Worker   // RtpSenderBase::SetStreamsObserver override.
89*d9f75844SAndroid Build Coastguard Worker   void OnSetStreams() override;
90*d9f75844SAndroid Build Coastguard Worker 
91*d9f75844SAndroid Build Coastguard Worker   // Add a new track, creating transceiver if required.
92*d9f75844SAndroid Build Coastguard Worker   RTCErrorOr<rtc::scoped_refptr<RtpSenderInterface>> AddTrack(
93*d9f75844SAndroid Build Coastguard Worker       rtc::scoped_refptr<MediaStreamTrackInterface> track,
94*d9f75844SAndroid Build Coastguard Worker       const std::vector<std::string>& stream_ids,
95*d9f75844SAndroid Build Coastguard Worker       const std::vector<RtpEncodingParameters>* init_send_encodings);
96*d9f75844SAndroid Build Coastguard Worker 
97*d9f75844SAndroid Build Coastguard Worker   // Create a new RTP sender. Does not associate with a transceiver.
98*d9f75844SAndroid Build Coastguard Worker   rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>
99*d9f75844SAndroid Build Coastguard Worker   CreateSender(cricket::MediaType media_type,
100*d9f75844SAndroid Build Coastguard Worker                const std::string& id,
101*d9f75844SAndroid Build Coastguard Worker                rtc::scoped_refptr<MediaStreamTrackInterface> track,
102*d9f75844SAndroid Build Coastguard Worker                const std::vector<std::string>& stream_ids,
103*d9f75844SAndroid Build Coastguard Worker                const std::vector<RtpEncodingParameters>& send_encodings);
104*d9f75844SAndroid Build Coastguard Worker 
105*d9f75844SAndroid Build Coastguard Worker   // Create a new RTP receiver. Does not associate with a transceiver.
106*d9f75844SAndroid Build Coastguard Worker   rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>
107*d9f75844SAndroid Build Coastguard Worker   CreateReceiver(cricket::MediaType media_type, const std::string& receiver_id);
108*d9f75844SAndroid Build Coastguard Worker 
109*d9f75844SAndroid Build Coastguard Worker   // Create a new RtpTransceiver of the given type and add it to the list of
110*d9f75844SAndroid Build Coastguard Worker   // registered transceivers.
111*d9f75844SAndroid Build Coastguard Worker   rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
112*d9f75844SAndroid Build Coastguard Worker   CreateAndAddTransceiver(
113*d9f75844SAndroid Build Coastguard Worker       rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>> sender,
114*d9f75844SAndroid Build Coastguard Worker       rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>
115*d9f75844SAndroid Build Coastguard Worker           receiver);
116*d9f75844SAndroid Build Coastguard Worker 
117*d9f75844SAndroid Build Coastguard Worker   // Returns the first RtpTransceiver suitable for a newly added track, if such
118*d9f75844SAndroid Build Coastguard Worker   // transceiver is available.
119*d9f75844SAndroid Build Coastguard Worker   rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
120*d9f75844SAndroid Build Coastguard Worker   FindFirstTransceiverForAddedTrack(
121*d9f75844SAndroid Build Coastguard Worker       rtc::scoped_refptr<MediaStreamTrackInterface> track,
122*d9f75844SAndroid Build Coastguard Worker       const std::vector<RtpEncodingParameters>* init_send_encodings);
123*d9f75844SAndroid Build Coastguard Worker 
124*d9f75844SAndroid Build Coastguard Worker   // Returns the list of senders currently associated with some
125*d9f75844SAndroid Build Coastguard Worker   // registered transceiver
126*d9f75844SAndroid Build Coastguard Worker   std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>>
127*d9f75844SAndroid Build Coastguard Worker   GetSendersInternal() const;
128*d9f75844SAndroid Build Coastguard Worker 
129*d9f75844SAndroid Build Coastguard Worker   // Returns the list of receivers currently associated with a transceiver
130*d9f75844SAndroid Build Coastguard Worker   std::vector<
131*d9f75844SAndroid Build Coastguard Worker       rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>>
132*d9f75844SAndroid Build Coastguard Worker   GetReceiversInternal() const;
133*d9f75844SAndroid Build Coastguard Worker 
134*d9f75844SAndroid Build Coastguard Worker   // Plan B: Get the transceiver containing all audio senders and receivers
135*d9f75844SAndroid Build Coastguard Worker   rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
136*d9f75844SAndroid Build Coastguard Worker   GetAudioTransceiver() const;
137*d9f75844SAndroid Build Coastguard Worker   // Plan B: Get the transceiver containing all video senders and receivers
138*d9f75844SAndroid Build Coastguard Worker   rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
139*d9f75844SAndroid Build Coastguard Worker   GetVideoTransceiver() const;
140*d9f75844SAndroid Build Coastguard Worker 
141*d9f75844SAndroid Build Coastguard Worker   // Add an audio track, reusing or creating the sender.
142*d9f75844SAndroid Build Coastguard Worker   void AddAudioTrack(AudioTrackInterface* track, MediaStreamInterface* stream);
143*d9f75844SAndroid Build Coastguard Worker   // Plan B: Remove an audio track, removing the sender.
144*d9f75844SAndroid Build Coastguard Worker   void RemoveAudioTrack(AudioTrackInterface* track,
145*d9f75844SAndroid Build Coastguard Worker                         MediaStreamInterface* stream);
146*d9f75844SAndroid Build Coastguard Worker   // Add a video track, reusing or creating the sender.
147*d9f75844SAndroid Build Coastguard Worker   void AddVideoTrack(VideoTrackInterface* track, MediaStreamInterface* stream);
148*d9f75844SAndroid Build Coastguard Worker   // Plan B: Remove a video track, removing the sender.
149*d9f75844SAndroid Build Coastguard Worker   void RemoveVideoTrack(VideoTrackInterface* track,
150*d9f75844SAndroid Build Coastguard Worker                         MediaStreamInterface* stream);
151*d9f75844SAndroid Build Coastguard Worker 
152*d9f75844SAndroid Build Coastguard Worker   // Triggered when a remote sender has been seen for the first time in a remote
153*d9f75844SAndroid Build Coastguard Worker   // session description. It creates a remote MediaStreamTrackInterface
154*d9f75844SAndroid Build Coastguard Worker   // implementation and triggers CreateAudioReceiver or CreateVideoReceiver.
155*d9f75844SAndroid Build Coastguard Worker   void OnRemoteSenderAdded(const RtpSenderInfo& sender_info,
156*d9f75844SAndroid Build Coastguard Worker                            MediaStreamInterface* stream,
157*d9f75844SAndroid Build Coastguard Worker                            cricket::MediaType media_type);
158*d9f75844SAndroid Build Coastguard Worker 
159*d9f75844SAndroid Build Coastguard Worker   // Triggered when a remote sender has been removed from a remote session
160*d9f75844SAndroid Build Coastguard Worker   // description. It removes the remote sender with id `sender_id` from a remote
161*d9f75844SAndroid Build Coastguard Worker   // MediaStream and triggers DestroyAudioReceiver or DestroyVideoReceiver.
162*d9f75844SAndroid Build Coastguard Worker   void OnRemoteSenderRemoved(const RtpSenderInfo& sender_info,
163*d9f75844SAndroid Build Coastguard Worker                              MediaStreamInterface* stream,
164*d9f75844SAndroid Build Coastguard Worker                              cricket::MediaType media_type);
165*d9f75844SAndroid Build Coastguard Worker 
166*d9f75844SAndroid Build Coastguard Worker   // Triggered when a local sender has been seen for the first time in a local
167*d9f75844SAndroid Build Coastguard Worker   // session description.
168*d9f75844SAndroid Build Coastguard Worker   // This method triggers CreateAudioSender or CreateVideoSender if the rtp
169*d9f75844SAndroid Build Coastguard Worker   // streams in the local SessionDescription can be mapped to a MediaStreamTrack
170*d9f75844SAndroid Build Coastguard Worker   // in a MediaStream in `local_streams_`
171*d9f75844SAndroid Build Coastguard Worker   void OnLocalSenderAdded(const RtpSenderInfo& sender_info,
172*d9f75844SAndroid Build Coastguard Worker                           cricket::MediaType media_type);
173*d9f75844SAndroid Build Coastguard Worker 
174*d9f75844SAndroid Build Coastguard Worker   // Triggered when a local sender has been removed from a local session
175*d9f75844SAndroid Build Coastguard Worker   // description.
176*d9f75844SAndroid Build Coastguard Worker   // This method triggers DestroyAudioSender or DestroyVideoSender if a stream
177*d9f75844SAndroid Build Coastguard Worker   // has been removed from the local SessionDescription and the stream can be
178*d9f75844SAndroid Build Coastguard Worker   // mapped to a MediaStreamTrack in a MediaStream in `local_streams_`.
179*d9f75844SAndroid Build Coastguard Worker   void OnLocalSenderRemoved(const RtpSenderInfo& sender_info,
180*d9f75844SAndroid Build Coastguard Worker                             cricket::MediaType media_type);
181*d9f75844SAndroid Build Coastguard Worker 
182*d9f75844SAndroid Build Coastguard Worker   std::vector<RtpSenderInfo>* GetRemoteSenderInfos(
183*d9f75844SAndroid Build Coastguard Worker       cricket::MediaType media_type);
184*d9f75844SAndroid Build Coastguard Worker   std::vector<RtpSenderInfo>* GetLocalSenderInfos(
185*d9f75844SAndroid Build Coastguard Worker       cricket::MediaType media_type);
186*d9f75844SAndroid Build Coastguard Worker   const RtpSenderInfo* FindSenderInfo(const std::vector<RtpSenderInfo>& infos,
187*d9f75844SAndroid Build Coastguard Worker                                       const std::string& stream_id,
188*d9f75844SAndroid Build Coastguard Worker                                       const std::string& sender_id) const;
189*d9f75844SAndroid Build Coastguard Worker 
190*d9f75844SAndroid Build Coastguard Worker   // Return the RtpSender with the given track attached.
191*d9f75844SAndroid Build Coastguard Worker   rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>
192*d9f75844SAndroid Build Coastguard Worker   FindSenderForTrack(MediaStreamTrackInterface* track) const;
193*d9f75844SAndroid Build Coastguard Worker 
194*d9f75844SAndroid Build Coastguard Worker   // Return the RtpSender with the given id, or null if none exists.
195*d9f75844SAndroid Build Coastguard Worker   rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>
196*d9f75844SAndroid Build Coastguard Worker   FindSenderById(const std::string& sender_id) const;
197*d9f75844SAndroid Build Coastguard Worker 
198*d9f75844SAndroid Build Coastguard Worker   // Return the RtpReceiver with the given id, or null if none exists.
199*d9f75844SAndroid Build Coastguard Worker   rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>
200*d9f75844SAndroid Build Coastguard Worker   FindReceiverById(const std::string& receiver_id) const;
201*d9f75844SAndroid Build Coastguard Worker 
transceivers()202*d9f75844SAndroid Build Coastguard Worker   TransceiverList* transceivers() { return &transceivers_; }
transceivers()203*d9f75844SAndroid Build Coastguard Worker   const TransceiverList* transceivers() const { return &transceivers_; }
204*d9f75844SAndroid Build Coastguard Worker 
205*d9f75844SAndroid Build Coastguard Worker   // Plan B helpers for getting the voice/video media channels for the single
206*d9f75844SAndroid Build Coastguard Worker   // audio/video transceiver, if it exists.
207*d9f75844SAndroid Build Coastguard Worker   cricket::VoiceMediaChannel* voice_media_channel() const;
208*d9f75844SAndroid Build Coastguard Worker   cricket::VideoMediaChannel* video_media_channel() const;
209*d9f75844SAndroid Build Coastguard Worker 
210*d9f75844SAndroid Build Coastguard Worker  private:
signaling_thread()211*d9f75844SAndroid Build Coastguard Worker   rtc::Thread* signaling_thread() const { return context_->signaling_thread(); }
worker_thread()212*d9f75844SAndroid Build Coastguard Worker   rtc::Thread* worker_thread() const { return context_->worker_thread(); }
IsUnifiedPlan()213*d9f75844SAndroid Build Coastguard Worker   bool IsUnifiedPlan() const { return is_unified_plan_; }
NoteUsageEvent(UsageEvent event)214*d9f75844SAndroid Build Coastguard Worker   void NoteUsageEvent(UsageEvent event) {
215*d9f75844SAndroid Build Coastguard Worker     usage_pattern_->NoteUsageEvent(event);
216*d9f75844SAndroid Build Coastguard Worker   }
217*d9f75844SAndroid Build Coastguard Worker 
218*d9f75844SAndroid Build Coastguard Worker   // AddTrack implementation when Unified Plan is specified.
219*d9f75844SAndroid Build Coastguard Worker   RTCErrorOr<rtc::scoped_refptr<RtpSenderInterface>> AddTrackUnifiedPlan(
220*d9f75844SAndroid Build Coastguard Worker       rtc::scoped_refptr<MediaStreamTrackInterface> track,
221*d9f75844SAndroid Build Coastguard Worker       const std::vector<std::string>& stream_ids,
222*d9f75844SAndroid Build Coastguard Worker       const std::vector<RtpEncodingParameters>* init_send_encodings);
223*d9f75844SAndroid Build Coastguard Worker   // AddTrack implementation when Plan B is specified.
224*d9f75844SAndroid Build Coastguard Worker   RTCErrorOr<rtc::scoped_refptr<RtpSenderInterface>> AddTrackPlanB(
225*d9f75844SAndroid Build Coastguard Worker       rtc::scoped_refptr<MediaStreamTrackInterface> track,
226*d9f75844SAndroid Build Coastguard Worker       const std::vector<std::string>& stream_ids,
227*d9f75844SAndroid Build Coastguard Worker       const std::vector<RtpEncodingParameters>* init_send_encodings);
228*d9f75844SAndroid Build Coastguard Worker 
229*d9f75844SAndroid Build Coastguard Worker   // Create an RtpReceiver that sources an audio track.
230*d9f75844SAndroid Build Coastguard Worker   void CreateAudioReceiver(MediaStreamInterface* stream,
231*d9f75844SAndroid Build Coastguard Worker                            const RtpSenderInfo& remote_sender_info)
232*d9f75844SAndroid Build Coastguard Worker       RTC_RUN_ON(signaling_thread());
233*d9f75844SAndroid Build Coastguard Worker 
234*d9f75844SAndroid Build Coastguard Worker   // Create an RtpReceiver that sources a video track.
235*d9f75844SAndroid Build Coastguard Worker   void CreateVideoReceiver(MediaStreamInterface* stream,
236*d9f75844SAndroid Build Coastguard Worker                            const RtpSenderInfo& remote_sender_info)
237*d9f75844SAndroid Build Coastguard Worker       RTC_RUN_ON(signaling_thread());
238*d9f75844SAndroid Build Coastguard Worker   rtc::scoped_refptr<RtpReceiverInterface> RemoveAndStopReceiver(
239*d9f75844SAndroid Build Coastguard Worker       const RtpSenderInfo& remote_sender_info) RTC_RUN_ON(signaling_thread());
240*d9f75844SAndroid Build Coastguard Worker 
241*d9f75844SAndroid Build Coastguard Worker   PeerConnectionObserver* Observer() const;
242*d9f75844SAndroid Build Coastguard Worker   void OnNegotiationNeeded();
243*d9f75844SAndroid Build Coastguard Worker 
244*d9f75844SAndroid Build Coastguard Worker   cricket::MediaEngineInterface* media_engine() const;
245*d9f75844SAndroid Build Coastguard Worker 
ssrc_generator()246*d9f75844SAndroid Build Coastguard Worker   rtc::UniqueRandomIdGenerator* ssrc_generator() const {
247*d9f75844SAndroid Build Coastguard Worker     return context_->ssrc_generator();
248*d9f75844SAndroid Build Coastguard Worker   }
249*d9f75844SAndroid Build Coastguard Worker 
250*d9f75844SAndroid Build Coastguard Worker   TransceiverList transceivers_;
251*d9f75844SAndroid Build Coastguard Worker 
252*d9f75844SAndroid Build Coastguard Worker   // These lists store sender info seen in local/remote descriptions.
253*d9f75844SAndroid Build Coastguard Worker   std::vector<RtpSenderInfo> remote_audio_sender_infos_
254*d9f75844SAndroid Build Coastguard Worker       RTC_GUARDED_BY(signaling_thread());
255*d9f75844SAndroid Build Coastguard Worker   std::vector<RtpSenderInfo> remote_video_sender_infos_
256*d9f75844SAndroid Build Coastguard Worker       RTC_GUARDED_BY(signaling_thread());
257*d9f75844SAndroid Build Coastguard Worker   std::vector<RtpSenderInfo> local_audio_sender_infos_
258*d9f75844SAndroid Build Coastguard Worker       RTC_GUARDED_BY(signaling_thread());
259*d9f75844SAndroid Build Coastguard Worker   std::vector<RtpSenderInfo> local_video_sender_infos_
260*d9f75844SAndroid Build Coastguard Worker       RTC_GUARDED_BY(signaling_thread());
261*d9f75844SAndroid Build Coastguard Worker 
262*d9f75844SAndroid Build Coastguard Worker   bool closed_ = false;
263*d9f75844SAndroid Build Coastguard Worker   bool const is_unified_plan_;
264*d9f75844SAndroid Build Coastguard Worker   ConnectionContext* context_;
265*d9f75844SAndroid Build Coastguard Worker   UsagePattern* usage_pattern_;
266*d9f75844SAndroid Build Coastguard Worker   PeerConnectionObserver* observer_;
267*d9f75844SAndroid Build Coastguard Worker   LegacyStatsCollectorInterface* const legacy_stats_;
268*d9f75844SAndroid Build Coastguard Worker   std::function<void()> on_negotiation_needed_;
269*d9f75844SAndroid Build Coastguard Worker   rtc::WeakPtrFactory<RtpTransmissionManager> weak_ptr_factory_
270*d9f75844SAndroid Build Coastguard Worker       RTC_GUARDED_BY(signaling_thread());
271*d9f75844SAndroid Build Coastguard Worker };
272*d9f75844SAndroid Build Coastguard Worker 
273*d9f75844SAndroid Build Coastguard Worker }  // namespace webrtc
274*d9f75844SAndroid Build Coastguard Worker 
275*d9f75844SAndroid Build Coastguard Worker #endif  // PC_RTP_TRANSMISSION_MANAGER_H_
276