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

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

Powered by Google App Engine
This is Rietveld 408576698