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

Unified Diff: webrtc/video/video_receive_stream.cc

Issue 2886993005: Introduce RtpStreamReceiver and RtpStreamReceiverControllerInterface. (Closed)
Patch Set: Protect construction of FlexfecReceiveStreamImpl. Created 3 years, 6 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
Index: webrtc/video/video_receive_stream.cc
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc
index 9eceb009c421ee44d8a113b9f7ebbb5cc3159fb4..acc497b616433e771a2259247f1360cbd1619095 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -21,6 +21,7 @@
#include "webrtc/base/logging.h"
#include "webrtc/base/optional.h"
#include "webrtc/base/trace_event.h"
+#include "webrtc/call/rtp_stream_receiver_controller_interface.h"
#include "webrtc/common_types.h"
#include "webrtc/common_video/h264/profile_level_id.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
@@ -168,11 +169,13 @@ VideoCodec CreateDecoderVideoCodec(const VideoReceiveStream::Decoder& decoder) {
namespace internal {
-VideoReceiveStream::VideoReceiveStream(int num_cpu_cores,
- PacketRouter* packet_router,
- VideoReceiveStream::Config config,
- ProcessThread* process_thread,
- CallStats* call_stats)
+VideoReceiveStream::VideoReceiveStream(
+ RtpStreamReceiverControllerInterface* receiver_controller,
+ int num_cpu_cores,
+ PacketRouter* packet_router,
+ VideoReceiveStream::Config config,
+ ProcessThread* process_thread,
+ CallStats* call_stats)
: transport_adapter_(config.rtcp_send_transport),
config_(std::move(config)),
num_cpu_cores_(num_cpu_cores),
@@ -222,6 +225,14 @@ VideoReceiveStream::VideoReceiveStream(int num_cpu_cores,
clock_, jitter_estimator_.get(), timing_.get(), &stats_proxy_));
process_thread_->RegisterModule(&rtp_stream_sync_, RTC_FROM_HERE);
+
+ // Register with RtpStreamReceiverController.
+ media_receiver_ = receiver_controller->CreateReceiver(
+ config_.rtp.remote_ssrc, &rtp_video_stream_receiver_);
+ if (config.rtp.rtx_ssrc) {
+ rtx_receiver_ = receiver_controller->CreateReceiver(
+ config_.rtp.rtx_ssrc, &rtp_video_stream_receiver_);
+ }
}
VideoReceiveStream::~VideoReceiveStream() {
@@ -241,10 +252,6 @@ bool VideoReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) {
return rtp_video_stream_receiver_.DeliverRtcp(packet, length);
}
-void VideoReceiveStream::OnRtpPacket(const RtpPacketReceived& packet) {
- rtp_video_stream_receiver_.OnRtpPacket(packet);
-}
-
void VideoReceiveStream::SetSync(Syncable* audio_syncable) {
RTC_DCHECK_RUN_ON(&worker_thread_checker_);
rtp_stream_sync_.ConfigureSync(audio_syncable);

Powered by Google App Engine
This is Rietveld 408576698