Commit graph

24 commits

Author SHA1 Message Date
Tommi
1f3679884c Start using ArrayView in AudioFrame, update PushResampler
Start introducing ArrayView to AudioFrame and code that flows down
from there.  In this first step:
* Add `data_view()` that returns a read-only ArrayView for the
  audio buffer. When AudioFrame is not initialized however, data_view()
  will return a nullptr whereas the current data() method never returns
  nullptr.
* Add `mutable_data()` that requires two arguments for properly setting
  the samples per channel and number of channels that's required for
  accurately reserving the returned mutable ArrayView.
  A notable behavior change is that if the requested number of channels
  is larger than supported or the calculated buffer size is too large,
  the function will trigger a check.
* Add TODOs for following work.

Bug: chromium:335805780
Change-Id: I2937de800422589ebe6a3840b3caadf3d9ff8b00
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347982
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42202}
2024-04-30 15:33:08 +00:00
Tommi
b2b6166dc4 Make AudioFrame::channel_layout_ private and check for valid values
Bug: chromium:335805780
Change-Id: Ida671d317c07983cc51faa1a498642747dbb810c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349322
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42199}
2024-04-30 11:02:40 +00:00
Byoungchan Lee
c065e739e2 Remove RTC_DISALLOW_COPY_AND_ASSIGN more.
Bug: webrtc:13555, webrtc:13082
Change-Id: I9c07708108da0a26f5e228384fd56cef4d1540b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247300
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35749}
2022-01-20 11:00:18 +00:00
Jakob Ivarsson
4a97d7281f Remove NetEq extra delay option.
Bug: b/156734419
Change-Id: I787e6961ad283990d633029c0cf296e10b825875
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237403
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35326}
2021-11-09 17:25:46 +00:00
Artem Titov
0e61fdd27c Use backticks not vertical bars to denote variables in comments for /api
Bug: webrtc:12338
Change-Id: Ib97b2c3d64dbd895f261ffa76a2e885bd934a87f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34554}
2021-07-26 18:27:34 +00:00
Henrik Lundin
c49e9c253f Adding a delay line to NetEq's output
This change adds an optional delay to NetEq's output. Note, this is not
equivalent to increasing the jitter buffer with the same extra length.

Bug: b/156734419
Change-Id: I8b70b6b3bffcfd3da296ccf29853864baa03d6bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175110
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31343}
2020-05-25 12:03:39 +00:00
Minyue Li
dea73ee8f9 Pass absolute capture time from WebRtcVoiceEngine to ACM.
Bug: webrtc:10739
Change-Id: I6f264cb89ce340db642db3ef7dfc2b5d459f749e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167211
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30547}
2020-02-18 16:54:48 +00:00
Alex Narest
5b5d97c938 Reland of "Reporting of decoding_codec_plc events""
This is a reland of 0a88ea050c.

The new stat will not be reported unless it is GT 0.

Reporting of decoding_codec_plc events

Bug: webrtc:10838
Change-Id: Ic8585b4eeae9a2643374f15bc2578d1141e59683
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148448
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alex Narest <alexnarest@google.com>
Cr-Commit-Position: refs/heads/master@{#28797}
2019-08-07 18:41:46 +00:00
Mirko Bonadei
bedb7a8aea Revert "Reporting of decoding_codec_plc events"
This reverts commit 0a88ea050c.

Reason for revert: This CL breaks Chromium's FYI bots (example: https://ci.chromium.org/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20Linux%20Tester/4033).

Original change's description:
> Reporting of decoding_codec_plc events
> 
> Change-Id: Id71b37244bc98bffaf25131a519127b3d2b86a8f
> 
> Bug: webrtc:10838
> Change-Id: Id71b37244bc98bffaf25131a519127b3d2b86a8f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147263
> Commit-Queue: Alex Narest <alexnarest@google.com>
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28700}

TBR=mflodman@webrtc.org,alexnarest@google.com

Change-Id: I5e5dd29ee375ba422f79932d4b8c3fd028a53db4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10838
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147269
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28707}
2019-07-30 14:39:09 +00:00
Alex Narest
0a88ea050c Reporting of decoding_codec_plc events
Change-Id: Id71b37244bc98bffaf25131a519127b3d2b86a8f

Bug: webrtc:10838
Change-Id: Id71b37244bc98bffaf25131a519127b3d2b86a8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147263
Commit-Queue: Alex Narest <alexnarest@google.com>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28700}
2019-07-29 16:40:23 +00:00
Alessio Bazzica
8f319a3472 Reland "Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.""
This reverts commit fab3460a82.

Reason for revert: fix downstream instead

