Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Side by Side Diff: talk/app/webrtc/webrtcsession.h

Issue 1581693006: Adding "first packet received" notification to PeerConnectionObserver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing race condition in unit test. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/peerconnectioninterface.h ('k') | talk/app/webrtc/webrtcsession.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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*);
312 313
313 // For unit test. 314 // For unit test.
314 bool waiting_for_certificate_for_testing() const; 315 bool waiting_for_certificate_for_testing() const;
315 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate_for_testing(); 316 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate_for_testing();
316 317
317 void set_metrics_observer( 318 void set_metrics_observer(
318 webrtc::MetricsObserverInterface* metrics_observer) { 319 webrtc::MetricsObserverInterface* metrics_observer) {
319 metrics_observer_ = metrics_observer; 320 metrics_observer_ = metrics_observer;
320 } 321 }
321 322
322 // Called when voice_channel_, video_channel_ and data_channel_ are created 323 // Called when voice_channel_, video_channel_ and data_channel_ are created
323 // and destroyed. As a result of, for example, setting a new description. 324 // and destroyed. As a result of, for example, setting a new description.
324 sigslot::signal0<> SignalVoiceChannelCreated; 325 sigslot::signal0<> SignalVoiceChannelCreated;
325 sigslot::signal0<> SignalVoiceChannelDestroyed; 326 sigslot::signal0<> SignalVoiceChannelDestroyed;
326 sigslot::signal0<> SignalVideoChannelCreated; 327 sigslot::signal0<> SignalVideoChannelCreated;
327 sigslot::signal0<> SignalVideoChannelDestroyed; 328 sigslot::signal0<> SignalVideoChannelDestroyed;
328 sigslot::signal0<> SignalDataChannelCreated; 329 sigslot::signal0<> SignalDataChannelCreated;
329 sigslot::signal0<> SignalDataChannelDestroyed; 330 sigslot::signal0<> SignalDataChannelDestroyed;
330 // Called when the whole session is destroyed. 331 // Called when the whole session is destroyed.
331 sigslot::signal0<> SignalDestroyed; 332 sigslot::signal0<> SignalDestroyed;
332 333
333 // Called when a valid data channel OPEN message is received. 334 // Called when a valid data channel OPEN message is received.
334 // std::string represents the data channel label. 335 // std::string represents the data channel label.
335 sigslot::signal2<const std::string&, const InternalDataChannelInit&> 336 sigslot::signal2<const std::string&, const InternalDataChannelInit&>
336 SignalDataChannelOpenMessage; 337 SignalDataChannelOpenMessage;
337 338
339 // Called when the first RTP packet is received.
340 sigslot::signal0<> SignalFirstMediaPacketReceived;
341
338 private: 342 private:
339 // Indicates the type of SessionDescription in a call to SetLocalDescription 343 // Indicates the type of SessionDescription in a call to SetLocalDescription
340 // and SetRemoteDescription. 344 // and SetRemoteDescription.
341 enum Action { 345 enum Action {
342 kOffer, 346 kOffer,
343 kPrAnswer, 347 kPrAnswer,
344 kAnswer, 348 kAnswer,
345 }; 349 };
346 350
347 // Log session state. 351 // Log session state.
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 cricket::AudioOptions audio_options_; 515 cricket::AudioOptions audio_options_;
512 cricket::VideoOptions video_options_; 516 cricket::VideoOptions video_options_;
513 MetricsObserverInterface* metrics_observer_; 517 MetricsObserverInterface* metrics_observer_;
514 518
515 // Declares the bundle policy for the WebRTCSession. 519 // Declares the bundle policy for the WebRTCSession.
516 PeerConnectionInterface::BundlePolicy bundle_policy_; 520 PeerConnectionInterface::BundlePolicy bundle_policy_;
517 521
518 // Declares the RTCP mux policy for the WebRTCSession. 522 // Declares the RTCP mux policy for the WebRTCSession.
519 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_; 523 PeerConnectionInterface::RtcpMuxPolicy rtcp_mux_policy_;
520 524
525 bool has_received_media_packet_ = false;
526
521 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession); 527 RTC_DISALLOW_COPY_AND_ASSIGN(WebRtcSession);
522 }; 528 };
523 } // namespace webrtc 529 } // namespace webrtc
524 530
525 #endif // TALK_APP_WEBRTC_WEBRTCSESSION_H_ 531 #endif // TALK_APP_WEBRTC_WEBRTCSESSION_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnectioninterface.h ('k') | talk/app/webrtc/webrtcsession.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698