| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 bool SetTransportChannels_w(BaseSession* session, bool rtcp); | 184 bool SetTransportChannels_w(BaseSession* session, bool rtcp); |
| 185 void set_transport_channel(TransportChannel* transport); | 185 void set_transport_channel(TransportChannel* transport); |
| 186 void set_rtcp_transport_channel(TransportChannel* transport); | 186 void set_rtcp_transport_channel(TransportChannel* transport); |
| 187 bool was_ever_writable() const { return was_ever_writable_; } | 187 bool was_ever_writable() const { return was_ever_writable_; } |
| 188 void set_local_content_direction(MediaContentDirection direction) { | 188 void set_local_content_direction(MediaContentDirection direction) { |
| 189 local_content_direction_ = direction; | 189 local_content_direction_ = direction; |
| 190 } | 190 } |
| 191 void set_remote_content_direction(MediaContentDirection direction) { | 191 void set_remote_content_direction(MediaContentDirection direction) { |
| 192 remote_content_direction_ = direction; | 192 remote_content_direction_ = direction; |
| 193 } | 193 } |
| 194 void set_secure_required(bool secure_required) { |
| 195 secure_required_ = secure_required; |
| 196 } |
| 194 bool IsReadyToReceive() const; | 197 bool IsReadyToReceive() const; |
| 195 bool IsReadyToSend() const; | 198 bool IsReadyToSend() const; |
| 196 rtc::Thread* signaling_thread() { return session_->signaling_thread(); } | 199 rtc::Thread* signaling_thread() { return session_->signaling_thread(); } |
| 197 SrtpFilter* srtp_filter() { return &srtp_filter_; } | 200 SrtpFilter* srtp_filter() { return &srtp_filter_; } |
| 198 bool rtcp() const { return rtcp_; } | 201 bool rtcp() const { return rtcp_; } |
| 199 | 202 |
| 200 void ConnectToTransportChannel(TransportChannel* tc); | 203 void ConnectToTransportChannel(TransportChannel* tc); |
| 201 void DisconnectFromTransportChannel(TransportChannel* tc); | 204 void DisconnectFromTransportChannel(TransportChannel* tc); |
| 202 | 205 |
| 203 void FlushRtcpMessages(); | 206 void FlushRtcpMessages(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 | 253 |
| 251 // Gets the content info appropriate to the channel (audio or video). | 254 // Gets the content info appropriate to the channel (audio or video). |
| 252 virtual const ContentInfo* GetFirstContent( | 255 virtual const ContentInfo* GetFirstContent( |
| 253 const SessionDescription* sdesc) = 0; | 256 const SessionDescription* sdesc) = 0; |
| 254 bool UpdateLocalStreams_w(const std::vector<StreamParams>& streams, | 257 bool UpdateLocalStreams_w(const std::vector<StreamParams>& streams, |
| 255 ContentAction action, | 258 ContentAction action, |
| 256 std::string* error_desc); | 259 std::string* error_desc); |
| 257 bool UpdateRemoteStreams_w(const std::vector<StreamParams>& streams, | 260 bool UpdateRemoteStreams_w(const std::vector<StreamParams>& streams, |
| 258 ContentAction action, | 261 ContentAction action, |
| 259 std::string* error_desc); | 262 std::string* error_desc); |
| 260 bool SetBaseLocalContent_w(const MediaContentDescription* content, | |
| 261 ContentAction action, | |
| 262 std::string* error_desc); | |
| 263 virtual bool SetLocalContent_w(const MediaContentDescription* content, | 263 virtual bool SetLocalContent_w(const MediaContentDescription* content, |
| 264 ContentAction action, | 264 ContentAction action, |
| 265 std::string* error_desc) = 0; | 265 std::string* error_desc) = 0; |
| 266 bool SetBaseRemoteContent_w(const MediaContentDescription* content, | |
| 267 ContentAction action, | |
| 268 std::string* error_desc); | |
| 269 virtual bool SetRemoteContent_w(const MediaContentDescription* content, | 266 virtual bool SetRemoteContent_w(const MediaContentDescription* content, |
| 270 ContentAction action, | 267 ContentAction action, |
| 271 std::string* error_desc) = 0; | 268 std::string* error_desc) = 0; |
| 269 bool SetRtpTransportParameters_w(const MediaContentDescription* content, |
| 270 ContentAction action, |
| 271 ContentSource src, |
| 272 std::string* error_desc); |
| 272 | 273 |
| 273 // Helper method to get RTP Absoulute SendTime extension header id if | 274 // Helper method to get RTP Absoulute SendTime extension header id if |
| 274 // present in remote supported extensions list. | 275 // present in remote supported extensions list. |
| 275 void MaybeCacheRtpAbsSendTimeHeaderExtension( | 276 void MaybeCacheRtpAbsSendTimeHeaderExtension( |
| 276 const std::vector<RtpHeaderExtension>& extensions); | 277 const std::vector<RtpHeaderExtension>& extensions); |
| 277 | 278 |
| 278 bool SetRecvRtpHeaderExtensions_w(const MediaContentDescription* content, | |
| 279 MediaChannel* media_channel, | |
| 280 std::string* error_desc); | |
| 281 bool SetSendRtpHeaderExtensions_w(const MediaContentDescription* content, | |
| 282 MediaChannel* media_channel, | |
| 283 std::string* error_desc); | |
| 284 | |
| 285 bool CheckSrtpConfig(const std::vector<CryptoParams>& cryptos, | 279 bool CheckSrtpConfig(const std::vector<CryptoParams>& cryptos, |
| 286 bool* dtls, | 280 bool* dtls, |
| 287 std::string* error_desc); | 281 std::string* error_desc); |
| 288 bool SetSrtp_w(const std::vector<CryptoParams>& params, | 282 bool SetSrtp_w(const std::vector<CryptoParams>& params, |
| 289 ContentAction action, | 283 ContentAction action, |
| 290 ContentSource src, | 284 ContentSource src, |
| 291 std::string* error_desc); | 285 std::string* error_desc); |
| 292 void ActivateRtcpMux_w(); | 286 void ActivateRtcpMux_w(); |
| 293 bool SetRtcpMux_w(bool enable, | 287 bool SetRtcpMux_w(bool enable, |
| 294 ContentAction action, | 288 ContentAction action, |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info); | 435 void OnAudioMonitorUpdate(AudioMonitor* monitor, const AudioInfo& info); |
| 442 void OnVoiceChannelError(uint32 ssrc, VoiceMediaChannel::Error error); | 436 void OnVoiceChannelError(uint32 ssrc, VoiceMediaChannel::Error error); |
| 443 void SendLastMediaError(); | 437 void SendLastMediaError(); |
| 444 void OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode, SrtpFilter::Error error); | 438 void OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode, SrtpFilter::Error error); |
| 445 | 439 |
| 446 static const int kEarlyMediaTimeout = 1000; | 440 static const int kEarlyMediaTimeout = 1000; |
| 447 bool received_media_; | 441 bool received_media_; |
| 448 rtc::scoped_ptr<VoiceMediaMonitor> media_monitor_; | 442 rtc::scoped_ptr<VoiceMediaMonitor> media_monitor_; |
| 449 rtc::scoped_ptr<AudioMonitor> audio_monitor_; | 443 rtc::scoped_ptr<AudioMonitor> audio_monitor_; |
| 450 rtc::scoped_ptr<TypingMonitor> typing_monitor_; | 444 rtc::scoped_ptr<TypingMonitor> typing_monitor_; |
| 445 |
| 446 // Last AudioSendParameters sent down to the media_channel() via |
| 447 // SetSendParameters. |
| 448 AudioSendParameters last_send_params_; |
| 449 // Last AudioRecvParameters sent down to the media_channel() via |
| 450 // SetRecvParameters. |
| 451 AudioRecvParameters last_recv_params_; |
| 451 }; | 452 }; |
| 452 | 453 |
| 453 // VideoChannel is a specialization for video. | 454 // VideoChannel is a specialization for video. |
| 454 class VideoChannel : public BaseChannel { | 455 class VideoChannel : public BaseChannel { |
| 455 public: | 456 public: |
| 456 VideoChannel(rtc::Thread* thread, MediaEngineInterface* media_engine, | 457 VideoChannel(rtc::Thread* thread, MediaEngineInterface* media_engine, |
| 457 VideoMediaChannel* channel, BaseSession* session, | 458 VideoMediaChannel* channel, BaseSession* session, |
| 458 const std::string& content_name, bool rtcp); | 459 const std::string& content_name, bool rtcp); |
| 459 ~VideoChannel(); | 460 ~VideoChannel(); |
| 460 bool Init(); | 461 bool Init(); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 bool GetLocalSsrc(const VideoCapturer* capturer, uint32* ssrc); | 532 bool GetLocalSsrc(const VideoCapturer* capturer, uint32* ssrc); |
| 532 | 533 |
| 533 void OnVideoChannelError(uint32 ssrc, VideoMediaChannel::Error error); | 534 void OnVideoChannelError(uint32 ssrc, VideoMediaChannel::Error error); |
| 534 void OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode, SrtpFilter::Error error); | 535 void OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode, SrtpFilter::Error error); |
| 535 | 536 |
| 536 VideoRenderer* renderer_; | 537 VideoRenderer* renderer_; |
| 537 ScreencastMap screencast_capturers_; | 538 ScreencastMap screencast_capturers_; |
| 538 rtc::scoped_ptr<VideoMediaMonitor> media_monitor_; | 539 rtc::scoped_ptr<VideoMediaMonitor> media_monitor_; |
| 539 | 540 |
| 540 rtc::WindowEvent previous_we_; | 541 rtc::WindowEvent previous_we_; |
| 542 |
| 543 // Last VideoSendParameters sent down to the media_channel() via |
| 544 // SetSendParameters. |
| 545 VideoSendParameters last_send_params_; |
| 546 // Last VideoRecvParameters sent down to the media_channel() via |
| 547 // SetRecvParameters. |
| 548 VideoRecvParameters last_recv_params_; |
| 541 }; | 549 }; |
| 542 | 550 |
| 543 // DataChannel is a specialization for data. | 551 // DataChannel is a specialization for data. |
| 544 class DataChannel : public BaseChannel { | 552 class DataChannel : public BaseChannel { |
| 545 public: | 553 public: |
| 546 DataChannel(rtc::Thread* thread, | 554 DataChannel(rtc::Thread* thread, |
| 547 DataMediaChannel* media_channel, | 555 DataMediaChannel* media_channel, |
| 548 BaseSession* session, | 556 BaseSession* session, |
| 549 const std::string& content_name, | 557 const std::string& content_name, |
| 550 bool rtcp); | 558 bool rtcp); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 rtc::scoped_ptr<DataMediaMonitor> media_monitor_; | 662 rtc::scoped_ptr<DataMediaMonitor> media_monitor_; |
| 655 // TODO(pthatcher): Make a separate SctpDataChannel and | 663 // TODO(pthatcher): Make a separate SctpDataChannel and |
| 656 // RtpDataChannel instead of using this. | 664 // RtpDataChannel instead of using this. |
| 657 DataChannelType data_channel_type_; | 665 DataChannelType data_channel_type_; |
| 658 bool ready_to_send_data_; | 666 bool ready_to_send_data_; |
| 659 }; | 667 }; |
| 660 | 668 |
| 661 } // namespace cricket | 669 } // namespace cricket |
| 662 | 670 |
| 663 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ | 671 #endif // TALK_SESSION_MEDIA_CHANNEL_H_ |
| OLD | NEW |