Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: webrtc/pc/channel.h

Issue 2606123002: Remove the dependency of TransportChannel and TransportChannelImpl. (Closed)
Patch Set: Fix the format. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // If |srtp_required| is true, the channel will not send or receive any 79 // If |srtp_required| is true, the channel will not send or receive any
80 // RTP/RTCP packets without using SRTP (either using SDES or DTLS-SRTP). 80 // RTP/RTCP packets without using SRTP (either using SDES or DTLS-SRTP).
81 BaseChannel(rtc::Thread* worker_thread, 81 BaseChannel(rtc::Thread* worker_thread,
82 rtc::Thread* network_thread, 82 rtc::Thread* network_thread,
83 rtc::Thread* signaling_thread, 83 rtc::Thread* signaling_thread,
84 MediaChannel* channel, 84 MediaChannel* channel,
85 const std::string& content_name, 85 const std::string& content_name,
86 bool rtcp_mux_required, 86 bool rtcp_mux_required,
87 bool srtp_required); 87 bool srtp_required);
88 virtual ~BaseChannel(); 88 virtual ~BaseChannel();
89 bool Init_w(TransportChannel* rtp_transport, 89 bool Init_w(DtlsTransportInternal* rtp_dtls_transport,
90 TransportChannel* rtcp_transport); 90 DtlsTransportInternal* rtcp_dtls_transport);
91 // Deinit may be called multiple times and is simply ignored if it's already 91 // Deinit may be called multiple times and is simply ignored if it's already
92 // done. 92 // done.
93 void Deinit(); 93 void Deinit();
94 94
95 rtc::Thread* worker_thread() const { return worker_thread_; } 95 rtc::Thread* worker_thread() const { return worker_thread_; }
96 rtc::Thread* network_thread() const { return network_thread_; } 96 rtc::Thread* network_thread() const { return network_thread_; }
97 const std::string& content_name() const { return content_name_; } 97 const std::string& content_name() const { return content_name_; }
98 const std::string& transport_name() const { return transport_name_; } 98 const std::string& transport_name() const { return transport_name_; }
99 bool enabled() const { return enabled_; } 99 bool enabled() const { return enabled_; }
100 100
101 // This function returns true if we are using SRTP. 101 // This function returns true if we are using SRTP.
102 bool secure() const { return srtp_filter_.IsActive(); } 102 bool secure() const { return srtp_filter_.IsActive(); }
103 // The following function returns true if we are using 103 // The following function returns true if we are using
104 // DTLS-based keying. If you turned off SRTP later, however 104 // DTLS-based keying. If you turned off SRTP later, however
105 // you could have secure() == false and dtls_secure() == true. 105 // you could have secure() == false and dtls_secure() == true.
106 bool secure_dtls() const { return dtls_keyed_; } 106 bool secure_dtls() const { return dtls_keyed_; }
107 107
108 bool writable() const { return writable_; } 108 bool writable() const { return writable_; }
109 109
110 bool SetTransport(TransportChannel* rtp_transport, 110 bool SetTransports(DtlsTransportInternal* rtp_dtls_transport,
111 TransportChannel* rtcp_transport); 111 DtlsTransportInternal* rtcp_dtls_transport);
112 bool PushdownLocalDescription(const SessionDescription* local_desc, 112 bool PushdownLocalDescription(const SessionDescription* local_desc,
113 ContentAction action, 113 ContentAction action,
114 std::string* error_desc); 114 std::string* error_desc);
115 bool PushdownRemoteDescription(const SessionDescription* remote_desc, 115 bool PushdownRemoteDescription(const SessionDescription* remote_desc,
116 ContentAction action, 116 ContentAction action,
117 std::string* error_desc); 117 std::string* error_desc);
118 // Channel control 118 // Channel control
119 bool SetLocalContent(const MediaContentDescription* content, 119 bool SetLocalContent(const MediaContentDescription* content,
120 ContentAction action, 120 ContentAction action,
121 std::string* error_desc); 121 std::string* error_desc);
(...skipping 24 matching lines...) Expand all
146 return remote_streams_; 146 return remote_streams_;
147 } 147 }
148 148
149 sigslot::signal2<BaseChannel*, bool> SignalDtlsSrtpSetupFailure; 149 sigslot::signal2<BaseChannel*, bool> SignalDtlsSrtpSetupFailure;
150 void SignalDtlsSrtpSetupFailure_n(bool rtcp); 150 void SignalDtlsSrtpSetupFailure_n(bool rtcp);
151 void SignalDtlsSrtpSetupFailure_s(bool rtcp); 151 void SignalDtlsSrtpSetupFailure_s(bool rtcp);
152 152
153 // Used for latency measurements. 153 // Used for latency measurements.
154 sigslot::signal1<BaseChannel*> SignalFirstPacketReceived; 154 sigslot::signal1<BaseChannel*> SignalFirstPacketReceived;
155 155
156 // Forward TransportChannel SignalSentPacket to worker thread. 156 // Forward SignalSentPacket to worker thread.
157 sigslot::signal1<const rtc::SentPacket&> SignalSentPacket; 157 sigslot::signal1<const rtc::SentPacket&> SignalSentPacket;
158 158
159 // Emitted whenever rtcp-mux is fully negotiated and the rtcp-transport can 159 // Emitted whenever rtcp-mux is fully negotiated and the rtcp-transport can
160 // be destroyed. 160 // be destroyed.
161 // Fired on the network thread. 161 // Fired on the network thread.
162 sigslot::signal1<const std::string&> SignalRtcpMuxFullyActive; 162 sigslot::signal1<const std::string&> SignalRtcpMuxFullyActive;
163 163
164 TransportChannel* rtp_transport() const { return rtp_transport_; } 164 // Only public for unit tests. Otherwise, consider private.
165 TransportChannel* rtcp_transport() const { return rtcp_transport_; } 165 DtlsTransportInternal* rtp_dtls_transport() const {
166 return rtp_dtls_transport_;
167 }
168 DtlsTransportInternal* rtcp_dtls_transport() const {
169 return rtcp_dtls_transport_;
170 }
166 171
167 bool NeedsRtcpTransport(); 172 bool NeedsRtcpTransport();
168 173
169 // Made public for easier testing. 174 // Made public for easier testing.
170 // 175 //
171 // Updates "ready to send" for an individual channel, and informs the media 176 // Updates "ready to send" for an individual channel, and informs the media
172 // channel that the transport is ready to send if each channel (in use) is 177 // channel that the transport is ready to send if each channel (in use) is
173 // ready to send. This is more specific than just "writable"; it means the 178 // ready to send. This is more specific than just "writable"; it means the
174 // last send didn't return ENOTCONN. 179 // last send didn't return ENOTCONN.
175 // 180 //
(...skipping 11 matching lines...) Expand all
187 virtual cricket::MediaType media_type() = 0; 192 virtual cricket::MediaType media_type() = 0;
188 193
189 bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options); 194 bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options);
190 195
191 // This function returns true if we require SRTP for call setup. 196 // This function returns true if we require SRTP for call setup.
192 bool srtp_required_for_testing() const { return srtp_required_; } 197 bool srtp_required_for_testing() const { return srtp_required_; }
193 198
194 protected: 199 protected:
195 virtual MediaChannel* media_channel() const { return media_channel_; } 200 virtual MediaChannel* media_channel() const { return media_channel_; }
196 201
197 // Sets the |rtp_transport_| (and |rtcp_transport_|, if 202 // Sets the |rtp_dtls_transport_| (and |rtcp_dtls_transport_|, if
198 // |rtcp_enabled_| is true). 203 // |rtcp_enabled_| is true).
199 // This method also updates writability and "ready-to-send" state. 204 // This method also updates writability and "ready-to-send" state.
200 bool SetTransport_n(TransportChannel* rtp_transport, 205 bool SetTransports_n(DtlsTransportInternal* rtp_dtls_transport,
201 TransportChannel* rtcp_transport); 206 DtlsTransportInternal* rtcp_dtls_transport);
202 207
203 // This does not update writability or "ready-to-send" state; it just 208 // This does not update writability or "ready-to-send" state; it just
204 // disconnects from the old channel and connects to the new one. 209 // disconnects from the old channel and connects to the new one.
205 void SetTransportChannel_n(bool rtcp, TransportChannel* new_transport); 210 void SetTransport_n(bool rtcp, DtlsTransportInternal* new_transport);
206 211
207 bool was_ever_writable() const { return was_ever_writable_; } 212 bool was_ever_writable() const { return was_ever_writable_; }
208 void set_local_content_direction(MediaContentDirection direction) { 213 void set_local_content_direction(MediaContentDirection direction) {
209 local_content_direction_ = direction; 214 local_content_direction_ = direction;
210 } 215 }
211 void set_remote_content_direction(MediaContentDirection direction) { 216 void set_remote_content_direction(MediaContentDirection direction) {
212 remote_content_direction_ = direction; 217 remote_content_direction_ = direction;
213 } 218 }
214 // These methods verify that: 219 // These methods verify that:
215 // * The required content description directions have been set. 220 // * The required content description directions have been set.
216 // * The channel is enabled. 221 // * The channel is enabled.
217 // * And for sending: 222 // * And for sending:
218 // - The SRTP filter is active if it's needed. 223 // - The SRTP filter is active if it's needed.
219 // - The transport has been writable before, meaning it should be at least 224 // - The transport has been writable before, meaning it should be at least
220 // possible to succeed in sending a packet. 225 // possible to succeed in sending a packet.
221 // 226 //
222 // When any of these properties change, UpdateMediaSendRecvState_w should be 227 // When any of these properties change, UpdateMediaSendRecvState_w should be
223 // called. 228 // called.
224 bool IsReadyToReceiveMedia_w() const; 229 bool IsReadyToReceiveMedia_w() const;
225 bool IsReadyToSendMedia_w() const; 230 bool IsReadyToSendMedia_w() const;
226 rtc::Thread* signaling_thread() { return signaling_thread_; } 231 rtc::Thread* signaling_thread() { return signaling_thread_; }
227 232
228 void ConnectToTransportChannel(TransportChannel* tc); 233 void ConnectToTransport(DtlsTransportInternal* transport);
229 void DisconnectFromTransportChannel(TransportChannel* tc); 234 void DisconnectFromTransport(DtlsTransportInternal* transport);
230 235
231 void FlushRtcpMessages_n(); 236 void FlushRtcpMessages_n();
232 237
233 // NetworkInterface implementation, called by MediaEngine 238 // NetworkInterface implementation, called by MediaEngine
234 bool SendPacket(rtc::CopyOnWriteBuffer* packet, 239 bool SendPacket(rtc::CopyOnWriteBuffer* packet,
235 const rtc::PacketOptions& options) override; 240 const rtc::PacketOptions& options) override;
236 bool SendRtcp(rtc::CopyOnWriteBuffer* packet, 241 bool SendRtcp(rtc::CopyOnWriteBuffer* packet,
237 const rtc::PacketOptions& options) override; 242 const rtc::PacketOptions& options) override;
238 243
239 // From TransportChannel 244 // From TransportChannel
240 void OnWritableState(rtc::PacketTransportInterface* transport); 245 void OnWritableState(rtc::PacketTransportInterface* transport);
241 virtual void OnPacketRead(rtc::PacketTransportInterface* transport, 246 virtual void OnPacketRead(rtc::PacketTransportInterface* transport,
242 const char* data, 247 const char* data,
243 size_t len, 248 size_t len,
244 const rtc::PacketTime& packet_time, 249 const rtc::PacketTime& packet_time,
245 int flags); 250 int flags);
246 void OnReadyToSend(rtc::PacketTransportInterface* transport); 251 void OnReadyToSend(rtc::PacketTransportInterface* transport);
247 252
248 void OnDtlsState(TransportChannel* channel, DtlsTransportState state); 253 void OnDtlsState(DtlsTransportInternal* transport, DtlsTransportState state);
249 254
250 void OnSelectedCandidatePairChanged( 255 void OnSelectedCandidatePairChanged(
251 TransportChannel* channel, 256 IceTransportInternal* ice_transport,
252 CandidatePairInterface* selected_candidate_pair, 257 CandidatePairInterface* selected_candidate_pair,
253 int last_sent_packet_id, 258 int last_sent_packet_id,
254 bool ready_to_send); 259 bool ready_to_send);
255 260
256 bool PacketIsRtcp(const rtc::PacketTransportInterface* transport, 261 bool PacketIsRtcp(const rtc::PacketTransportInterface* transport,
257 const char* data, 262 const char* data,
258 size_t len); 263 size_t len);
259 bool SendPacket(bool rtcp, 264 bool SendPacket(bool rtcp,
260 rtc::CopyOnWriteBuffer* packet, 265 rtc::CopyOnWriteBuffer* packet,
261 const rtc::PacketOptions& options); 266 const rtc::PacketOptions& options);
(...skipping 15 matching lines...) Expand all
277 void ChannelWritable_n(); 282 void ChannelWritable_n();
278 void ChannelNotWritable_n(); 283 void ChannelNotWritable_n();
279 284
280 bool AddRecvStream_w(const StreamParams& sp); 285 bool AddRecvStream_w(const StreamParams& sp);
281 bool RemoveRecvStream_w(uint32_t ssrc); 286 bool RemoveRecvStream_w(uint32_t ssrc);
282 bool AddSendStream_w(const StreamParams& sp); 287 bool AddSendStream_w(const StreamParams& sp);
283 bool RemoveSendStream_w(uint32_t ssrc); 288 bool RemoveSendStream_w(uint32_t ssrc);
284 bool ShouldSetupDtlsSrtp_n() const; 289 bool ShouldSetupDtlsSrtp_n() const;
285 // Do the DTLS key expansion and impose it on the SRTP/SRTCP filters. 290 // Do the DTLS key expansion and impose it on the SRTP/SRTCP filters.
286 // |rtcp_channel| indicates whether to set up the RTP or RTCP filter. 291 // |rtcp_channel| indicates whether to set up the RTP or RTCP filter.
287 bool SetupDtlsSrtp_n(bool rtcp_channel); 292 bool SetupDtlsSrtp_n(bool rtcp);
288 void MaybeSetupDtlsSrtp_n(); 293 void MaybeSetupDtlsSrtp_n();
289 // Set the DTLS-SRTP cipher policy on this channel as appropriate. 294 // Set the DTLS-SRTP cipher policy on this channel as appropriate.
290 bool SetDtlsSrtpCryptoSuites_n(TransportChannel* tc, bool rtcp); 295 bool SetDtlsSrtpCryptoSuites_n(DtlsTransportInternal* transport, bool rtcp);
291 296
292 // Should be called whenever the conditions for 297 // Should be called whenever the conditions for
293 // IsReadyToReceiveMedia/IsReadyToSendMedia are satisfied (or unsatisfied). 298 // IsReadyToReceiveMedia/IsReadyToSendMedia are satisfied (or unsatisfied).
294 // Updates the send/recv state of the media channel. 299 // Updates the send/recv state of the media channel.
295 void UpdateMediaSendRecvState(); 300 void UpdateMediaSendRecvState();
296 virtual void UpdateMediaSendRecvState_w() = 0; 301 virtual void UpdateMediaSendRecvState_w() = 0;
297 302
298 // Gets the content info appropriate to the channel (audio or video). 303 // Gets the content info appropriate to the channel (audio or video).
299 virtual const ContentInfo* GetFirstContent( 304 virtual const ContentInfo* GetFirstContent(
300 const SessionDescription* sdesc) = 0; 305 const SessionDescription* sdesc) = 0;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 const std::vector<ConnectionInfo>& infos) = 0; 355 const std::vector<ConnectionInfo>& infos) = 0;
351 356
352 // Helper function for invoking bool-returning methods on the worker thread. 357 // Helper function for invoking bool-returning methods on the worker thread.
353 template <class FunctorT> 358 template <class FunctorT>
354 bool InvokeOnWorker(const rtc::Location& posted_from, 359 bool InvokeOnWorker(const rtc::Location& posted_from,
355 const FunctorT& functor) { 360 const FunctorT& functor) {
356 return worker_thread_->Invoke<bool>(posted_from, functor); 361 return worker_thread_->Invoke<bool>(posted_from, functor);
357 } 362 }
358 363
359 private: 364 private:
360 bool InitNetwork_n(TransportChannel* rtp_transport, 365 bool InitNetwork_n(DtlsTransportInternal* rtp_dtls_transport,
361 TransportChannel* rtcp_transport); 366 DtlsTransportInternal* rtcp_dtls_transport);
362 void DisconnectTransportChannels_n(); 367 void DisconnectTransportChannels_n();
363 void SignalSentPacket_n(rtc::PacketTransportInterface* transport, 368 void SignalSentPacket_n(rtc::PacketTransportInterface* transport,
364 const rtc::SentPacket& sent_packet); 369 const rtc::SentPacket& sent_packet);
365 void SignalSentPacket_w(const rtc::SentPacket& sent_packet); 370 void SignalSentPacket_w(const rtc::SentPacket& sent_packet);
366 bool IsReadyToSendMedia_n() const; 371 bool IsReadyToSendMedia_n() const;
367 void CacheRtpAbsSendTimeHeaderExtension_n(int rtp_abs_sendtime_extn_id); 372 void CacheRtpAbsSendTimeHeaderExtension_n(int rtp_abs_sendtime_extn_id);
368 int GetTransportOverheadPerPacket() const; 373 int GetTransportOverheadPerPacket() const;
369 void UpdateTransportOverhead(); 374 void UpdateTransportOverhead();
370 375
371 rtc::Thread* const worker_thread_; 376 rtc::Thread* const worker_thread_;
372 rtc::Thread* const network_thread_; 377 rtc::Thread* const network_thread_;
373 rtc::Thread* const signaling_thread_; 378 rtc::Thread* const signaling_thread_;
374 rtc::AsyncInvoker invoker_; 379 rtc::AsyncInvoker invoker_;
375 380
376 const std::string content_name_; 381 const std::string content_name_;
377 std::unique_ptr<ConnectionMonitor> connection_monitor_; 382 std::unique_ptr<ConnectionMonitor> connection_monitor_;
378 383
379 std::string transport_name_; 384 std::string transport_name_;
380 // True if RTCP-multiplexing is required. In other words, no standalone RTCP 385 // True if RTCP-multiplexing is required. In other words, no standalone RTCP
381 // transport will ever be used for this channel. 386 // transport will ever be used for this channel.
382 const bool rtcp_mux_required_; 387 const bool rtcp_mux_required_;
383 // TODO(johan): Replace TransportChannel* with rtc::PacketTransportInterface*. 388
384 TransportChannel* rtp_transport_ = nullptr; 389 DtlsTransportInternal* rtp_dtls_transport_ = nullptr;
385 std::vector<std::pair<rtc::Socket::Option, int> > socket_options_; 390 std::vector<std::pair<rtc::Socket::Option, int> > socket_options_;
386 TransportChannel* rtcp_transport_ = nullptr; 391 DtlsTransportInternal* rtcp_dtls_transport_ = nullptr;
387 std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_; 392 std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_;
388 SrtpFilter srtp_filter_; 393 SrtpFilter srtp_filter_;
389 RtcpMuxFilter rtcp_mux_filter_; 394 RtcpMuxFilter rtcp_mux_filter_;
390 BundleFilter bundle_filter_; 395 BundleFilter bundle_filter_;
391 bool rtp_ready_to_send_ = false; 396 bool rtp_ready_to_send_ = false;
392 bool rtcp_ready_to_send_ = false; 397 bool rtcp_ready_to_send_ = false;
393 bool writable_ = false; 398 bool writable_ = false;
394 bool was_ever_writable_ = false; 399 bool was_ever_writable_ = false;
395 bool has_received_packet_ = false; 400 bool has_received_packet_ = false;
396 bool dtls_keyed_ = false; 401 bool dtls_keyed_ = false;
(...skipping 21 matching lines...) Expand all
418 public: 423 public:
419 VoiceChannel(rtc::Thread* worker_thread, 424 VoiceChannel(rtc::Thread* worker_thread,
420 rtc::Thread* network_thread, 425 rtc::Thread* network_thread,
421 rtc::Thread* signaling_thread, 426 rtc::Thread* signaling_thread,
422 MediaEngineInterface* media_engine, 427 MediaEngineInterface* media_engine,
423 VoiceMediaChannel* channel, 428 VoiceMediaChannel* channel,
424 const std::string& content_name, 429 const std::string& content_name,
425 bool rtcp_mux_required, 430 bool rtcp_mux_required,
426 bool srtp_required); 431 bool srtp_required);
427 ~VoiceChannel(); 432 ~VoiceChannel();
428 bool Init_w(TransportChannel* rtp_transport, 433 bool Init_w(DtlsTransportInternal* rtp_dtls_transport,
429 TransportChannel* rtcp_transport); 434 DtlsTransportInternal* rtcp_dtls_transport);
430 435
431 // Configure sending media on the stream with SSRC |ssrc| 436 // Configure sending media on the stream with SSRC |ssrc|
432 // If there is only one sending stream SSRC 0 can be used. 437 // If there is only one sending stream SSRC 0 can be used.
433 bool SetAudioSend(uint32_t ssrc, 438 bool SetAudioSend(uint32_t ssrc,
434 bool enable, 439 bool enable,
435 const AudioOptions* options, 440 const AudioOptions* options,
436 AudioSource* source); 441 AudioSource* source);
437 442
438 // downcasts a MediaChannel 443 // downcasts a MediaChannel
439 VoiceMediaChannel* media_channel() const override { 444 VoiceMediaChannel* media_channel() const override {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 class VideoChannel : public BaseChannel { 542 class VideoChannel : public BaseChannel {
538 public: 543 public:
539 VideoChannel(rtc::Thread* worker_thread, 544 VideoChannel(rtc::Thread* worker_thread,
540 rtc::Thread* network_thread, 545 rtc::Thread* network_thread,
541 rtc::Thread* signaling_thread, 546 rtc::Thread* signaling_thread,
542 VideoMediaChannel* channel, 547 VideoMediaChannel* channel,
543 const std::string& content_name, 548 const std::string& content_name,
544 bool rtcp_mux_required, 549 bool rtcp_mux_required,
545 bool srtp_required); 550 bool srtp_required);
546 ~VideoChannel(); 551 ~VideoChannel();
547 bool Init_w(TransportChannel* rtp_transport, 552 bool Init_w(DtlsTransportInternal* rtp_dtls_transport,
548 TransportChannel* rtcp_transport); 553 DtlsTransportInternal* rtcp_dtls_transport);
549 554
550 // downcasts a MediaChannel 555 // downcasts a MediaChannel
551 VideoMediaChannel* media_channel() const override { 556 VideoMediaChannel* media_channel() const override {
552 return static_cast<VideoMediaChannel*>(BaseChannel::media_channel()); 557 return static_cast<VideoMediaChannel*>(BaseChannel::media_channel());
553 } 558 }
554 559
555 bool SetSink(uint32_t ssrc, 560 bool SetSink(uint32_t ssrc,
556 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink); 561 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink);
557 // Get statistics about the current media session. 562 // Get statistics about the current media session.
558 bool GetStats(VideoMediaInfo* stats); 563 bool GetStats(VideoMediaInfo* stats);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 class RtpDataChannel : public BaseChannel { 622 class RtpDataChannel : public BaseChannel {
618 public: 623 public:
619 RtpDataChannel(rtc::Thread* worker_thread, 624 RtpDataChannel(rtc::Thread* worker_thread,
620 rtc::Thread* network_thread, 625 rtc::Thread* network_thread,
621 rtc::Thread* signaling_thread, 626 rtc::Thread* signaling_thread,
622 DataMediaChannel* channel, 627 DataMediaChannel* channel,
623 const std::string& content_name, 628 const std::string& content_name,
624 bool rtcp_mux_required, 629 bool rtcp_mux_required,
625 bool srtp_required); 630 bool srtp_required);
626 ~RtpDataChannel(); 631 ~RtpDataChannel();
627 bool Init_w(TransportChannel* rtp_transport, 632 bool Init_w(DtlsTransportInternal* rtp_dtls_transport,
628 TransportChannel* rtcp_transport); 633 DtlsTransportInternal* rtcp_dtls_transport);
629 634
630 virtual bool SendData(const SendDataParams& params, 635 virtual bool SendData(const SendDataParams& params,
631 const rtc::CopyOnWriteBuffer& payload, 636 const rtc::CopyOnWriteBuffer& payload,
632 SendDataResult* result); 637 SendDataResult* result);
633 638
634 void StartMediaMonitor(int cms); 639 void StartMediaMonitor(int cms);
635 void StopMediaMonitor(); 640 void StopMediaMonitor();
636 641
637 // Should be called on the signaling thread only. 642 // Should be called on the signaling thread only.
638 bool ready_to_send_data() const { 643 bool ready_to_send_data() const {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 // SetSendParameters. 726 // SetSendParameters.
722 DataSendParameters last_send_params_; 727 DataSendParameters last_send_params_;
723 // Last DataRecvParameters sent down to the media_channel() via 728 // Last DataRecvParameters sent down to the media_channel() via
724 // SetRecvParameters. 729 // SetRecvParameters.
725 DataRecvParameters last_recv_params_; 730 DataRecvParameters last_recv_params_;
726 }; 731 };
727 732
728 } // namespace cricket 733 } // namespace cricket
729 734
730 #endif // WEBRTC_PC_CHANNEL_H_ 735 #endif // WEBRTC_PC_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698