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

Issue 2099243003: Use std::unique_ptr in ForwardErrorCorrection. (Closed)

Created:
4 years, 5 months ago by brandtr
Modified:
4 years, 4 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, zhuangzesen_agora.io, danilchap, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@flexfec-pt1a_mini-fixes-in-ULPFEC
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Use std::unique_ptr in ForwardErrorCorrection. This CL converts the ForwardErrorCorrection class to use std::unique_ptr for memory management, rather than manually delete'ing allocated memory. It further renames some data structures and types to distinguish between generated FEC packets (i.e. coming from the encode operation) and received FEC packets (i.e. coming in over the wire, intended for the decode operation). BUG=webrtc:5654 Committed: https://crrev.com/35c480cf18122a6533c3c934d8794049f97ffb09 Cr-Commit-Position: refs/heads/master@{#13687}

Patch Set 1 : Initial. #

Patch Set 2 : Rebase on top of FlexFEC pt. 1a. #

Total comments: 22

Patch Set 3 : Rebase on top of FlexFEC pt. 1a. #

Patch Set 4 : Feedback response. #

Total comments: 30

Patch Set 5 : Response to PS4 feedback. #

Total comments: 2

Patch Set 6 : Remove _list suffix from header as well. #

Total comments: 4

Patch Set 7 : Feedback response: const auto ref and int n #

Patch Set 8 : Rebase on top of master. #

Patch Set 9 : Lint fix and updated comment. #

Patch Set 10 : Rebase. #

Total comments: 20

Patch Set 11 : Lint fixes. #

Patch Set 12 : Response to feedback. #

Total comments: 8

Patch Set 13 : Feedback response. #

Total comments: 4

Patch Set 14 : Final nit from danilchap. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+315 lines, -386 lines) Patch
M webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +5 lines, -7 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 22 chunks +19 lines, -45 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/forward_error_correction.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +53 lines, -31 lines 3 comments Download
M webrtc/modules/rtp_rtcp/source/forward_error_correction.cc View 1 2 3 4 5 6 7 8 9 10 11 26 chunks +149 lines, -190 lines 2 comments Download
M webrtc/modules/rtp_rtcp/source/producer_fec.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/modules/rtp_rtcp/source/producer_fec.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +8 lines, -9 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_fec_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 31 chunks +52 lines, -62 lines 1 comment Download
M webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +27 lines, -41 lines 0 comments Download

Messages

