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

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

Issue 1640173004: 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, 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
« 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 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 InternalCreateDataChannel(label, &config)); 1949 InternalCreateDataChannel(label, &config));
1952 if (!channel.get()) { 1950 if (!channel.get()) {
1953 LOG(LS_ERROR) << "Failed to create DataChannel from the OPEN message."; 1951 LOG(LS_ERROR) << "Failed to create DataChannel from the OPEN message.";
1954 return; 1952 return;
1955 } 1953 }
1956 1954
1957 observer_->OnDataChannel( 1955 observer_->OnDataChannel(
1958 DataChannelProxy::Create(signaling_thread(), channel)); 1956 DataChannelProxy::Create(signaling_thread(), channel));
1959 } 1957 }
1960 1958
1961 void PeerConnection::OnFirstMediaPacketReceived() {
1962 RTC_DCHECK(signaling_thread()->IsCurrent());
1963 observer_->OnFirstMediaPacketReceived();
1964 }
1965
1966 RtpSenderInterface* PeerConnection::FindSenderById(const std::string& id) { 1959 RtpSenderInterface* PeerConnection::FindSenderById(const std::string& id) {
1967 auto it = 1960 auto it =
1968 std::find_if(senders_.begin(), senders_.end(), 1961 std::find_if(senders_.begin(), senders_.end(),
1969 [id](const rtc::scoped_refptr<RtpSenderInterface>& sender) { 1962 [id](const rtc::scoped_refptr<RtpSenderInterface>& sender) {
1970 return sender->id() == id; 1963 return sender->id() == id;
1971 }); 1964 });
1972 return it != senders_.end() ? it->get() : nullptr; 1965 return it != senders_.end() ? it->get() : nullptr;
1973 } 1966 }
1974 1967
1975 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator 1968 std::vector<rtc::scoped_refptr<RtpSenderInterface>>::iterator
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { 2015 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const {
2023 for (const auto& channel : sctp_data_channels_) { 2016 for (const auto& channel : sctp_data_channels_) {
2024 if (channel->id() == sid) { 2017 if (channel->id() == sid) {
2025 return channel; 2018 return channel;
2026 } 2019 }
2027 } 2020 }
2028 return nullptr; 2021 return nullptr;
2029 } 2022 }
2030 2023
2031 } // namespace webrtc 2024 } // 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