Original change's description:
> Revert "Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.""
> 
> This reverts commit 9973933d2e.
> 
> Reason for revert: breaking downstream projects and not reviewed by direct owners
> 
> Original change's description:
> > Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
> > 
> > This reverts commit 24192c267a.
> > 
> > Reason for revert: Analyzed the performance regression in more detail.
> > 
> > Most of the regression comes from the extra RtpPacketInfos-related memory allocations in every `NetEq::GetAudio()` call. Commit 1796a820f6 has removed roughly 2/3rds of the extra allocations from the impacted perf tests. Remaining perf impact is expected to be about "8 microseconds of CPU time per second" on the Linux benchmarking machines and "15 us per second" on Windows/Mac.
> > 
> > There are options to optimize further but they are unlikely worth doing. Note for example that `NetEqPerformanceTest` uses the PCM codec while the real-world use cases would likely use the much heavier Opus codec. The numbers from `OpusSpeedTest` and `NetEqPerformanceTest` suggest that Opus decoding is about 10x as expensive as NetEq overall.
> > 
> > Original change's description:
> > > Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
> > >
> > > This reverts commit 3e8ef940fe.
> > >
> > > Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.
> > >
> > > Original change's description:
> > > > Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
> > > >
> > > > This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
> > > >
> > > > Bug: webrtc:10668
> > > > Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> > > > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > > > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > > > Commit-Queue: Chen Xing <chxg@google.com>
> > > > Cr-Commit-Position: refs/heads/master@{#28434}
> > >
> > > TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com
> > >
> > > Bug: webrtc:10668, chromium:982260
> > > Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
> > > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > > Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#28561}
> > 
> > TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: webrtc:10668, chromium:982260
> > Change-Id: Ie375a0b327ee368317bf3a04b2f1415c3a974470
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146707
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Commit-Queue: Chen Xing <chxg@google.com>
> > Cr-Commit-Position: refs/heads/master@{#28664}
> 
> TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com
> 
> Change-Id: I652cb0814d83b514d3bee34e65ca3bb693099b22
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10668, chromium:982260
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146712
> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28671}

TBR=alessiob@webrtc.org,kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com

Change-Id: Id43b7b3da79b4f48004b41767482bae1c1fa1e16
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10668, chromium:982260
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146713
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28672}
2019-07-24 16:47:13 +00:00
Alessio Bazzica
fab3460a82 Revert "Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.""
This reverts commit 9973933d2e.

Reason for revert: breaking downstream projects and not reviewed by direct owners

Original change's description:
> Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
> 
> This reverts commit 24192c267a.
> 
> Reason for revert: Analyzed the performance regression in more detail.
> 
> Most of the regression comes from the extra RtpPacketInfos-related memory allocations in every `NetEq::GetAudio()` call. Commit 1796a820f6 has removed roughly 2/3rds of the extra allocations from the impacted perf tests. Remaining perf impact is expected to be about "8 microseconds of CPU time per second" on the Linux benchmarking machines and "15 us per second" on Windows/Mac.
> 
> There are options to optimize further but they are unlikely worth doing. Note for example that `NetEqPerformanceTest` uses the PCM codec while the real-world use cases would likely use the much heavier Opus codec. The numbers from `OpusSpeedTest` and `NetEqPerformanceTest` suggest that Opus decoding is about 10x as expensive as NetEq overall.
> 
> Original change's description:
> > Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
> >
> > This reverts commit 3e8ef940fe.
> >
> > Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.
> >
> > Original change's description:
> > > Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
> > >
> > > This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
> > >
> > > Bug: webrtc:10668
> > > Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> > > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > > Commit-Queue: Chen Xing <chxg@google.com>
> > > Cr-Commit-Position: refs/heads/master@{#28434}
> >
> > TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com
> >
> > Bug: webrtc:10668, chromium:982260
> > Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
> > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28561}
> 
> TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: webrtc:10668, chromium:982260
> Change-Id: Ie375a0b327ee368317bf3a04b2f1415c3a974470
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146707
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Chen Xing <chxg@google.com>
> Cr-Commit-Position: refs/heads/master@{#28664}

TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com

Change-Id: I652cb0814d83b514d3bee34e65ca3bb693099b22
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10668, chromium:982260
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146712
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28671}
2019-07-24 16:41:13 +00:00
Chen Xing
9973933d2e Reland "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
This reverts commit 24192c267a.

Reason for revert: Analyzed the performance regression in more detail.

Most of the regression comes from the extra RtpPacketInfos-related memory allocations in every `NetEq::GetAudio()` call. Commit 1796a820f6 has removed roughly 2/3rds of the extra allocations from the impacted perf tests. Remaining perf impact is expected to be about "8 microseconds of CPU time per second" on the Linux benchmarking machines and "15 us per second" on Windows/Mac.

There are options to optimize further but they are unlikely worth doing. Note for example that `NetEqPerformanceTest` uses the PCM codec while the real-world use cases would likely use the much heavier Opus codec. The numbers from `OpusSpeedTest` and `NetEqPerformanceTest` suggest that Opus decoding is about 10x as expensive as NetEq overall.

