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

Unified Diff: webrtc/video/video_send_stream.cc

Issue 1758603003: Move RTP module send status outside of ViEChannel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | webrtc/video/vie_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream.cc
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc
index 241a0de34563d06111d804d1bd88d64654c3b494..f1f9d871538a9d78216dd5839734bbacb51a56e2 100644
--- a/webrtc/video/video_send_stream.cc
+++ b/webrtc/video/video_send_stream.cc
@@ -333,18 +333,21 @@ VideoCaptureInput* VideoSendStream::Input() {
}
void VideoSendStream::Start() {
+ if (payload_router_.active())
+ return;
vie_encoder_.Pause();
- if (vie_channel_.StartSend() == 0) {
- // Was not already started, trigger a keyframe.
- vie_encoder_.SendKeyFrame();
- }
+ payload_router_.set_active(true);
+ // Was not already started, trigger a keyframe.
+ vie_encoder_.SendKeyFrame();
vie_encoder_.Restart();
vie_receiver_->StartReceive();
}
void VideoSendStream::Stop() {
+ if (!payload_router_.active())
+ return;
// TODO(pbos): Make sure the encoder stops here.
- vie_channel_.StopSend();
+ payload_router_.set_active(false);
vie_receiver_->StopReceive();
}
@@ -613,10 +616,10 @@ bool VideoSendStream::SetSendCodec(VideoCodec video_codec) {
return false;
}
- if (vie_channel_.SetSendCodec(video_codec, false) != 0) {
- LOG(LS_ERROR) << "Failed to set send codec.";
- return false;
- }
+ size_t num_streams = video_codec.numberOfSimulcastStreams > 0
+ ? video_codec.numberOfSimulcastStreams
+ : 1;
+ payload_router_.SetSendingRtpModules(num_streams);
// Restart the media flow
vie_encoder_.Restart();
« no previous file with comments | « no previous file | webrtc/video/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698