| 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 |
| 11 #ifndef WEBRTC_PC_CHANNEL_H_ | 11 #ifndef WEBRTC_PC_CHANNEL_H_ |
| 12 #define WEBRTC_PC_CHANNEL_H_ | 12 #define WEBRTC_PC_CHANNEL_H_ |
| 13 | 13 |
| 14 #include <map> | 14 #include <map> |
| 15 #include <memory> | 15 #include <memory> |
| 16 #include <set> | 16 #include <set> |
| 17 #include <string> | 17 #include <string> |
| 18 #include <utility> | 18 #include <utility> |
| 19 #include <vector> | 19 #include <vector> |
| 20 | 20 |
| 21 #include "webrtc/audio_sink.h" | 21 #include "webrtc/audio_sink.h" |
| 22 #include "webrtc/base/asyncinvoker.h" | 22 #include "webrtc/base/asyncinvoker.h" |
| 23 #include "webrtc/base/asyncudpsocket.h" | 23 #include "webrtc/base/asyncudpsocket.h" |
| 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/thread_scope.h" |
| 27 #include "webrtc/base/window.h" | 28 #include "webrtc/base/window.h" |
| 28 #include "webrtc/media/base/mediachannel.h" | 29 #include "webrtc/media/base/mediachannel.h" |
| 29 #include "webrtc/media/base/mediaengine.h" | 30 #include "webrtc/media/base/mediaengine.h" |
| 30 #include "webrtc/media/base/streamparams.h" | 31 #include "webrtc/media/base/streamparams.h" |
| 31 #include "webrtc/media/base/videosinkinterface.h" | 32 #include "webrtc/media/base/videosinkinterface.h" |
| 32 #include "webrtc/media/base/videosourceinterface.h" | 33 #include "webrtc/media/base/videosourceinterface.h" |
| 33 #include "webrtc/p2p/base/transportcontroller.h" | 34 #include "webrtc/p2p/base/transportcontroller.h" |
| 34 #include "webrtc/p2p/client/socketmonitor.h" | 35 #include "webrtc/p2p/client/socketmonitor.h" |
| 35 #include "webrtc/pc/audiomonitor.h" | 36 #include "webrtc/pc/audiomonitor.h" |
| 36 #include "webrtc/pc/bundlefilter.h" | 37 #include "webrtc/pc/bundlefilter.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 int SetOption_n(SocketType type, rtc::Socket::Option o, int val); | 168 int SetOption_n(SocketType type, rtc::Socket::Option o, int val); |
| 168 | 169 |
| 169 SrtpFilter* srtp_filter() { return &srtp_filter_; } | 170 SrtpFilter* srtp_filter() { return &srtp_filter_; } |
| 170 | 171 |
| 171 protected: | 172 protected: |
| 172 virtual MediaChannel* media_channel() const { return media_channel_; } | 173 virtual MediaChannel* media_channel() const { return media_channel_; } |
| 173 // Sets the |transport_channel_| (and |rtcp_transport_channel_|, if |rtcp_| is | 174 // Sets the |transport_channel_| (and |rtcp_transport_channel_|, if |rtcp_| is |
| 174 // true). Gets the transport channels from |transport_controller_|. | 175 // true). Gets the transport channels from |transport_controller_|. |
| 175 bool SetTransport_n(const std::string& transport_name); | 176 bool SetTransport_n(const std::string& transport_name); |
| 176 | 177 |
| 177 void SetTransportChannel_n(TransportChannel* transport); | 178 void SetTransportChannel_n(TransportChannel* transport) |
| 179 RTC_MUST_RUN_ON(network_thread_); |
| 178 void SetRtcpTransportChannel_n(TransportChannel* transport, | 180 void SetRtcpTransportChannel_n(TransportChannel* transport, |
| 179 bool update_writablity); | 181 bool update_writablity); |
| 180 | 182 |
| 181 bool was_ever_writable() const { return was_ever_writable_; } | 183 bool was_ever_writable() const { return was_ever_writable_; } |
| 182 void set_local_content_direction(MediaContentDirection direction) { | 184 void set_local_content_direction(MediaContentDirection direction) { |
| 183 local_content_direction_ = direction; | 185 local_content_direction_ = direction; |
| 184 } | 186 } |
| 185 void set_remote_content_direction(MediaContentDirection direction) { | 187 void set_remote_content_direction(MediaContentDirection direction) { |
| 186 remote_content_direction_ = direction; | 188 remote_content_direction_ = direction; |
| 187 } | 189 } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 325 |
| 324 rtc::Thread* const worker_thread_; | 326 rtc::Thread* const worker_thread_; |
| 325 rtc::Thread* const network_thread_; | 327 rtc::Thread* const network_thread_; |
| 326 rtc::AsyncInvoker invoker_; | 328 rtc::AsyncInvoker invoker_; |
| 327 | 329 |
| 328 const std::string content_name_; | 330 const std::string content_name_; |
| 329 std::unique_ptr<ConnectionMonitor> connection_monitor_; | 331 std::unique_ptr<ConnectionMonitor> connection_monitor_; |
| 330 | 332 |
| 331 // Transport related members that should be accessed from network thread. | 333 // Transport related members that should be accessed from network thread. |
| 332 TransportController* const transport_controller_; | 334 TransportController* const transport_controller_; |
| 333 std::string transport_name_; | 335 std::string transport_name_ RTC_MUST_BE_ACCESSED_FROM(network_thread_); |
| 334 bool rtcp_transport_enabled_; | 336 bool rtcp_transport_enabled_; |
| 335 TransportChannel* transport_channel_; | 337 TransportChannel* transport_channel_; |
| 336 std::vector<std::pair<rtc::Socket::Option, int> > socket_options_; | 338 std::vector<std::pair<rtc::Socket::Option, int> > socket_options_; |
| 337 TransportChannel* rtcp_transport_channel_; | 339 TransportChannel* rtcp_transport_channel_; |
| 338 std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_; | 340 std::vector<std::pair<rtc::Socket::Option, int> > rtcp_socket_options_; |
| 339 SrtpFilter srtp_filter_; | 341 SrtpFilter srtp_filter_; |
| 340 RtcpMuxFilter rtcp_mux_filter_; | 342 RtcpMuxFilter rtcp_mux_filter_; |
| 341 BundleFilter bundle_filter_; | 343 BundleFilter bundle_filter_; |
| 342 bool rtp_ready_to_send_; | 344 bool rtp_ready_to_send_; |
| 343 bool rtcp_ready_to_send_; | 345 bool rtcp_ready_to_send_; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 // SetSendParameters. | 659 // SetSendParameters. |
| 658 DataSendParameters last_send_params_; | 660 DataSendParameters last_send_params_; |
| 659 // Last DataRecvParameters sent down to the media_channel() via | 661 // Last DataRecvParameters sent down to the media_channel() via |
| 660 // SetRecvParameters. | 662 // SetRecvParameters. |
| 661 DataRecvParameters last_recv_params_; | 663 DataRecvParameters last_recv_params_; |
| 662 }; | 664 }; |
| 663 | 665 |
| 664 } // namespace cricket | 666 } // namespace cricket |
| 665 | 667 |
| 666 #endif // WEBRTC_PC_CHANNEL_H_ | 668 #endif // WEBRTC_PC_CHANNEL_H_ |
| OLD | NEW |