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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/flexfec_receiver.cc

Issue 2686273002: Rename flexfec AddAndProcessReceivedPacket --> OnRtpPacket. (Closed)
Patch Set: Rename AddAndProcessReceivedPacket --> OnRtpPacket. Update tests. Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 27 matching lines...) Expand all
38 recovered_packet_receiver_(recovered_packet_receiver), 38 recovered_packet_receiver_(recovered_packet_receiver),
39 clock_(Clock::GetRealTimeClock()), 39 clock_(Clock::GetRealTimeClock()),
40 last_recovered_packet_ms_(-1) { 40 last_recovered_packet_ms_(-1) {
41 // It's OK to create this object on a different thread/task queue than 41 // It's OK to create this object on a different thread/task queue than
42 // the one used during main operation. 42 // the one used during main operation.
43 sequence_checker_.Detach(); 43 sequence_checker_.Detach();
44 } 44 }
45 45
46 FlexfecReceiver::~FlexfecReceiver() = default; 46 FlexfecReceiver::~FlexfecReceiver() = default;
47 47
48 bool FlexfecReceiver::AddAndProcessReceivedPacket( 48 void FlexfecReceiver::OnRtpPacket(const RtpPacketReceived& packet) {
49 const RtpPacketReceived& packet) {
50 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); 49 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
51 if (!AddReceivedPacket(std::move(packet))) { 50 if (AddReceivedPacket(std::move(packet))) {
nisse-webrtc 2017/02/13 13:20:03 Does std::move make any sense here?
brandtr 2017/02/13 15:32:14 Nope, that is a mistake. Before, |packet| was pass
nisse-webrtc 2017/02/14 07:58:18 Deleted the move.
52 return false; 51 ProcessReceivedPackets();
brandtr 2017/02/13 15:32:13 I prefer having the general case outside the brace
nisse-webrtc 2017/02/14 07:58:18 Done.
53 } 52 }
54 return ProcessReceivedPackets();
55 } 53 }
56 54
57 FecPacketCounter FlexfecReceiver::GetPacketCounter() const { 55 FecPacketCounter FlexfecReceiver::GetPacketCounter() const {
58 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); 56 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
59 return packet_counter_; 57 return packet_counter_;
60 } 58 }
61 59
62 bool FlexfecReceiver::AddReceivedPacket(const RtpPacketReceived& packet) { 60 bool FlexfecReceiver::AddReceivedPacket(const RtpPacketReceived& packet) {
63 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); 61 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
64 62
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 ForwardErrorCorrection::ParseSsrc(recovered_packet->pkt->data); 143 ForwardErrorCorrection::ParseSsrc(recovered_packet->pkt->data);
146 LOG(LS_VERBOSE) << "Recovered media packet with SSRC: " << media_ssrc 144 LOG(LS_VERBOSE) << "Recovered media packet with SSRC: " << media_ssrc
147 << " from FlexFEC stream with SSRC: " << ssrc_ << "."; 145 << " from FlexFEC stream with SSRC: " << ssrc_ << ".";
148 last_recovered_packet_ms_ = now_ms; 146 last_recovered_packet_ms_ = now_ms;
149 } 147 }
150 } 148 }
151 return true; 149 return true;
152 } 150 }
153 151
154 } // namespace webrtc 152 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/flexfec_receiver.h ('k') | webrtc/modules/rtp_rtcp/source/flexfec_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698