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

Issue 2289093003: NetEq: Changed Packet::payload to be an rtc::Buffer (Closed)

Created:
4 years, 3 months ago by ossu
Modified:
4 years, 3 months ago
CC:
webrtc-reviews_webrtc.org, kwiberg-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, peah-webrtc, minyue-webrtc
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

NetEq: Changed Packet::payload to be an rtc::Buffer That is, rather than keeping a separate pointer and size. This helps automate memory management in NetEq and will be useful in the work to minimize the AudioDecoder interface as part of the injectable audio codec work. I'm planning a follow-up that will change the current management of Packet* to wrapping them in unique_ptr instead. Committed: https://crrev.com/dc431ce07e3e7feb46a00886aa5b5c9684761758 Cr-Commit-Position: refs/heads/master@{#14002}

Patch Set 1 #

Total comments: 18

Patch Set 2 : Changed Buffer constructor calls to SetData or SetSize #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -163 lines) Patch
M webrtc/modules/audio_coding/neteq/comfort_noise.cc View 1 chunk +1 line, -4 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/neteq_impl.cc View 1 8 chunks +18 lines, -30 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/packet.h View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/packet_buffer.cc View 7 chunks +5 lines, -8 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/packet_buffer_unittest.cc View 1 6 chunks +3 lines, -10 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/payload_splitter.cc View 1 12 chunks +52 lines, -59 lines 0 comments Download
M webrtc/modules/audio_coding/neteq/payload_splitter_unittest.cc View 1 23 chunks +21 lines, -50 lines 1 comment Download

Depends on Patchset:

Messages

Total messages: 19 (11 generated)
ossu
Last week we discussed putting a Parse method into AudioDecoder, to help move the current ...
4 years, 3 months ago (2016-08-30 15:22:16 UTC) #3
kwiberg-webrtc
Extremely nice! Just a few nits though. https://codereview.webrtc.org/2289093003/diff/1/webrtc/modules/audio_coding/neteq/neteq_impl.cc File webrtc/modules/audio_coding/neteq/neteq_impl.cc (left): https://codereview.webrtc.org/2289093003/diff/1/webrtc/modules/audio_coding/neteq/neteq_impl.cc#oldcode662 webrtc/modules/audio_coding/neteq/neteq_impl.cc:662: delete [] ...
4 years, 3 months ago (2016-08-30 16:04:36 UTC) #4
ossu
https://codereview.webrtc.org/2289093003/diff/1/webrtc/modules/audio_coding/neteq/neteq_impl.cc File webrtc/modules/audio_coding/neteq/neteq_impl.cc (left): https://codereview.webrtc.org/2289093003/diff/1/webrtc/modules/audio_coding/neteq/neteq_impl.cc#oldcode662 webrtc/modules/audio_coding/neteq/neteq_impl.cc:662: delete [] current_packet->payload; On 2016/08/30 16:04:36, kwiberg-webrtc wrote: > ...
4 years, 3 months ago (2016-08-30 16:27:14 UTC) #7
kwiberg-webrtc
lgtm https://codereview.webrtc.org/2289093003/diff/1/webrtc/modules/audio_coding/neteq/neteq_impl.cc File webrtc/modules/audio_coding/neteq/neteq_impl.cc (right): https://codereview.webrtc.org/2289093003/diff/1/webrtc/modules/audio_coding/neteq/neteq_impl.cc#newcode564 webrtc/modules/audio_coding/neteq/neteq_impl.cc:564: packet->payload = rtc::Buffer(payload.data(), payload.size()); On 2016/08/30 16:27:13, ossu ...
4 years, 3 months ago (2016-08-30 16:37:05 UTC) #10
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/2289093003/60001
4 years, 3 months ago (2016-08-31 15:41:02 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:60001)
4 years, 3 months ago (2016-08-31 15:51:16 UTC) #16
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/dc431ce07e3e7feb46a00886aa5b5c9684761758 Cr-Commit-Position: refs/heads/master@{#14002}
4 years, 3 months ago (2016-08-31 15:51:23 UTC) #18
hlundin-webrtc
4 years, 3 months ago (2016-09-01 14:08:04 UTC) #19
Message was sent while issue was closed.
LGTM

https://codereview.webrtc.org/2289093003/diff/60001/webrtc/modules/audio_codi...
File webrtc/modules/audio_coding/neteq/payload_splitter_unittest.cc (right):

https://codereview.webrtc.org/2289093003/diff/60001/webrtc/modules/audio_codi...
webrtc/modules/audio_coding/neteq/payload_splitter_unittest.cc:135:
memset(packet->payload.data(), payload_value, packet->payload.size());
I was thinking you could use std::fill, to avoid the pitfall with the element
sizes. But that makes the line just as long as the current one. I for one
wouldn't mind an rtc::BufferT::fill(T value) method... :)

Powered by Google App Engine
This is Rietveld 408576698