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

Side by Side Diff: webrtc/api/peerconnection_unittest.cc

Issue 2505173002: Added a callback function OnAddTrack to PeerConnectionObserver (Closed)
Patch Set: CR comments. Remove unrelated file changes. Created 4 years, 1 month 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 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 remote_stream->GetVideoTracks()[track_index]->id(); 409 remote_stream->GetVideoTracks()[track_index]->id();
410 if (fake_video_renderers_.find(id) != fake_video_renderers_.end()) { 410 if (fake_video_renderers_.find(id) != fake_video_renderers_.end()) {
411 continue; 411 continue;
412 } 412 }
413 fake_video_renderers_[id].reset(new webrtc::FakeVideoTrackRenderer( 413 fake_video_renderers_[id].reset(new webrtc::FakeVideoTrackRenderer(
414 remote_stream->GetVideoTracks()[track_index])); 414 remote_stream->GetVideoTracks()[track_index]));
415 } 415 }
416 } 416 }
417 } 417 }
418 418
419 void OnAddTrack(
420 rtc::scoped_refptr<webrtc::RtpReceiverInterface> receiver,
421 std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams) override {}
honghaiz3 2016/11/17 01:19:02 You don't need this if the base class has implemen
Zhi Huang 2016/11/17 01:42:06 Done.
422
419 void SetVideoConstraints(const webrtc::FakeConstraints& video_constraint) { 423 void SetVideoConstraints(const webrtc::FakeConstraints& video_constraint) {
420 video_constraints_ = video_constraint; 424 video_constraints_ = video_constraint;
421 } 425 }
422 426
423 void AddMediaStream(bool audio, bool video) { 427 void AddMediaStream(bool audio, bool video) {
424 std::string stream_label = 428 std::string stream_label =
425 kStreamLabelBase + 429 kStreamLabelBase +
426 rtc::ToString<int>(static_cast<int>(pc()->local_streams()->count())); 430 rtc::ToString<int>(static_cast<int>(pc()->local_streams()->count()));
427 rtc::scoped_refptr<MediaStreamInterface> stream = 431 rtc::scoped_refptr<MediaStreamInterface> stream =
428 peer_connection_factory_->CreateLocalMediaStream(stream_label); 432 peer_connection_factory_->CreateLocalMediaStream(stream_label);
(...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2774 server.urls.push_back("turn:hostname2"); 2778 server.urls.push_back("turn:hostname2");
2775 servers.push_back(server); 2779 servers.push_back(server);
2776 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); 2780 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_));
2777 EXPECT_EQ(2U, turn_servers_.size()); 2781 EXPECT_EQ(2U, turn_servers_.size());
2778 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); 2782 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority);
2779 } 2783 }
2780 2784
2781 #endif // if !defined(THREAD_SANITIZER) 2785 #endif // if !defined(THREAD_SANITIZER)
2782 2786
2783 } // namespace 2787 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698