OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 302 |
303 bool IceRestartPending() const; | 303 bool IceRestartPending() const; |
304 | 304 |
305 void ResetIceRestartLatch(); | 305 void ResetIceRestartLatch(); |
306 | 306 |
307 // Called when an RTCCertificate is generated or retrieved by | 307 // Called when an RTCCertificate is generated or retrieved by |
308 // WebRTCSessionDescriptionFactory. Should happen before setLocalDescription. | 308 // WebRTCSessionDescriptionFactory. Should happen before setLocalDescription. |
309 void OnCertificateReady( | 309 void OnCertificateReady( |
310 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 310 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
311 void OnDtlsSetupFailure(cricket::BaseChannel*, bool rtcp); | 311 void OnDtlsSetupFailure(cricket::BaseChannel*, bool rtcp); |
312 void OnChannelFirstPacketReceived(cricket::BaseChannel*); | |
313 | 312 |
314 // For unit test. | 313 // For unit test. |
315 bool waiting_for_certificate_for_testing() const; | 314 bool waiting_for_certificate_for_testing() const; |
316 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate_for_testing(); | 315 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate_for_testing(); |
317 | 316 |
318 void set_metrics_observer( | 317 void set_metrics_observer( |
319 webrtc::MetricsObserverInterface* metrics_observer) { | 318 webrtc::MetricsObserverInterface* metrics_observer) { |
320 metrics_observer_ = metrics_observer; | 319 metrics_observer_ = metrics_observer; |
321 } | 320 } |
322 | 321 |
323 // Called when voice_channel_, video_channel_ and data_channel_ are created | 322 // Called when voice_channel_, video_channel_ and data_channel_ are created |
324 // and destroyed. As a result of, for example, setting a new description. | 323 // and destroyed. As a result of, for example, setting a new description. |
325 sigslot::signal0<> SignalVoiceChannelCreated; | 324 sigslot::signal0<> SignalVoiceChannelCreated; |
326 sigslot::signal0<> SignalVoiceChannelDestroyed; | 325 sigslot::signal0<> SignalVoiceChannelDestroyed; |
327 sigslot::signal0<> SignalVideoChannelCreated; | 326 sigslot::signal0<> SignalVideoChannelCreated; |
328 sigslot::signal0<> SignalVideoChannelDestroyed; | 327 sigslot::signal0<> SignalVideoChannelDestroyed; |
329 sigslot::signal0<> SignalDataChannelCreated; | 328 sigslot::signal0<> SignalDataChannelCreated; |
330 sigslot::signal0<> SignalDataChannelDestroyed; | 329 sigslot::signal0<> SignalDataChannelDestroyed; |
331 // Called when the whole session is destroyed. | 330 // Called when the whole session is destroyed. |
332 sigslot::signal0<> SignalDestroyed; | 331 sigslot::signal0<> SignalDestroyed; |
333 | 332 |
334 // Called when a valid data channel OPEN message is received. | 333 // Called when a valid data channel OPEN message is received. |
335 // std::string represents the data channel label. | 334 // std::string represents the data channel label. |
336 sigslot::signal2<const std::string&, const InternalDataChannelInit&> | 335 sigslot::signal2<const std::string&, const InternalDataChannelInit&> |
337 SignalDataChannelOpenMessage; | 336 SignalDataChannelOpenMessage; |
338 | 337 |
339 // Called when the first RTP packet is received. | |
340 sigslot::signal0<> SignalFirstMediaPacketReceived; | |
341 | |
342 private: | 338 private: |
343 // Indicates the type of SessionDescription in a call to SetLocalDescription | 339 // Indicates the type of SessionDescription in a call to SetLocalDescription |
344 // and SetRemoteDescription. | 340 // and SetRemoteDescription. |
345 enum Action { | 341 enum Action { |
346 kOffer, | 342 kOffer, |
347 kPrAnswer, | 343 kPrAnswer, |
348 kAnswer, | 344 kAnswer, |
349 }; | 345 }; |
350 | 346 |
351 // Log session state. | 347 // Log session state. |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 cricket::AudioOptions audio_options_; | 511 cricket::AudioOptions audio_options_; |
516 cricket::VideoOptions video_options_; | 512 cricket::VideoOptions video_options_; |
517 MetricsObserverInterface* metrics_observer_; | 513 MetricsObserverInterface* metrics_observer_; |
518 | 514 |
519 // Declares the bundle policy for the WebRTCSession. | 515 // Declares the bundle policy for the WebRTCSession. |
520 PeerConnectionInterface::BundlePolicy bundle_policy_; | 516 PeerConnectionInterface::BundlePolicy bundle_policy_; |
521 | 517 |
522 // Declares the RTCP mux policy for the WebRTCSession. | 518 // Declares the RTCP mux policy for the WebRTCSession. |
523 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; | 519 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; |
524 | 520 |
525 bool has_received_media_packet_ = false; | |
526 | |
527 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); | 521 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); |
528 }; | 522 }; |
529 } // namespace webrtc | 523 } // namespace webrtc |
530 | 524 |
531 #endif // TALK_APP_WEBRTC_WEBRTCSESSION_H_ | 525 #endif // TALK_APP_WEBRTC_WEBRTCSESSION_H_ |
OLD | NEW |