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

Unified Diff: talk/app/webrtc/rtpsender.cc

Issue 1563403002: Adding AddTrack/RemoveTrack to native PeerConnection API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding default implementation for new methods. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/app/webrtc/rtpsender.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/rtpsender.cc
diff --git a/talk/app/webrtc/rtpsender.cc b/talk/app/webrtc/rtpsender.cc
index c0d23a0503cc08fb5a7fd8b301f8bd99bf076bd8..f9ed4c30cc31d325d5acb7cc3bb220433a6df47b 100644
--- a/talk/app/webrtc/rtpsender.cc
+++ b/talk/app/webrtc/rtpsender.cc
@@ -75,6 +75,21 @@ AudioRtpSender::AudioRtpSender(AudioTrackInterface* track,
track_->AddSink(sink_adapter_.get());
}
+AudioRtpSender::AudioRtpSender(AudioTrackInterface* track,
+ AudioProviderInterface* provider,
+ StatsCollector* stats)
+ : id_(track->id()),
+ stream_id_(rtc::CreateRandomUuid()),
+ provider_(provider),
+ stats_(stats),
+ track_(track),
+ cached_track_enabled_(track->enabled()),
+ sink_adapter_(new LocalAudioSinkAdapter()) {
+ RTC_DCHECK(provider != nullptr);
+ track_->RegisterObserver(this);
+ track_->AddSink(sink_adapter_.get());
+}
+
AudioRtpSender::AudioRtpSender(AudioProviderInterface* provider,
StatsCollector* stats)
: id_(rtc::CreateRandomUuid()),
@@ -211,6 +226,17 @@ VideoRtpSender::VideoRtpSender(VideoTrackInterface* track,
track_->RegisterObserver(this);
}
+VideoRtpSender::VideoRtpSender(VideoTrackInterface* track,
+ VideoProviderInterface* provider)
+ : id_(track->id()),
+ stream_id_(rtc::CreateRandomUuid()),
+ provider_(provider),
+ track_(track),
+ cached_track_enabled_(track->enabled()) {
+ RTC_DCHECK(provider != nullptr);
+ track_->RegisterObserver(this);
+}
+
VideoRtpSender::VideoRtpSender(VideoProviderInterface* provider)
: id_(rtc::CreateRandomUuid()),
stream_id_(rtc::CreateRandomUuid()),
« no previous file with comments | « talk/app/webrtc/rtpsender.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698