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

Issue 1841453004: RtpPacket class introduced. (Closed)

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

Description

RtpPacket class introduced. BUG=webrtc:1994, webrtc:5261 Committed: https://crrev.com/1edb7ab7bd38318e039e99e0b1577de728e9a386 Cr-Commit-Position: refs/heads/master@{#12444}

Patch Set 1 #

Total comments: 38

Patch Set 2 : #

Patch Set 3 : style fixes #

Total comments: 22

Patch Set 4 : feedback #

Patch Set 5 : Added unittests and fuzzer #

Total comments: 6

Patch Set 6 : const -> constexpr #

Total comments: 2

Patch Set 7 : fix compile #

Patch Set 8 : fix compile, try2 #

Patch Set 9 : added empty lines #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1377 lines, -9 lines) Patch
M webrtc/modules/modules.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/BUILD.gn View 1 1 chunk +6 lines, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/rtp_rtcp.gypi View 1 2 2 chunks +10 lines, -4 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_header_extension.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc View 2 chunks +16 lines, -0 lines 0 comments Download
A webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h View 1 2 3 4 5 1 chunk +75 lines, -0 lines 0 comments Download
A webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc View 1 2 3 4 5 1 chunk +203 lines, -0 lines 0 comments Download
A webrtc/modules/rtp_rtcp/source/rtp_packet.h View 1 2 3 4 5 6 7 8 1 chunk +186 lines, -0 lines 0 comments Download
A webrtc/modules/rtp_rtcp/source/rtp_packet.cc View 1 2 3 4 5 6 7 1 chunk +509 lines, -0 lines 0 comments Download
A webrtc/modules/rtp_rtcp/source/rtp_packet_received.h View 1 2 1 chunk +56 lines, -0 lines 0 comments Download
A webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h View 1 1 chunk +33 lines, -0 lines 0 comments Download
A webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc View 1 2 3 4 5 1 chunk +252 lines, -0 lines 0 comments Download
M webrtc/test/fuzzers/BUILD.gn View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
A + webrtc/test/fuzzers/rtp_packet_fuzzer.cc View 1 2 3 4 5 6 1 chunk +15 lines, -5 lines 0 comments Download

Messages

