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

Side by Side Diff: talk/app/webrtc/peerconnection.cc

Issue 1647483004: Revert of Adding "first packet received" notification to PeerConnectionObserver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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/peerconnection.h ('k') | talk/app/webrtc/peerconnection_unittest.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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 session_->SignalVoiceChannelDestroyed.connect( 656 session_->SignalVoiceChannelDestroyed.connect(
657 this, &PeerConnection::OnVoiceChannelDestroyed); 657 this, &PeerConnection::OnVoiceChannelDestroyed);
658 session_->SignalVideoChannelDestroyed.connect( 658 session_->SignalVideoChannelDestroyed.connect(
659 this, &PeerConnection::OnVideoChannelDestroyed); 659 this, &PeerConnection::OnVideoChannelDestroyed);
660 session_->SignalDataChannelCreated.connect( 660 session_->SignalDataChannelCreated.connect(
661 this, &PeerConnection::OnDataChannelCreated); 661 this, &PeerConnection::OnDataChannelCreated);
662 session_->SignalDataChannelDestroyed.connect( 662 session_->SignalDataChannelDestroyed.connect(
663 this, &PeerConnection::OnDataChannelDestroyed); 663 this, &PeerConnection::OnDataChannelDestroyed);
664 session_->SignalDataChannelOpenMessage.connect( 664 session_->SignalDataChannelOpenMessage.connect(
665 this, &PeerConnection::OnDataChannelOpenMessage); 665 this, &PeerConnection::OnDataChannelOpenMessage);
666 session_->SignalFirstMediaPacketReceived.connect(
667 this, &PeerConnection::OnFirstMediaPacketReceived);
668 return true; 666 return true;
669 } 667 }
670 668
671 rtc::scoped_refptr<StreamCollectionInterface> 669 rtc::scoped_refptr<StreamCollectionInterface>
672 PeerConnection::local_streams() { 670 PeerConnection::local_streams() {
673 return local_streams_; 671 return local_streams_;
674 } 672 }
675 673
676 rtc::scoped_refptr<StreamCollectionInterface> 674 rtc::scoped_refptr<StreamCollectionInterface>
677 PeerConnection::remote_streams() { 675 PeerConnection::remote_streams() {
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 InternalCreateDataChannel(label, &config)); 2022 InternalCreateDataChannel(label, &config));
2025 if (!channel.get()) { 2023 if (!channel.get()) {
2026 LOG(LS_ERROR) << "Failed to create DataChannel from the OPEN message."; 2024 LOG(LS_ERROR) << "Failed to create DataChannel from the OPEN message.";
2027 return; 2025 return;
2028 } 2026 }
2029 2027
2030 observer_->OnDataChannel( 2028 observer_->OnDataChannel(
2031 DataChannelProxy::Create(signaling_thread(), channel)); 2029 DataChannelProxy::Create(signaling_thread(), channel));
2032 } 2030 }
2033 2031
2034 void PeerConnection::OnFirstMediaPacketReceived() {
2035 RTC_DCHECK(signaling_thread()->IsCurrent());
2036 observer_->OnFirstMediaPacketReceived();
2037 }
2038
2039 RtpSenderInterface* PeerConnection::FindSenderById(const std::string& id) { 2032 RtpSenderInterface* PeerConnection::FindSenderById(const std::string& id) {
2040 auto it = 2033 auto it =
2041 std::find_if(senders_.begin(), senders_.end(), 2034 std::find_if(senders_.begin(), senders_.end(),
2042 [id](const rtc::scoped_refptr<RtpSenderInterface>& sender) { 2035 [id](const rtc::scoped_refptr<RtpSenderInterface>& sender) {
2043 return sender->id() == id; 2036 return sender->id() == id;
2044 }); 2037 });
2045 return it != senders_.end() ? it->get() : nullptr; 2038 return it != senders_.end() ? it->get() : nullptr;
2046 } 2039 }
2047 2040
2048 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator 2041 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { 2088 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const {
2096 for (const auto& channel : sctp_data_channels_) { 2089 for (const auto& channel : sctp_data_channels_) {
2097 if (channel->id() == sid) { 2090 if (channel->id() == sid) {
2098 return channel; 2091 return channel;
2099 } 2092 }
2100 } 2093 }
2101 return nullptr; 2094 return nullptr;
2102 } 2095 }
2103 2096
2104 } // namespace webrtc 2097 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnection.h ('k') | talk/app/webrtc/peerconnection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698