Original change's description:
> Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
>
> This reverts commit 3e8ef940fe.
>
> Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.
>
> Original change's description:
> > Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
> >
> > This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
> >
> > Bug: webrtc:10668
> > Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Reviewed-by: Minyue Li <minyue@webrtc.org>
> > Commit-Queue: Chen Xing <chxg@google.com>
> > Cr-Commit-Position: refs/heads/master@{#28434}
>
> TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com
>
> Bug: webrtc:10668, chromium:982260
> Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28561}

TBR=kwiberg@webrtc.org,stefan@webrtc.org,ivoc@webrtc.org,minyue@webrtc.org,chxg@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10668, chromium:982260
Change-Id: Ie375a0b327ee368317bf3a04b2f1415c3a974470
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146707
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28664}
2019-07-24 14:15:28 +00:00
Ivo Creusen
24192c267a Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
This reverts commit 3e8ef940fe.

Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260.

Original change's description:
> Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
>
> This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
>
> Bug: webrtc:10668
> Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Commit-Queue: Chen Xing <chxg@google.com>
> Cr-Commit-Position: refs/heads/master@{#28434}

TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com

Bug: webrtc:10668, chromium:982260
Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28561}
2019-07-12 16:18:31 +00:00
henrika
2250b05778 Adding support for channel mixing between different channel layouts.
Two new classes are added to WebRTC from Chrome: ChannelMixer and
ChannelMixingMatrix but they are not yet utilized in the audio path for
WebRTC.

The idea is to utilize these new classes when adding support for multi-
channel encoding/decoding in WebRTC/Chrome.

Adds support for a new enumerator call webrtc::ChannelLayout and some
helper methods which maps between channel layout and number of channels.
These parts are also copied from Chrome.

Minor (cosmetic) changes are also done on the AudioFrame to prepare
for upcoming work.

Bug: webrtc:10783
Change-Id: I6cd7a13a3bc1c8bbfa19bc974c7a011d22d19197
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141674
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28482}
2019-07-04 10:10:54 +00:00
Chen Xing
3e8ef940fe Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker.
This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.

Bug: webrtc:10668
Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28434}
2019-07-01 15:56:40 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
henrika
2a4906532f Increases max size of webrtc::AudioFrame from 60ms to 120ms @32kHz.
Existing max size seems a bit random imho. THis CL extends it from 60ms
to 120ms but the actual goal is to allow usage of 20ms @192kHz since
that is the largest possible sample rate which can be selected on most
platforms.

Recent work on the ADM for Windows ensures that the ADM now supports
192kHz.

Without this change, we will hit DCHECK:s like these:

RTC_DCHECK_LE(bytes_per_sample * number_of_frames * number_of_channels,
                AudioFrame::kMaxDataSizeBytes)

when 192kHz is utilized.

Bug: webrtc:9265
Change-Id: Ib4f76a2ecfb1a541776938b8eed801ad64386daa
Reviewed-on: https://webrtc-review.googlesource.com/96542
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24473}
2018-08-29 08:43:03 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Danil Chapovalov
0bc58cf876 Replace rtc::Optional with absl::optional in api
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameter 'api'
Then undo changes to optional target itself and optional_unittests

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I44093da213369d6a502e33792c694f620f53b779
Reviewed-on: https://webrtc-review.googlesource.com/84621
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23707}
2018-06-21 12:50:03 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Fredrik Solenberg
bbf21a3fd6 Remove dependencies on modules:module_api from AudioProcessing.
- Directly include api/audio/audio_frame.h everywhere AudioFrame is used.
- This *will* remove transient dependencies on libjpeg and a bunch of other things from the e.g. APM.
- audio_frame.h still included from module_common_types.h for backwards compatibility with clients.

Bug: webrtc:9139, webrtc:7504
Change-Id: Id96f9268c01667fbcc29a01f5c1dd25a37836897
Reviewed-on: https://webrtc-review.googlesource.com/62464
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22845}
2018-04-12 22:05:27 +00:00
Fredrik Solenberg
03bfc738b3 Remove deprecated methods from AudioFrame.
Bug: webrtc:6548
Change-Id: I85bdba3acbef3216b3d836515dde10188ff0dbc6
Reviewed-on: https://webrtc-review.googlesource.com/54304
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22824}
2018-04-11 14:26:56 +00:00
Niels Möller
d377f04194 Move AudioFrame to its own header file and target in api/.
This breaks the dependency api:audio_mixer_api --> modules:module_api,
and allows peerconnectioninterface.h to include audio_mixer.h, without
introducing a dependency cycle.

In addition, un-inline all AudioFrame methods, moving implementations
to audio_frame.cc, and replace assert by RTC_CHECK_*.

Bug: webrtc:7504
Change-Id: I11e3d3d22716e9b98976bf830103fbb06e7bbb77
Reviewed-on: https://webrtc-review.googlesource.com/51860
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22016}
2018-02-14 11:01:53 +00:00