Total messages: 40 (15 generated)
brandtr
4 years, 5 months ago (2016-06-29 06:35:25 UTC) #2
stefan-webrtc
I see now that many of the comments I had in the previous CL have ...
4 years, 5 months ago (2016-06-29 19:36:18 UTC) #3
brandtr
Addressed comments and rebased on top of "1a". https://codereview.webrtc.org/2099243003/diff/40001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc File webrtc/modules/rtp_rtcp/source/forward_error_correction.cc (right): https://codereview.webrtc.org/2099243003/diff/40001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode452 webrtc/modules/rtp_rtcp/source/forward_error_correction.cc:452: while ...
4 years, 5 months ago (2016-06-30 14:05:55 UTC) #6
stefan-webrtc
https://codereview.webrtc.org/2099243003/diff/40001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc File webrtc/modules/rtp_rtcp/source/forward_error_correction.cc (right): https://codereview.webrtc.org/2099243003/diff/40001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode560 webrtc/modules/rtp_rtcp/source/forward_error_correction.cc:560: while (it_p != protected_packets->end() && it_r != recovered_packets->end()) { ...
4 years, 5 months ago (2016-06-30 14:18:36 UTC) #7
danilchap
https://codereview.webrtc.org/2099243003/diff/80001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc File webrtc/modules/rtp_rtcp/source/forward_error_correction.cc (right): https://codereview.webrtc.org/2099243003/diff/80001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode115 webrtc/modules/rtp_rtcp/source/forward_error_correction.cc:115: for (auto& media_packet : media_packet_list) { const auto& https://codereview.webrtc.org/2099243003/diff/80001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode270 ...
4 years, 5 months ago (2016-06-30 19:58:38 UTC) #8
brandtr
https://codereview.webrtc.org/2099243003/diff/40001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc File webrtc/modules/rtp_rtcp/source/forward_error_correction.cc (right): https://codereview.webrtc.org/2099243003/diff/40001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode560 webrtc/modules/rtp_rtcp/source/forward_error_correction.cc:560: while (it_p != protected_packets->end() && it_r != recovered_packets->end()) { ...
4 years, 5 months ago (2016-07-01 06:49:07 UTC) #9
brandtr
https://codereview.webrtc.org/2099243003/diff/80001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc File webrtc/modules/rtp_rtcp/source/forward_error_correction.cc (right): https://codereview.webrtc.org/2099243003/diff/80001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode115 webrtc/modules/rtp_rtcp/source/forward_error_correction.cc:115: for (auto& media_packet : media_packet_list) { On 2016/06/30 19:58:37, ...
4 years, 5 months ago (2016-07-01 10:45:34 UTC) #14
danilchap
https://codereview.webrtc.org/2099243003/diff/80001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc File webrtc/modules/rtp_rtcp/source/forward_error_correction.cc (right): https://codereview.webrtc.org/2099243003/diff/80001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode773 webrtc/modules/rtp_rtcp/source/forward_error_correction.cc:773: RTC_DCHECK(recovered_packet_list->size() <= kMaxMediaPackets); On 2016/07/01 10:45:34, brandtr wrote: > ...
4 years, 5 months ago (2016-07-04 09:47:10 UTC) #16
stefan-webrtc
https://codereview.webrtc.org/2099243003/diff/180001/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc File webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc (right): https://codereview.webrtc.org/2099243003/diff/180001/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc#newcode237 webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc:237: for(auto& recovered_packet : recovered_packet_list_) { for (const auto& https://codereview.webrtc.org/2099243003/diff/220001/webrtc/modules/rtp_rtcp/source/rtp_fec_unittest.cc ...
4 years, 5 months ago (2016-07-05 08:51:38 UTC) #17
brandtr
Addressed feedback. https://codereview.webrtc.org/2099243003/diff/180001/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc File webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc (right): https://codereview.webrtc.org/2099243003/diff/180001/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc#newcode237 webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc:237: for(auto& recovered_packet : recovered_packet_list_) { On 2016/07/05 ...
4 years, 5 months ago (2016-07-05 10:28:00 UTC) #18
danilchap
https://codereview.webrtc.org/2099243003/diff/300001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc File webrtc/modules/rtp_rtcp/source/forward_error_correction.cc (right): https://codereview.webrtc.org/2099243003/diff/300001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode554 webrtc/modules/rtp_rtcp/source/forward_error_correction.cc:554: SortablePacket::LessThan cmp; less might be better name: cmp (compare) ...
4 years, 5 months ago (2016-07-19 12:58:37 UTC) #20
stefan-webrtc
https://codereview.webrtc.org/2099243003/diff/300001/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc File webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc (right): https://codereview.webrtc.org/2099243003/diff/300001/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc#newcode59 webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc:59: std::unique_ptr<ForwardErrorCorrection::Packet>( Should we std::move here too? https://codereview.webrtc.org/2099243003/diff/300001/webrtc/modules/rtp_rtcp/source/producer_fec.cc File webrtc/modules/rtp_rtcp/source/producer_fec.cc ...
4 years, 5 months ago (2016-07-20 09:50:35 UTC) #21
brandtr
Thanks for the feedback; comments have been addressed. Android and libfuzzer failures should be independent ...
4 years, 5 months ago (2016-07-21 09:04:20 UTC) #24
danilchap
https://codereview.webrtc.org/2099243003/diff/380001/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc File webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc (right): https://codereview.webrtc.org/2099243003/diff/380001/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc#newcode56 webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc:56: media_rtp_packets->push_back( may be memory management would be less confusing ...
4 years, 5 months ago (2016-07-21 13:06:31 UTC) #25
brandtr
https://codereview.webrtc.org/2099243003/diff/380001/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc File webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc (right): https://codereview.webrtc.org/2099243003/diff/380001/webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc#newcode56 webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc:56: media_rtp_packets->push_back( On 2016/07/21 13:06:30, danilchap wrote: > may be ...
4 years, 5 months ago (2016-07-21 14:42:19 UTC) #26
danilchap
lgtm % nit https://codereview.webrtc.org/2099243003/diff/400001/webrtc/modules/rtp_rtcp/source/forward_error_correction.h File webrtc/modules/rtp_rtcp/source/forward_error_correction.h (right): https://codereview.webrtc.org/2099243003/diff/400001/webrtc/modules/rtp_rtcp/source/forward_error_correction.h#newcode66 webrtc/modules/rtp_rtcp/source/forward_error_correction.h:66: public: the advantage of struct over ...
4 years, 5 months ago (2016-07-22 12:14:03 UTC) #27
brandtr
https://codereview.webrtc.org/2099243003/diff/400001/webrtc/modules/rtp_rtcp/source/forward_error_correction.h File webrtc/modules/rtp_rtcp/source/forward_error_correction.h (right): https://codereview.webrtc.org/2099243003/diff/400001/webrtc/modules/rtp_rtcp/source/forward_error_correction.h#newcode66 webrtc/modules/rtp_rtcp/source/forward_error_correction.h:66: public: On 2016/07/22 12:14:03, danilchap wrote: > the advantage ...
4 years, 5 months ago (2016-07-22 12:57:25 UTC) #28
stefan-webrtc
https://codereview.webrtc.org/2099243003/diff/420001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc File webrtc/modules/rtp_rtcp/source/forward_error_correction.cc (right): https://codereview.webrtc.org/2099243003/diff/420001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode557 webrtc/modules/rtp_rtcp/source/forward_error_correction.cc:557: SortablePacket::LessThan less_than; I might be mistaking myself, but if ...
4 years, 4 months ago (2016-08-01 11:29:51 UTC) #29
danilchap
https://codereview.webrtc.org/2099243003/diff/420001/webrtc/modules/rtp_rtcp/source/forward_error_correction.h File webrtc/modules/rtp_rtcp/source/forward_error_correction.h (right): https://codereview.webrtc.org/2099243003/diff/420001/webrtc/modules/rtp_rtcp/source/forward_error_correction.h#newcode67 webrtc/modules/rtp_rtcp/source/forward_error_correction.h:67: bool operator() (const S& first, const T& second); On ...
4 years, 4 months ago (2016-08-01 13:29:07 UTC) #30
stefan-webrtc
https://codereview.webrtc.org/2099243003/diff/420001/webrtc/modules/rtp_rtcp/source/forward_error_correction.h File webrtc/modules/rtp_rtcp/source/forward_error_correction.h (right): https://codereview.webrtc.org/2099243003/diff/420001/webrtc/modules/rtp_rtcp/source/forward_error_correction.h#newcode67 webrtc/modules/rtp_rtcp/source/forward_error_correction.h:67: bool operator() (const S& first, const T& second); On ...
4 years, 4 months ago (2016-08-01 14:33:23 UTC) #31
danilchap
https://codereview.webrtc.org/2099243003/diff/420001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc File webrtc/modules/rtp_rtcp/source/forward_error_correction.cc (right): https://codereview.webrtc.org/2099243003/diff/420001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode474 webrtc/modules/rtp_rtcp/source/forward_error_correction.cc:474: recovered_packets->sort(SortablePacket::LessThan()); here SortablePacket::LessThan has to be a functor.
4 years, 4 months ago (2016-08-01 14:39:24 UTC) #32
stefan-webrtc
On 2016/08/01 14:39:24, danilchap wrote: > https://codereview.webrtc.org/2099243003/diff/420001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc > File webrtc/modules/rtp_rtcp/source/forward_error_correction.cc (right): > > https://codereview.webrtc.org/2099243003/diff/420001/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc#newcode474 > ...
4 years, 4 months ago (2016-08-02 07:41:24 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2099243003/420001
4 years, 4 months ago (2016-08-09 07:36:09 UTC) #36
commit-bot: I haz the power
Committed patchset #14 (id:420001)
4 years, 4 months ago (2016-08-09 08:23:31 UTC) #38
commit-bot: I haz the power
4 years, 4 months ago (2016-08-09 08:23:41 UTC) #40
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/35c480cf18122a6533c3c934d8794049f97ffb09
Cr-Commit-Position: refs/heads/master@{#13687}

Powered by Google App Engine
This is Rietveld 408576698