OLD | NEW |
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 13 matching lines...) Expand all Loading... |
24 #include "webrtc/base/criticalsection.h" | 24 #include "webrtc/base/criticalsection.h" |
25 #include "webrtc/base/network.h" | 25 #include "webrtc/base/network.h" |
26 #include "webrtc/base/sigslot.h" | 26 #include "webrtc/base/sigslot.h" |
27 #include "webrtc/base/window.h" | 27 #include "webrtc/base/window.h" |
28 #include "webrtc/media/base/mediachannel.h" | 28 #include "webrtc/media/base/mediachannel.h" |
29 #include "webrtc/media/base/mediaengine.h" | 29 #include "webrtc/media/base/mediaengine.h" |
30 #include "webrtc/media/base/streamparams.h" | 30 #include "webrtc/media/base/streamparams.h" |
31 #include "webrtc/media/base/videosinkinterface.h" | 31 #include "webrtc/media/base/videosinkinterface.h" |
32 #include "webrtc/media/base/videosourceinterface.h" | 32 #include "webrtc/media/base/videosourceinterface.h" |
33 #include "webrtc/p2p/base/dtlstransportinternal.h" | 33 #include "webrtc/p2p/base/dtlstransportinternal.h" |
34 #include "webrtc/p2p/base/packettransportinterface.h" | 34 #include "webrtc/p2p/base/packettransportinternal.h" |
35 #include "webrtc/p2p/base/transportcontroller.h" | 35 #include "webrtc/p2p/base/transportcontroller.h" |
36 #include "webrtc/p2p/client/socketmonitor.h" | 36 #include "webrtc/p2p/client/socketmonitor.h" |
37 #include "webrtc/pc/audiomonitor.h" | 37 #include "webrtc/pc/audiomonitor.h" |
38 #include "webrtc/pc/bundlefilter.h" | 38 #include "webrtc/pc/bundlefilter.h" |
39 #include "webrtc/pc/mediamonitor.h" | 39 #include "webrtc/pc/mediamonitor.h" |
40 #include "webrtc/pc/mediasession.h" | 40 #include "webrtc/pc/mediasession.h" |
41 #include "webrtc/pc/rtcpmuxfilter.h" | 41 #include "webrtc/pc/rtcpmuxfilter.h" |
42 #include "webrtc/pc/srtpfilter.h" | 42 #include "webrtc/pc/srtpfilter.h" |
43 | 43 |
44 namespace webrtc { | 44 namespace webrtc { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 BaseChannel(rtc::Thread* worker_thread, | 78 BaseChannel(rtc::Thread* worker_thread, |
79 rtc::Thread* network_thread, | 79 rtc::Thread* network_thread, |
80 rtc::Thread* signaling_thread, | 80 rtc::Thread* signaling_thread, |
81 MediaChannel* channel, | 81 MediaChannel* channel, |
82 const std::string& content_name, | 82 const std::string& content_name, |
83 bool rtcp_mux_required, | 83 bool rtcp_mux_required, |
84 bool srtp_required); | 84 bool srtp_required); |
85 virtual ~BaseChannel(); | 85 virtual ~BaseChannel(); |
86 bool Init_w(DtlsTransportInternal* rtp_dtls_transport, | 86 bool Init_w(DtlsTransportInternal* rtp_dtls_transport, |
87 DtlsTransportInternal* rtcp_dtls_transport, | 87 DtlsTransportInternal* rtcp_dtls_transport, |
88 rtc::PacketTransportInterface* rtp_packet_transport, | 88 rtc::PacketTransportInternal* rtp_packet_transport, |
89 rtc::PacketTransportInterface* rtcp_packet_transport); | 89 rtc::PacketTransportInternal* rtcp_packet_transport); |
90 // Deinit may be called multiple times and is simply ignored if it's already | 90 // Deinit may be called multiple times and is simply ignored if it's already |
91 // done. | 91 // done. |
92 void Deinit(); | 92 void Deinit(); |
93 | 93 |
94 rtc::Thread* worker_thread() const { return worker_thread_; } | 94 rtc::Thread* worker_thread() const { return worker_thread_; } |
95 rtc::Thread* network_thread() const { return network_thread_; } | 95 rtc::Thread* network_thread() const { return network_thread_; } |
96 const std::string& content_name() const { return content_name_; } | 96 const std::string& content_name() const { return content_name_; } |
97 // TODO(deadbeef): This is redundant; remove this. | 97 // TODO(deadbeef): This is redundant; remove this. |
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 // Set the transport(s), and update writability and "ready-to-send" state. | 110 // Set the transport(s), and update writability and "ready-to-send" state. |
111 // |rtp_transport| must be non-null. | 111 // |rtp_transport| must be non-null. |
112 // |rtcp_transport| must be supplied if NeedsRtcpTransport() is true (meaning | 112 // |rtcp_transport| must be supplied if NeedsRtcpTransport() is true (meaning |
113 // RTCP muxing is not fully active yet). | 113 // RTCP muxing is not fully active yet). |
114 // |rtp_transport| and |rtcp_transport| must share the same transport name as | 114 // |rtp_transport| and |rtcp_transport| must share the same transport name as |
115 // well. | 115 // well. |
116 // Can not start with "rtc::PacketTransportInterface" and switch to | 116 // Can not start with "rtc::PacketTransportInternal" and switch to |
117 // "DtlsTransportInternal", or vice-versa. | 117 // "DtlsTransportInternal", or vice-versa. |
118 void SetTransports(DtlsTransportInternal* rtp_dtls_transport, | 118 void SetTransports(DtlsTransportInternal* rtp_dtls_transport, |
119 DtlsTransportInternal* rtcp_dtls_transport); | 119 DtlsTransportInternal* rtcp_dtls_transport); |
120 void SetTransports(rtc::PacketTransportInterface* rtp_packet_transport, | 120 void SetTransports(rtc::PacketTransportInternal* rtp_packet_transport, |
121 rtc::PacketTransportInterface* rtcp_packet_transport); | 121 rtc::PacketTransportInternal* rtcp_packet_transport); |
122 bool PushdownLocalDescription(const SessionDescription* local_desc, | 122 bool PushdownLocalDescription(const SessionDescription* local_desc, |
123 ContentAction action, | 123 ContentAction action, |
124 std::string* error_desc); | 124 std::string* error_desc); |
125 bool PushdownRemoteDescription(const SessionDescription* remote_desc, | 125 bool PushdownRemoteDescription(const SessionDescription* remote_desc, |
126 ContentAction action, | 126 ContentAction action, |
127 std::string* error_desc); | 127 std::string* error_desc); |
128 // Channel control | 128 // Channel control |
129 bool SetLocalContent(const MediaContentDescription* content, | 129 bool SetLocalContent(const MediaContentDescription* content, |
130 ContentAction action, | 130 ContentAction action, |
131 std::string* error_desc); | 131 std::string* error_desc); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options); | 204 bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options); |
205 | 205 |
206 // This function returns true if we require SRTP for call setup. | 206 // This function returns true if we require SRTP for call setup. |
207 bool srtp_required_for_testing() const { return srtp_required_; } | 207 bool srtp_required_for_testing() const { return srtp_required_; } |
208 | 208 |
209 protected: | 209 protected: |
210 virtual MediaChannel* media_channel() const { return media_channel_; } | 210 virtual MediaChannel* media_channel() const { return media_channel_; } |
211 | 211 |
212 void SetTransports_n(DtlsTransportInternal* rtp_dtls_transport, | 212 void SetTransports_n(DtlsTransportInternal* rtp_dtls_transport, |
213 DtlsTransportInternal* rtcp_dtls_transport, | 213 DtlsTransportInternal* rtcp_dtls_transport, |
214 rtc::PacketTransportInterface* rtp_packet_transport, | 214 rtc::PacketTransportInternal* rtp_packet_transport, |
215 rtc::PacketTransportInterface* rtcp_packet_transport); | 215 rtc::PacketTransportInternal* rtcp_packet_transport); |
216 | 216 |
217 // This does not update writability or "ready-to-send" state; it just | 217 // This does not update writability or "ready-to-send" state; it just |
218 // disconnects from the old channel and connects to the new one. | 218 // disconnects from the old channel and connects to the new one. |
219 void SetTransport_n(bool rtcp, | 219 void SetTransport_n(bool rtcp, |
220 DtlsTransportInternal* new_dtls_transport, | 220 DtlsTransportInternal* new_dtls_transport, |
221 rtc::PacketTransportInterface* new_packet_transport); | 221 rtc::PacketTransportInternal* new_packet_transport); |
222 | 222 |
223 bool was_ever_writable() const { return was_ever_writable_; } | 223 bool was_ever_writable() const { return was_ever_writable_; } |
224 void set_local_content_direction(MediaContentDirection direction) { | 224 void set_local_content_direction(MediaContentDirection direction) { |
225 local_content_direction_ = direction; | 225 local_content_direction_ = direction; |
226 } | 226 } |
227 void set_remote_content_direction(MediaContentDirection direction) { | 227 void set_remote_content_direction(MediaContentDirection direction) { |
228 remote_content_direction_ = direction; | 228 remote_content_direction_ = direction; |
229 } | 229 } |
230 // These methods verify that: | 230 // These methods verify that: |
231 // * The required content description directions have been set. | 231 // * The required content description directions have been set. |
232 // * The channel is enabled. | 232 // * The channel is enabled. |
233 // * And for sending: | 233 // * And for sending: |
234 // - The SRTP filter is active if it's needed. | 234 // - The SRTP filter is active if it's needed. |
235 // - The transport has been writable before, meaning it should be at least | 235 // - The transport has been writable before, meaning it should be at least |
236 // possible to succeed in sending a packet. | 236 // possible to succeed in sending a packet. |
237 // | 237 // |
238 // When any of these properties change, UpdateMediaSendRecvState_w should be | 238 // When any of these properties change, UpdateMediaSendRecvState_w should be |
239 // called. | 239 // called. |
240 bool IsReadyToReceiveMedia_w() const; | 240 bool IsReadyToReceiveMedia_w() const; |
241 bool IsReadyToSendMedia_w() const; | 241 bool IsReadyToSendMedia_w() const; |
242 rtc::Thread* signaling_thread() { return signaling_thread_; } | 242 rtc::Thread* signaling_thread() { return signaling_thread_; } |
243 | 243 |
244 void ConnectToDtlsTransport(DtlsTransportInternal* transport); | 244 void ConnectToDtlsTransport(DtlsTransportInternal* transport); |
245 void DisconnectFromDtlsTransport(DtlsTransportInternal* transport); | 245 void DisconnectFromDtlsTransport(DtlsTransportInternal* transport); |
246 void ConnectToPacketTransport(rtc::PacketTransportInterface* transport); | 246 void ConnectToPacketTransport(rtc::PacketTransportInternal* transport); |
247 void DisconnectFromPacketTransport(rtc::PacketTransportInterface* transport); | 247 void DisconnectFromPacketTransport(rtc::PacketTransportInternal* transport); |
248 | 248 |
249 void FlushRtcpMessages_n(); | 249 void FlushRtcpMessages_n(); |
250 | 250 |
251 // NetworkInterface implementation, called by MediaEngine | 251 // NetworkInterface implementation, called by MediaEngine |
252 bool SendPacket(rtc::CopyOnWriteBuffer* packet, | 252 bool SendPacket(rtc::CopyOnWriteBuffer* packet, |
253 const rtc::PacketOptions& options) override; | 253 const rtc::PacketOptions& options) override; |
254 bool SendRtcp(rtc::CopyOnWriteBuffer* packet, | 254 bool SendRtcp(rtc::CopyOnWriteBuffer* packet, |
255 const rtc::PacketOptions& options) override; | 255 const rtc::PacketOptions& options) override; |
256 | 256 |
257 // From TransportChannel | 257 // From TransportChannel |
258 void OnWritableState(rtc::PacketTransportInterface* transport); | 258 void OnWritableState(rtc::PacketTransportInternal* transport); |
259 virtual void OnPacketRead(rtc::PacketTransportInterface* transport, | 259 virtual void OnPacketRead(rtc::PacketTransportInternal* transport, |
260 const char* data, | 260 const char* data, |
261 size_t len, | 261 size_t len, |
262 const rtc::PacketTime& packet_time, | 262 const rtc::PacketTime& packet_time, |
263 int flags); | 263 int flags); |
264 void OnReadyToSend(rtc::PacketTransportInterface* transport); | 264 void OnReadyToSend(rtc::PacketTransportInternal* transport); |
265 | 265 |
266 void OnDtlsState(DtlsTransportInternal* transport, DtlsTransportState state); | 266 void OnDtlsState(DtlsTransportInternal* transport, DtlsTransportState state); |
267 | 267 |
268 void OnSelectedCandidatePairChanged( | 268 void OnSelectedCandidatePairChanged( |
269 IceTransportInternal* ice_transport, | 269 IceTransportInternal* ice_transport, |
270 CandidatePairInterface* selected_candidate_pair, | 270 CandidatePairInterface* selected_candidate_pair, |
271 int last_sent_packet_id, | 271 int last_sent_packet_id, |
272 bool ready_to_send); | 272 bool ready_to_send); |
273 | 273 |
274 bool PacketIsRtcp(const rtc::PacketTransportInterface* transport, | 274 bool PacketIsRtcp(const rtc::PacketTransportInternal* transport, |
275 const char* data, | 275 const char* data, |
276 size_t len); | 276 size_t len); |
277 bool SendPacket(bool rtcp, | 277 bool SendPacket(bool rtcp, |
278 rtc::CopyOnWriteBuffer* packet, | 278 rtc::CopyOnWriteBuffer* packet, |
279 const rtc::PacketOptions& options); | 279 const rtc::PacketOptions& options); |
280 | 280 |
281 bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet); | 281 bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet); |
282 void HandlePacket(bool rtcp, rtc::CopyOnWriteBuffer* packet, | 282 void HandlePacket(bool rtcp, rtc::CopyOnWriteBuffer* packet, |
283 const rtc::PacketTime& packet_time); | 283 const rtc::PacketTime& packet_time); |
284 void OnPacketReceived(bool rtcp, | 284 void OnPacketReceived(bool rtcp, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 // Helper function for invoking bool-returning methods on the worker thread. | 370 // Helper function for invoking bool-returning methods on the worker thread. |
371 template <class FunctorT> | 371 template <class FunctorT> |
372 bool InvokeOnWorker(const rtc::Location& posted_from, | 372 bool InvokeOnWorker(const rtc::Location& posted_from, |
373 const FunctorT& functor) { | 373 const FunctorT& functor) { |
374 return worker_thread_->Invoke<bool>(posted_from, functor); | 374 return worker_thread_->Invoke<bool>(posted_from, functor); |
375 } | 375 } |
376 | 376 |
377 private: | 377 private: |
378 bool InitNetwork_n(DtlsTransportInternal* rtp_dtls_transport, | 378 bool InitNetwork_n(DtlsTransportInternal* rtp_dtls_transport, |
379 DtlsTransportInternal* rtcp_dtls_transport, | 379 DtlsTransportInternal* rtcp_dtls_transport, |
380 rtc::PacketTransportInterface* rtp_packet_transport, | 380 rtc::PacketTransportInternal* rtp_packet_transport, |
381 rtc::PacketTransportInterface* rtcp_packet_transport); | 381 rtc::PacketTransportInternal* rtcp_packet_transport); |
382 void DisconnectTransportChannels_n(); | 382 void DisconnectTransportChannels_n(); |
383 void SignalSentPacket_n(rtc::PacketTransportInterface* transport, | 383 void SignalSentPacket_n(rtc::PacketTransportInternal* transport, |
384 const rtc::SentPacket& sent_packet); | 384 const rtc::SentPacket& sent_packet); |
385 void SignalSentPacket_w(const rtc::SentPacket& sent_packet); | 385 void SignalSentPacket_w(const rtc::SentPacket& sent_packet); |
386 bool IsReadyToSendMedia_n() const; | 386 bool IsReadyToSendMedia_n() const; |
387 void CacheRtpAbsSendTimeHeaderExtension_n(int rtp_abs_sendtime_extn_id); | 387 void CacheRtpAbsSendTimeHeaderExtension_n(int rtp_abs_sendtime_extn_id); |
388 int GetTransportOverheadPerPacket() const; | 388 int GetTransportOverheadPerPacket() const; |
389 void UpdateTransportOverhead(); | 389 void UpdateTransportOverhead(); |
390 | 390 |
391 rtc::Thread* const worker_thread_; | 391 rtc::Thread* const worker_thread_; |
392 rtc::Thread* const network_thread_; | 392 rtc::Thread* const network_thread_; |
393 rtc::Thread* const signaling_thread_; | 393 rtc::Thread* const signaling_thread_; |
394 rtc::AsyncInvoker invoker_; | 394 rtc::AsyncInvoker invoker_; |
395 | 395 |
396 const std::string content_name_; | 396 const std::string content_name_; |
397 std::unique_ptr<ConnectionMonitor> connection_monitor_; | 397 std::unique_ptr<ConnectionMonitor> connection_monitor_; |
398 | 398 |
399 // Won't be set when using raw packet transports. SDP-specific thing. | 399 // Won't be set when using raw packet transports. SDP-specific thing. |
400 std::string transport_name_; | 400 std::string transport_name_; |
401 // True if RTCP-multiplexing is required. In other words, no standalone RTCP | 401 // True if RTCP-multiplexing is required. In other words, no standalone RTCP |
402 // transport will ever be used for this channel. | 402 // transport will ever be used for this channel. |
403 const bool rtcp_mux_required_; | 403 const bool rtcp_mux_required_; |
404 | 404 |
405 // Separate DTLS/non-DTLS pointers to support using BaseChannel without DTLS. | 405 // Separate DTLS/non-DTLS pointers to support using BaseChannel without DTLS. |
406 // Temporary measure until more refactoring is done. | 406 // Temporary measure until more refactoring is done. |
407 // If non-null, "X_dtls_transport_" will always equal "X_packet_transport_". | 407 // If non-null, "X_dtls_transport_" will always equal "X_packet_transport_". |
408 DtlsTransportInternal* rtp_dtls_transport_ = nullptr; | 408 DtlsTransportInternal* rtp_dtls_transport_ = nullptr; |
409 DtlsTransportInternal* rtcp_dtls_transport_ = nullptr; | 409 DtlsTransportInternal* rtcp_dtls_transport_ = nullptr; |
410 rtc::PacketTransportInterface* rtp_packet_transport_ = nullptr; | 410 rtc::PacketTransportInternal* rtp_packet_transport_ = nullptr; |
411 rtc::PacketTransportInterface* rtcp_packet_transport_ = nullptr; | 411 rtc::PacketTransportInternal* rtcp_packet_transport_ = nullptr; |
412 std::vector<std::pair<rtc::Socket::Option, int> > socket_options_; | 412 std::vector<std::pair<rtc::Socket::Option, int> > socket_options_; |
413 std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_; | 413 std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_; |
414 SrtpFilter srtp_filter_; | 414 SrtpFilter srtp_filter_; |
415 RtcpMuxFilter rtcp_mux_filter_; | 415 RtcpMuxFilter rtcp_mux_filter_; |
416 BundleFilter bundle_filter_; | 416 BundleFilter bundle_filter_; |
417 bool rtp_ready_to_send_ = false; | 417 bool rtp_ready_to_send_ = false; |
418 bool rtcp_ready_to_send_ = false; | 418 bool rtcp_ready_to_send_ = false; |
419 bool writable_ = false; | 419 bool writable_ = false; |
420 bool was_ever_writable_ = false; | 420 bool was_ever_writable_ = false; |
421 bool has_received_packet_ = false; | 421 bool has_received_packet_ = false; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 void GetActiveStreams_w(AudioInfo::StreamList* actives); | 509 void GetActiveStreams_w(AudioInfo::StreamList* actives); |
510 webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const; | 510 webrtc::RtpParameters GetRtpSendParameters_w(uint32_t ssrc) const; |
511 bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters); | 511 bool SetRtpSendParameters_w(uint32_t ssrc, webrtc::RtpParameters parameters); |
512 webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const; | 512 webrtc::RtpParameters GetRtpReceiveParameters_w(uint32_t ssrc) const; |
513 bool SetRtpReceiveParameters_w(uint32_t ssrc, | 513 bool SetRtpReceiveParameters_w(uint32_t ssrc, |
514 webrtc::RtpParameters parameters); | 514 webrtc::RtpParameters parameters); |
515 cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_AUDIO; } | 515 cricket::MediaType media_type() override { return cricket::MEDIA_TYPE_AUDIO; } |
516 | 516 |
517 private: | 517 private: |
518 // overrides from BaseChannel | 518 // overrides from BaseChannel |
519 void OnPacketRead(rtc::PacketTransportInterface* transport, | 519 void OnPacketRead(rtc::PacketTransportInternal* transport, |
520 const char* data, | 520 const char* data, |
521 size_t len, | 521 size_t len, |
522 const rtc::PacketTime& packet_time, | 522 const rtc::PacketTime& packet_time, |
523 int flags) override; | 523 int flags) override; |
524 void UpdateMediaSendRecvState_w() override; | 524 void UpdateMediaSendRecvState_w() override; |
525 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; | 525 const ContentInfo* GetFirstContent(const SessionDescription* sdesc) override; |
526 bool SetLocalContent_w(const MediaContentDescription* content, | 526 bool SetLocalContent_w(const MediaContentDescription* content, |
527 ContentAction action, | 527 ContentAction action, |
528 std::string* error_desc) override; | 528 std::string* error_desc) override; |
529 bool SetRemoteContent_w(const MediaContentDescription* content, | 529 bool SetRemoteContent_w(const MediaContentDescription* content, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 RtpDataChannel(rtc::Thread* worker_thread, | 641 RtpDataChannel(rtc::Thread* worker_thread, |
642 rtc::Thread* network_thread, | 642 rtc::Thread* network_thread, |
643 rtc::Thread* signaling_thread, | 643 rtc::Thread* signaling_thread, |
644 DataMediaChannel* channel, | 644 DataMediaChannel* channel, |
645 const std::string& content_name, | 645 const std::string& content_name, |
646 bool rtcp_mux_required, | 646 bool rtcp_mux_required, |
647 bool srtp_required); | 647 bool srtp_required); |
648 ~RtpDataChannel(); | 648 ~RtpDataChannel(); |
649 bool Init_w(DtlsTransportInternal* rtp_dtls_transport, | 649 bool Init_w(DtlsTransportInternal* rtp_dtls_transport, |
650 DtlsTransportInternal* rtcp_dtls_transport, | 650 DtlsTransportInternal* rtcp_dtls_transport, |
651 rtc::PacketTransportInterface* rtp_packet_transport, | 651 rtc::PacketTransportInternal* rtp_packet_transport, |
652 rtc::PacketTransportInterface* rtcp_packet_transport); | 652 rtc::PacketTransportInternal* rtcp_packet_transport); |
653 | 653 |
654 virtual bool SendData(const SendDataParams& params, | 654 virtual bool SendData(const SendDataParams& params, |
655 const rtc::CopyOnWriteBuffer& payload, | 655 const rtc::CopyOnWriteBuffer& payload, |
656 SendDataResult* result); | 656 SendDataResult* result); |
657 | 657 |
658 void StartMediaMonitor(int cms); | 658 void StartMediaMonitor(int cms); |
659 void StopMediaMonitor(); | 659 void StopMediaMonitor(); |
660 | 660 |
661 // Should be called on the signaling thread only. | 661 // Should be called on the signaling thread only. |
662 bool ready_to_send_data() const { | 662 bool ready_to_send_data() const { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 // SetSendParameters. | 745 // SetSendParameters. |
746 DataSendParameters last_send_params_; | 746 DataSendParameters last_send_params_; |
747 // Last DataRecvParameters sent down to the media_channel() via | 747 // Last DataRecvParameters sent down to the media_channel() via |
748 // SetRecvParameters. | 748 // SetRecvParameters. |
749 DataRecvParameters last_recv_params_; | 749 DataRecvParameters last_recv_params_; |
750 }; | 750 }; |
751 | 751 |
752 } // namespace cricket | 752 } // namespace cricket |
753 | 753 |
754 #endif // WEBRTC_PC_CHANNEL_H_ | 754 #endif // WEBRTC_PC_CHANNEL_H_ |
OLD | NEW |