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

Unified Diff: webrtc/api/rtpreceiver.cc

Issue 1790633002: Propagate MediaStreamSource state to video tracks the same way as audio. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@refactor_track
Patch Set: Fix bug with wrong enum values. 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/objc/RTCMediaStreamTrack.mm ('k') | webrtc/api/videotrack.h » ('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 15906120f6d431fbb3e0bec5406062163630c18e..f8b505781a2bc7b61579e032563046ac543692e6 100644
--- a/webrtc/api/rtpreceiver.cc
+++ b/webrtc/api/rtpreceiver.cc
@@ -81,10 +81,6 @@ VideoRtpReceiver::VideoRtpReceiver(MediaStreamInterface* stream,
rtc::Thread::Current(),
VideoTrack::Create(track_id, source_.get()))) {
source_->SetState(MediaSourceInterface::kLive);
- // TODO(perkj): It should be enough to set the source state. All tracks
- // belonging to the same source should get its state from the source.
- // I.e. if a track has been cloned from a remote source.
- track_->set_state(webrtc::MediaStreamTrackInterface::kLive);
provider_->SetVideoPlayout(ssrc_, true, &broadcaster_);
stream->AddTrack(track_);
}
@@ -102,9 +98,6 @@ void VideoRtpReceiver::Stop() {
}
source_->SetState(MediaSourceInterface::kEnded);
source_->OnSourceDestroyed();
- // TODO(perkj): It should be enough to set the source state. All tracks
- // belonging to the same source should get its state from the source.
- track_->set_state(MediaStreamTrackInterface::kEnded);
provider_->SetVideoPlayout(ssrc_, false, nullptr);
provider_ = nullptr;
}
« no previous file with comments | « webrtc/api/objc/RTCMediaStreamTrack.mm ('k') | webrtc/api/videotrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698