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

Unified Diff: webrtc/call/rtx_receive_stream.cc

Issue 3008773002: Use RtxReceiveStream. (Closed)
Patch Set: Created 3 years, 4 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/call/rtx_receive_stream.cc
diff --git a/webrtc/call/rtx_receive_stream.cc b/webrtc/call/rtx_receive_stream.cc
index f08e3c3960168b7c22be975a7376c19d6e012e5b..1f093ef6d254b9a999fb4ce69d13424f5687040d 100644
--- a/webrtc/call/rtx_receive_stream.cc
+++ b/webrtc/call/rtx_receive_stream.cc
@@ -12,16 +12,18 @@
#include "webrtc/call/rtx_receive_stream.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h"
+#include "webrtc/rtc_base/logging.h"
namespace webrtc {
-RtxReceiveStream::RtxReceiveStream(
- RtpPacketSinkInterface* media_sink,
- std::map<int, int> rtx_payload_type_map,
- uint32_t media_ssrc)
+RtxReceiveStream::RtxReceiveStream(RtpPacketSinkInterface* media_sink,
+ std::map<int, int> associated_payload_types,
+ uint32_t media_ssrc)
: media_sink_(media_sink),
- rtx_payload_type_map_(std::move(rtx_payload_type_map)),
- media_ssrc_(media_ssrc) {}
+ associated_payload_types_(std::move(associated_payload_types)),
+ media_ssrc_(media_ssrc) {
+ RTC_DCHECK_GT(associated_payload_types_.size(), 0);
danilchap 2017/08/29 13:33:06 may be log a warning instead? while empty payload_
nisse-webrtc 2017/08/29 13:51:35 I can change to a warning. We also noticed a bug i
+}
RtxReceiveStream::~RtxReceiveStream() = default;
@@ -32,8 +34,11 @@ void RtxReceiveStream::OnRtpPacket(const RtpPacketReceived& rtx_packet) {
return;
}
- auto it = rtx_payload_type_map_.find(rtx_packet.PayloadType());
- if (it == rtx_payload_type_map_.end()) {
+ auto it = associated_payload_types_.find(rtx_packet.PayloadType());
+ if (it == associated_payload_types_.end()) {
+ LOG(LS_VERBOSE) << "Unknown payload type "
+ << static_cast<int>(rtx_packet.PayloadType())
+ << " on rtx ssrc " << rtx_packet.Ssrc();
return;
}
RtpPacketReceived media_packet;

Powered by Google App Engine
This is Rietveld 408576698