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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 void ChannelNotWritable_n(); | 296 void ChannelNotWritable_n(); |
297 | 297 |
298 bool AddRecvStream_w(const StreamParams& sp); | 298 bool AddRecvStream_w(const StreamParams& sp); |
299 bool RemoveRecvStream_w(uint32_t ssrc); | 299 bool RemoveRecvStream_w(uint32_t ssrc); |
300 bool AddSendStream_w(const StreamParams& sp); | 300 bool AddSendStream_w(const StreamParams& sp); |
301 bool RemoveSendStream_w(uint32_t ssrc); | 301 bool RemoveSendStream_w(uint32_t ssrc); |
302 bool ShouldSetupDtlsSrtp_n() const; | 302 bool ShouldSetupDtlsSrtp_n() const; |
303 // Do the DTLS key expansion and impose it on the SRTP/SRTCP filters. | 303 // Do the DTLS key expansion and impose it on the SRTP/SRTCP filters. |
304 // |rtcp_channel| indicates whether to set up the RTP or RTCP filter. | 304 // |rtcp_channel| indicates whether to set up the RTP or RTCP filter. |
305 bool SetupDtlsSrtp_n(bool rtcp); | 305 bool SetupDtlsSrtp_n(bool rtcp); |
306 void MaybeSetupDtlsSrtp_n(); | 306 // Returns true if DTLS-SRTP has been setup. |
307 bool MaybeSetupDtlsSrtp_n(); | |
307 // Set the DTLS-SRTP cipher policy on this channel as appropriate. | 308 // Set the DTLS-SRTP cipher policy on this channel as appropriate. |
308 bool SetDtlsSrtpCryptoSuites_n(DtlsTransportInternal* transport, bool rtcp); | 309 bool SetDtlsSrtpCryptoSuites_n(DtlsTransportInternal* transport, bool rtcp); |
309 | 310 |
310 // Should be called whenever the conditions for | 311 // Should be called whenever the conditions for |
311 // IsReadyToReceiveMedia/IsReadyToSendMedia are satisfied (or unsatisfied). | 312 // IsReadyToReceiveMedia/IsReadyToSendMedia are satisfied (or unsatisfied). |
312 // Updates the send/recv state of the media channel. | 313 // Updates the send/recv state of the media channel. |
313 void UpdateMediaSendRecvState(); | 314 void UpdateMediaSendRecvState(); |
314 virtual void UpdateMediaSendRecvState_w() = 0; | 315 virtual void UpdateMediaSendRecvState_w() = 0; |
315 | 316 |
316 // Gets the content info appropriate to the channel (audio or video). | 317 // Gets the content info appropriate to the channel (audio or video). |
(...skipping 17 matching lines...) Expand all Loading... | |
334 std::string* error_desc); | 335 std::string* error_desc); |
335 bool SetRtpTransportParameters_n(const MediaContentDescription* content, | 336 bool SetRtpTransportParameters_n(const MediaContentDescription* content, |
336 ContentAction action, | 337 ContentAction action, |
337 ContentSource src, | 338 ContentSource src, |
338 std::string* error_desc); | 339 std::string* error_desc); |
339 | 340 |
340 // Helper method to get RTP Absoulute SendTime extension header id if | 341 // Helper method to get RTP Absoulute SendTime extension header id if |
341 // present in remote supported extensions list. | 342 // present in remote supported extensions list. |
342 void MaybeCacheRtpAbsSendTimeHeaderExtension_w( | 343 void MaybeCacheRtpAbsSendTimeHeaderExtension_w( |
343 const std::vector<webrtc::RtpExtension>& extensions); | 344 const std::vector<webrtc::RtpExtension>& extensions); |
345 void PrepareHeaderExtensions_w(ContentSource source, | |
346 const std::vector<webrtc::RtpExtension>& extensions); | |
pthatcher1
2017/03/21 07:07:06
void PrepareRtpHeaderExtensions_w would be a bette
joachim
2017/03/23 00:04:33
Method has been removed.
| |
344 | 347 |
345 bool CheckSrtpConfig_n(const std::vector<CryptoParams>& cryptos, | 348 bool CheckSrtpConfig_n(const std::vector<CryptoParams>& cryptos, |
346 bool* dtls, | 349 bool* dtls, |
347 std::string* error_desc); | 350 std::string* error_desc); |
348 bool SetSrtp_n(const std::vector<CryptoParams>& params, | 351 bool SetSrtp_n(const std::vector<CryptoParams>& params, |
349 ContentAction action, | 352 ContentAction action, |
350 ContentSource src, | 353 ContentSource src, |
351 std::string* error_desc); | 354 std::string* error_desc); |
352 bool SetRtcpMux_n(bool enable, | 355 bool SetRtcpMux_n(bool enable, |
353 ContentAction action, | 356 ContentAction action, |
(...skipping 24 matching lines...) Expand all Loading... | |
378 bool InitNetwork_n(DtlsTransportInternal* rtp_dtls_transport, | 381 bool InitNetwork_n(DtlsTransportInternal* rtp_dtls_transport, |
379 DtlsTransportInternal* rtcp_dtls_transport, | 382 DtlsTransportInternal* rtcp_dtls_transport, |
380 rtc::PacketTransportInternal* rtp_packet_transport, | 383 rtc::PacketTransportInternal* rtp_packet_transport, |
381 rtc::PacketTransportInternal* rtcp_packet_transport); | 384 rtc::PacketTransportInternal* rtcp_packet_transport); |
382 void DisconnectTransportChannels_n(); | 385 void DisconnectTransportChannels_n(); |
383 void SignalSentPacket_n(rtc::PacketTransportInternal* transport, | 386 void SignalSentPacket_n(rtc::PacketTransportInternal* transport, |
384 const rtc::SentPacket& sent_packet); | 387 const rtc::SentPacket& sent_packet); |
385 void SignalSentPacket_w(const rtc::SentPacket& sent_packet); | 388 void SignalSentPacket_w(const rtc::SentPacket& sent_packet); |
386 bool IsReadyToSendMedia_n() const; | 389 bool IsReadyToSendMedia_n() const; |
387 void CacheRtpAbsSendTimeHeaderExtension_n(int rtp_abs_sendtime_extn_id); | 390 void CacheRtpAbsSendTimeHeaderExtension_n(int rtp_abs_sendtime_extn_id); |
391 void PrepareHeaderExtensions_n(ContentSource source, | |
392 const std::vector<webrtc::RtpExtension> encrypted_headers); | |
388 int GetTransportOverheadPerPacket() const; | 393 int GetTransportOverheadPerPacket() const; |
389 void UpdateTransportOverhead(); | 394 void UpdateTransportOverhead(); |
390 | 395 |
391 rtc::Thread* const worker_thread_; | 396 rtc::Thread* const worker_thread_; |
392 rtc::Thread* const network_thread_; | 397 rtc::Thread* const network_thread_; |
393 rtc::Thread* const signaling_thread_; | 398 rtc::Thread* const signaling_thread_; |
394 rtc::AsyncInvoker invoker_; | 399 rtc::AsyncInvoker invoker_; |
395 | 400 |
396 const std::string content_name_; | 401 const std::string content_name_; |
397 std::unique_ptr<ConnectionMonitor> connection_monitor_; | 402 std::unique_ptr<ConnectionMonitor> connection_monitor_; |
(...skipping 18 matching lines...) Expand all Loading... | |
416 BundleFilter bundle_filter_; | 421 BundleFilter bundle_filter_; |
417 bool rtp_ready_to_send_ = false; | 422 bool rtp_ready_to_send_ = false; |
418 bool rtcp_ready_to_send_ = false; | 423 bool rtcp_ready_to_send_ = false; |
419 bool writable_ = false; | 424 bool writable_ = false; |
420 bool was_ever_writable_ = false; | 425 bool was_ever_writable_ = false; |
421 bool has_received_packet_ = false; | 426 bool has_received_packet_ = false; |
422 bool dtls_keyed_ = false; | 427 bool dtls_keyed_ = false; |
423 const bool srtp_required_ = true; | 428 const bool srtp_required_ = true; |
424 rtc::CryptoOptions crypto_options_; | 429 rtc::CryptoOptions crypto_options_; |
425 int rtp_abs_sendtime_extn_id_ = -1; | 430 int rtp_abs_sendtime_extn_id_ = -1; |
431 std::vector<webrtc::RtpExtension> rtp_local_encrypted_headers_; | |
432 std::vector<webrtc::RtpExtension> rtp_remote_encrypted_headers_; | |
433 | |
434 static const int kNoEncryptedHeadersReady = 0; | |
435 static const int kLocalEncryptedHeadersReady = 1; | |
436 static const int kRemoteEncryptedHeadersReady = 2; | |
437 static const int kAllEncryptedHeadersReady = | |
438 kLocalEncryptedHeadersReady | kRemoteEncryptedHeadersReady; | |
439 int rtp_encrypted_headers_ready_ = kNoEncryptedHeadersReady; | |
Taylor Brandstetter
2017/03/22 18:00:11
Can this extra state be derived from existing info
joachim
2017/03/23 00:04:33
I completely removed the extra state.
| |
426 | 440 |
427 // MediaChannel related members that should be accessed from the worker | 441 // MediaChannel related members that should be accessed from the worker |
428 // thread. | 442 // thread. |
429 MediaChannel* const media_channel_; | 443 MediaChannel* const media_channel_; |
430 // Currently the |enabled_| flag is accessed from the signaling thread as | 444 // Currently the |enabled_| flag is accessed from the signaling thread as |
431 // well, but it can be changed only when signaling thread does a synchronous | 445 // well, but it can be changed only when signaling thread does a synchronous |
432 // call to the worker thread, so it should be safe. | 446 // call to the worker thread, so it should be safe. |
433 bool enabled_ = false; | 447 bool enabled_ = false; |
434 std::vector<StreamParams> local_streams_; | 448 std::vector<StreamParams> local_streams_; |
435 std::vector<StreamParams> remote_streams_; | 449 std::vector<StreamParams> remote_streams_; |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
745 // SetSendParameters. | 759 // SetSendParameters. |
746 DataSendParameters last_send_params_; | 760 DataSendParameters last_send_params_; |
747 // Last DataRecvParameters sent down to the media_channel() via | 761 // Last DataRecvParameters sent down to the media_channel() via |
748 // SetRecvParameters. | 762 // SetRecvParameters. |
749 DataRecvParameters last_recv_params_; | 763 DataRecvParameters last_recv_params_; |
750 }; | 764 }; |
751 | 765 |
752 } // namespace cricket | 766 } // namespace cricket |
753 | 767 |
754 #endif // WEBRTC_PC_CHANNEL_H_ | 768 #endif // WEBRTC_PC_CHANNEL_H_ |
OLD | NEW |