Total messages: 41 (10 generated)
danilchap
Samples where this class design is not comfortable to use are welcome. This CL use ...
4 years, 8 months ago (2016-03-29 08:29:23 UTC) #2
philipel
https://codereview.webrtc.org/1841453004/diff/1/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc File webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc (right): https://codereview.webrtc.org/1841453004/diff/1/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc#newcode72 webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc:72: case MediaType::ANY: Why does MediaType::ANY support this extension, shouldn't ...
4 years, 8 months ago (2016-04-13 12:01:19 UTC) #3
philipel
https://codereview.webrtc.org/1841453004/diff/1/webrtc/modules/rtp_rtcp/source/rtp_packet.cc File webrtc/modules/rtp_rtcp/source/rtp_packet.cc (right): https://codereview.webrtc.org/1841453004/diff/1/webrtc/modules/rtp_rtcp/source/rtp_packet.cc#newcode86 webrtc/modules/rtp_rtcp/source/rtp_packet.cc:86: bool Packet::Marker() const { Functions with very low cost ...
4 years, 8 months ago (2016-04-13 12:01:19 UTC) #4
terelius
I think a packet class will be very useful! Some questions/comments below. In particular, could ...
4 years, 8 months ago (2016-04-13 13:17:00 UTC) #5
danilchap
Thank you for review, code and comments adjusted, PTAL https://codereview.webrtc.org/1841453004/diff/1/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc File webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc (right): https://codereview.webrtc.org/1841453004/diff/1/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc#newcode72 webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc:72: ...
4 years, 8 months ago (2016-04-13 16:18:34 UTC) #7
philipel
lg, but I just think the style in rtp_packet.cc is a bit inconsistent. https://codereview.webrtc.org/1841453004/diff/1/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc File ...
4 years, 8 months ago (2016-04-14 10:32:02 UTC) #8
danilchap
https://codereview.webrtc.org/1841453004/diff/1/webrtc/modules/rtp_rtcp/source/rtp_packet.cc File webrtc/modules/rtp_rtcp/source/rtp_packet.cc (right): https://codereview.webrtc.org/1841453004/diff/1/webrtc/modules/rtp_rtcp/source/rtp_packet.cc#newcode266 webrtc/modules/rtp_rtcp/source/rtp_packet.cc:266: WriteAt(offset, random->Rand<uint8_t>()); On 2016/04/14 10:32:02, philipel wrote: > On ...
4 years, 8 months ago (2016-04-14 11:07:49 UTC) #9
philipel
lgtm, just one final nit though. https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc File webrtc/modules/rtp_rtcp/source/rtp_packet.cc (right): https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc#newcode390 webrtc/modules/rtp_rtcp/source/rtp_packet.cc:390: if (num_extensions_ >= ...
4 years, 8 months ago (2016-04-14 11:15:16 UTC) #10
terelius
https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.h File webrtc/modules/rtp_rtcp/source/rtp_packet.h (right): https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.h#newcode33 webrtc/modules/rtp_rtcp/source/rtp_packet.h:33: void SetExtensionManager(const ExtensionManager* extensions); Please document what this functions ...
4 years, 8 months ago (2016-04-14 11:36:41 UTC) #11
stefan-webrtc
I think it would be good if Erik took a look at this too since ...
4 years, 8 months ago (2016-04-14 12:55:05 UTC) #13
stefan-webrtc
https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc File webrtc/modules/rtp_rtcp/source/rtp_packet.cc (right): https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc#newcode221 webrtc/modules/rtp_rtcp/source/rtp_packet.cc:221: WriteAt(1, data()[1] | 0x80); Would it make sense to ...
4 years, 8 months ago (2016-04-14 13:00:30 UTC) #14
sprang_webrtc
Nice! I'd welcome basic unit tests in this cl. https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc File webrtc/modules/rtp_rtcp/source/rtp_packet.cc (right): https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc#newcode221 webrtc/modules/rtp_rtcp/source/rtp_packet.cc:221: ...
4 years, 8 months ago (2016-04-14 13:41:50 UTC) #15
terelius
https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.h File webrtc/modules/rtp_rtcp/source/rtp_packet.h (right): https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.h#newcode33 webrtc/modules/rtp_rtcp/source/rtp_packet.h:33: void SetExtensionManager(const ExtensionManager* extensions); On 2016/04/14 13:41:50, språng wrote: ...
4 years, 8 months ago (2016-04-14 14:05:21 UTC) #16
danilchap
https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc File webrtc/modules/rtp_rtcp/source/rtp_packet.cc (right): https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc#newcode221 webrtc/modules/rtp_rtcp/source/rtp_packet.cc:221: WriteAt(1, data()[1] | 0x80); On 2016/04/14 13:00:29, stefan-webrtc (holmer) ...
4 years, 8 months ago (2016-04-14 14:13:19 UTC) #17
terelius
https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.h File webrtc/modules/rtp_rtcp/source/rtp_packet.h (right): https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.h#newcode33 webrtc/modules/rtp_rtcp/source/rtp_packet.h:33: void SetExtensionManager(const ExtensionManager* extensions); On 2016/04/14 14:13:19, danilchap wrote: ...
4 years, 8 months ago (2016-04-14 14:36:04 UTC) #18
danilchap
https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.h File webrtc/modules/rtp_rtcp/source/rtp_packet.h (right): https://codereview.webrtc.org/1841453004/diff/60001/webrtc/modules/rtp_rtcp/source/rtp_packet.h#newcode33 webrtc/modules/rtp_rtcp/source/rtp_packet.h:33: void SetExtensionManager(const ExtensionManager* extensions); On 2016/04/14 14:36:03, terelius wrote: ...
4 years, 8 months ago (2016-04-19 13:54:14 UTC) #19
danilchap
+pbos for test/fuzzers
4 years, 8 months ago (2016-04-19 13:57:43 UTC) #22
terelius
Thanks! A couple of question though: https://codereview.webrtc.org/1841453004/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc File webrtc/modules/rtp_rtcp/source/rtp_packet.cc (right): https://codereview.webrtc.org/1841453004/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc#newcode177 webrtc/modules/rtp_rtcp/source/rtp_packet.cc:177: return buffer_.size(); Whats ...
4 years, 8 months ago (2016-04-19 14:18:21 UTC) #23
danilchap
On 2016/04/19 14:18:21, terelius wrote: > Thanks! A couple of question though: > > https://codereview.webrtc.org/1841453004/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_packet.cc ...
4 years, 8 months ago (2016-04-19 14:37:07 UTC) #24
terelius
Acknowledged. LGTM
4 years, 8 months ago (2016-04-19 14:41:56 UTC) #25
sprang_webrtc
Looks good! Have you looked into doing any fuzz testing of this? https://codereview.webrtc.org/1841453004/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc File webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc ...
4 years, 8 months ago (2016-04-20 07:49:36 UTC) #26
danilchap
On 2016/04/20 07:49:36, språng wrote: > Looks good! > Have you looked into doing any ...
4 years, 8 months ago (2016-04-20 08:52:36 UTC) #27
danilchap
https://codereview.webrtc.org/1841453004/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc File webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc (right): https://codereview.webrtc.org/1841453004/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc#newcode33 webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc:33: // const size_t kMaxPaddingSize = 224u; On 2016/04/20 07:49:35, ...
4 years, 8 months ago (2016-04-20 08:52:54 UTC) #28
pbos-webrtc
webrtc/test/fuzzers lgtm https://codereview.webrtc.org/1841453004/diff/120001/webrtc/test/fuzzers/rtp_packet_fuzzer.cc File webrtc/test/fuzzers/rtp_packet_fuzzer.cc (right): https://codereview.webrtc.org/1841453004/diff/120001/webrtc/test/fuzzers/rtp_packet_fuzzer.cc#newcode10 webrtc/test/fuzzers/rtp_packet_fuzzer.cc:10: #include "webrtc/base/checks.h" No checks used in this ...
4 years, 8 months ago (2016-04-20 09:41:25 UTC) #29
sprang_webrtc
lgtm
4 years, 8 months ago (2016-04-20 09:53:11 UTC) #30
danilchap
https://codereview.webrtc.org/1841453004/diff/120001/webrtc/test/fuzzers/rtp_packet_fuzzer.cc File webrtc/test/fuzzers/rtp_packet_fuzzer.cc (right): https://codereview.webrtc.org/1841453004/diff/120001/webrtc/test/fuzzers/rtp_packet_fuzzer.cc#newcode10 webrtc/test/fuzzers/rtp_packet_fuzzer.cc:10: #include "webrtc/base/checks.h" On 2016/04/20 09:41:24, pbos-webrtc wrote: > No ...
4 years, 8 months ago (2016-04-20 09:57:14 UTC) #31
stefan-webrtc
lgtm, but please consider adding some empty lines in rtp_packet.h https://codereview.webrtc.org/1841453004/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_packet.h File webrtc/modules/rtp_rtcp/source/rtp_packet.h (right): https://codereview.webrtc.org/1841453004/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_packet.h#newcode33 ...
4 years, 8 months ago (2016-04-20 10:53:40 UTC) #33
danilchap
https://codereview.webrtc.org/1841453004/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_packet.h File webrtc/modules/rtp_rtcp/source/rtp_packet.h (right): https://codereview.webrtc.org/1841453004/diff/100001/webrtc/modules/rtp_rtcp/source/rtp_packet.h#newcode33 webrtc/modules/rtp_rtcp/source/rtp_packet.h:33: // Parse and move given buffer into Packet. On ...
4 years, 8 months ago (2016-04-20 11:05:29 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1841453004/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1841453004/180001
4 years, 8 months ago (2016-04-20 12:19:07 UTC) #37
commit-bot: I haz the power
Committed patchset #9 (id:180001)
4 years, 8 months ago (2016-04-20 12:25:15 UTC) #39
commit-bot: I haz the power
4 years, 8 months ago (2016-04-20 12:26:28 UTC) #41
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/1edb7ab7bd38318e039e99e0b1577de728e9a386
Cr-Commit-Position: refs/heads/master@{#12444}

Powered by Google App Engine
This is Rietveld 408576698