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

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

Issue 1522903002: Add a 'remote' property to MediaSourceInterface. Also adding an implementation to the relevant sour… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 const std::string& track_id) { 455 const std::string& track_id) {
456 return AddTrack<AudioTrackInterface, RemoteAudioTrack, AudioTrackProxy>( 456 return AddTrack<AudioTrackInterface, RemoteAudioTrack, AudioTrackProxy>(
457 stream, track_id, RemoteAudioSource::Create(ssrc, provider)); 457 stream, track_id, RemoteAudioSource::Create(ssrc, provider));
458 } 458 }
459 459
460 VideoTrackInterface* AddVideoTrack(webrtc::MediaStreamInterface* stream, 460 VideoTrackInterface* AddVideoTrack(webrtc::MediaStreamInterface* stream,
461 const std::string& track_id) { 461 const std::string& track_id) {
462 return AddTrack<VideoTrackInterface, VideoTrack, VideoTrackProxy>( 462 return AddTrack<VideoTrackInterface, VideoTrack, VideoTrackProxy>(
463 stream, track_id, 463 stream, track_id,
464 VideoSource::Create(channel_manager_, new RemoteVideoCapturer(), 464 VideoSource::Create(channel_manager_, new RemoteVideoCapturer(),
465 nullptr) 465 nullptr, true)
466 .get()); 466 .get());
467 } 467 }
468 468
469 private: 469 private:
470 template <typename TI, typename T, typename TP, typename S> 470 template <typename TI, typename T, typename TP, typename S>
471 TI* AddTrack(MediaStreamInterface* stream, 471 TI* AddTrack(MediaStreamInterface* stream,
472 const std::string& track_id, 472 const std::string& track_id,
473 const S& source) { 473 const S& source) {
474 rtc::scoped_refptr<TI> track( 474 rtc::scoped_refptr<TI> track(
475 TP::Create(signaling_thread_, T::Create(track_id, source))); 475 TP::Create(signaling_thread_, T::Create(track_id, source)));
(...skipping 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { 2020 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const {
2021 for (const auto& channel : sctp_data_channels_) { 2021 for (const auto& channel : sctp_data_channels_) {
2022 if (channel->id() == sid) { 2022 if (channel->id() == sid) {
2023 return channel; 2023 return channel;
2024 } 2024 }
2025 } 2025 }
2026 return nullptr; 2026 return nullptr;
2027 } 2027 }
2028 2028
2029 } // namespace webrtc 2029 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698