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

Unified Diff: webrtc/api/rtpreceiver.cc

Issue 1816143002: Removed MediaStreamTrackInterface::set_state (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@track_state_listen_on_source2
Patch Set: Rebased Created 4 years, 9 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 | « webrtc/api/rtpreceiver.h ('k') | webrtc/api/rtpsenderreceiver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/rtpreceiver.cc
diff --git a/webrtc/api/rtpreceiver.cc b/webrtc/api/rtpreceiver.cc
index f8b505781a2bc7b61579e032563046ac543692e6..0150dfd546c25e3b238b61a22e8ed58adf7dbd0d 100644
--- a/webrtc/api/rtpreceiver.cc
+++ b/webrtc/api/rtpreceiver.cc
@@ -11,22 +11,28 @@
#include "webrtc/api/rtpreceiver.h"
#include "webrtc/api/mediastreamtrackproxy.h"
+#include "webrtc/api/audiotrack.h"
#include "webrtc/api/videotrack.h"
namespace webrtc {
-AudioRtpReceiver::AudioRtpReceiver(AudioTrackInterface* track,
+AudioRtpReceiver::AudioRtpReceiver(MediaStreamInterface* stream,
+ const std::string& track_id,
uint32_t ssrc,
AudioProviderInterface* provider)
- : id_(track->id()),
- track_(track),
+ : id_(track_id),
ssrc_(ssrc),
provider_(provider),
- cached_track_enabled_(track->enabled()) {
+ track_(AudioTrackProxy::Create(
+ rtc::Thread::Current(),
+ AudioTrack::Create(track_id,
+ RemoteAudioSource::Create(ssrc, provider)))),
+ cached_track_enabled_(track_->enabled()) {
RTC_DCHECK(track_->GetSource()->remote());
track_->RegisterObserver(this);
track_->GetSource()->RegisterAudioObserver(this);
Reconfigure();
+ stream->AddTrack(track_);
}
AudioRtpReceiver::~AudioRtpReceiver() {
« no previous file with comments | « webrtc/api/rtpreceiver.h ('k') | webrtc/api/rtpsenderreceiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698