Chromium Code Reviews

Issue 1929903002: Define rtc::BufferT, like rtc::Buffer but for any trivial type (Closed)

Created:
4 years, 7 months ago by kwiberg-webrtc
Modified:
4 years, 7 months ago
Reviewers:
tommi, ossu
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, the sun, hlundin-webrtc, joachim
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Define rtc::BufferT, like rtc::Buffer but for any trivial type And redefine rtc::Buffer as using Buffer = BufferT<uint8_t>; (In the long run, I'd like to remove the type alias and rename the template to just rtc::Buffer, but that requires all current users of Buffer to start saying Buffer<uint8_t> instead, and since Buffer is used in the API, we can't do that in one step.) The immediate reason for the new template is that we'd like to use BufferT<int16_t> in the AudioDecoder interface. BUG=webrtc:5801 Committed: https://crrev.com/a4ac4786a8ca503ac3cb15dfb0a7f6a62a9bdd52 Cr-Commit-Position: refs/heads/master@{#12564}

Patch Set 1 #

Total comments: 10

Patch Set 2 : review #

Total comments: 12

Patch Set 3 : review nit #

Total comments: 4

Patch Set 4 : review changes #

Unified diffs Side-by-side diffs Stats (+255 lines, -159 lines)
M webrtc/base/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments
M webrtc/base/base.gyp View 1 chunk +0 lines, -1 line 0 comments
M webrtc/base/buffer.h View 6 chunks +160 lines, -98 lines 0 comments
D webrtc/base/buffer.cc View 1 chunk +0 lines, -43 lines 0 comments
M webrtc/base/buffer_unittest.cc View 2 chunks +58 lines, -2 lines 0 comments
M webrtc/base/copyonwritebuffer.h View 7 chunks +36 lines, -13 lines 0 comments
M webrtc/media/base/mediachannel.h View 2 chunks +1 line, -1 line 0 comments

Messages

Total messages: 24 (7 generated)
kwiberg-webrtc
4 years, 7 months ago (2016-04-28 12:12:23 UTC) #3
ossu
https://codereview.webrtc.org/1929903002/diff/1/webrtc/base/buffer.h File webrtc/base/buffer.h (right): https://codereview.webrtc.org/1929903002/diff/1/webrtc/base/buffer.h#newcode31 webrtc/base/buffer.h:31: struct BufferCompat { So it is "buffer compatible" if ...
4 years, 7 months ago (2016-04-28 13:36:53 UTC) #4
ossu
Also, just throwing it out there: We _could_ have Buffer instead of BufferT, if we ...
4 years, 7 months ago (2016-04-28 13:46:21 UTC) #5
kwiberg-webrtc
New patch set uploaded. https://codereview.webrtc.org/1929903002/diff/1/webrtc/base/buffer.h File webrtc/base/buffer.h (right): https://codereview.webrtc.org/1929903002/diff/1/webrtc/base/buffer.h#newcode31 webrtc/base/buffer.h:31: struct BufferCompat { On 2016/04/28 ...
4 years, 7 months ago (2016-04-28 21:19:01 UTC) #6
kwiberg-webrtc
https://codereview.webrtc.org/1929903002/diff/20001/webrtc/media/base/mediachannel.h File webrtc/media/base/mediachannel.h (left): https://codereview.webrtc.org/1929903002/diff/20001/webrtc/media/base/mediachannel.h#oldcode37 webrtc/media/base/mediachannel.h:37: class Buffer; This is the one place where we're ...
4 years, 7 months ago (2016-04-28 21:25:02 UTC) #8
kwiberg-webrtc
On 2016/04/28 13:46:21, ossu wrote: > Also, just throwing it out there: > > We ...
4 years, 7 months ago (2016-04-28 21:27:12 UTC) #9
tommi
lgtm. cc-ing jbauch as well, fyi. https://codereview.webrtc.org/1929903002/diff/20001/webrtc/base/buffer.h File webrtc/base/buffer.h (right): https://codereview.webrtc.org/1929903002/diff/20001/webrtc/base/buffer.h#newcode33 webrtc/base/buffer.h:33: static constexpr bool ...
4 years, 7 months ago (2016-04-28 22:49:09 UTC) #10
kwiberg-webrtc
https://codereview.webrtc.org/1929903002/diff/20001/webrtc/base/buffer.h File webrtc/base/buffer.h (right): https://codereview.webrtc.org/1929903002/diff/20001/webrtc/base/buffer.h#newcode33 webrtc/base/buffer.h:33: static constexpr bool value = On 2016/04/28 22:49:08, tommi-webrtc ...
4 years, 7 months ago (2016-04-29 00:00:19 UTC) #11
tommi
++lgtm https://codereview.webrtc.org/1929903002/diff/20001/webrtc/base/buffer.h File webrtc/base/buffer.h (right): https://codereview.webrtc.org/1929903002/diff/20001/webrtc/base/buffer.h#newcode33 webrtc/base/buffer.h:33: static constexpr bool value = On 2016/04/29 00:00:19, ...
4 years, 7 months ago (2016-04-29 07:46:38 UTC) #12
kwiberg-webrtc
https://codereview.webrtc.org/1929903002/diff/20001/webrtc/base/buffer_unittest.cc File webrtc/base/buffer_unittest.cc (right): https://codereview.webrtc.org/1929903002/diff/20001/webrtc/base/buffer_unittest.cc#newcode355 webrtc/base/buffer_unittest.cc:355: static const char* kObsidian = "obsidian"; On 2016/04/29 07:46:38, ...
4 years, 7 months ago (2016-04-29 07:51:47 UTC) #13
ossu
On 2016/04/28 21:27:12, kwiberg-webrtc wrote: > On 2016/04/28 13:46:21, ossu wrote: > > Also, just ...
4 years, 7 months ago (2016-04-29 08:37:12 UTC) #14
ossu
https://codereview.webrtc.org/1929903002/diff/40001/webrtc/base/buffer.h File webrtc/base/buffer.h (right): https://codereview.webrtc.org/1929903002/diff/40001/webrtc/base/buffer.h#newcode32 webrtc/base/buffer.h:32: struct BufferCompat { So if we want to get ...
4 years, 7 months ago (2016-04-29 09:09:55 UTC) #15
kwiberg-webrtc
New patch set uploaded. https://codereview.webrtc.org/1929903002/diff/40001/webrtc/base/buffer.h File webrtc/base/buffer.h (right): https://codereview.webrtc.org/1929903002/diff/40001/webrtc/base/buffer.h#newcode32 webrtc/base/buffer.h:32: struct BufferCompat { On 2016/04/29 ...
4 years, 7 months ago (2016-04-29 10:34:46 UTC) #16
ossu
On 2016/04/29 10:34:46, kwiberg-webrtc wrote: > New patch set uploaded. > > https://codereview.webrtc.org/1929903002/diff/40001/webrtc/base/buffer.h > File ...
4 years, 7 months ago (2016-04-29 10:51:42 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1929903002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1929903002/60001
4 years, 7 months ago (2016-04-29 14:28:54 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 7 months ago (2016-04-29 15:00:27 UTC) #22
commit-bot: I haz the power
4 years, 7 months ago (2016-05-01 22:02:00 UTC) #24
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/a4ac4786a8ca503ac3cb15dfb0a7f6a62a9bdd52
Cr-Commit-Position: refs/heads/master@{#12564}

Powered by Google App Engine