There are currently a number of places in the code where we dump audio
data in various stages of processing for debug purposes. Currently
these all write raw, uncompressed PCM files, which isn't supported by
the most common audio players, and requires the user to supply
metadata such as sample rate, sample size and endianness, etc.
This patch adds a simple class that makes it easy to write WAV files
instead. WAV files still contain the same uncompressed PCM data, but
they have a small header that contains all the requisite metadata, and
are supported by virtually all audio players.
Since some of the debug code that will be writing WAV files is written
in plain C, a C API is included as well.
R=andrew@webrtc.org, bjornv@webrtc.org, henrike@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/16809004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6932 4adac7df-926f-26a2-2b94-8c16560cd09d
These global arrays are shared amongst all AEC instances, and were at
serious risk of data races. A Chromium TSAN bot recently caught this.
Also move the function pointer selection for optimization to
create-time. (Ideally this would only be done once.)
BUG=chromium:404133,1503
R=bjornv@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/19069004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6922 4adac7df-926f-26a2-2b94-8c16560cd09d
When building WebRTC from a Chromium checkout (i.e. with
https://codereview.chromium.org/321313006/ applied) GN
cannot execute successfully.
This CL fixes:
- include path for video_processing module's SSE2 target.
- NSS/SSL targets
BUG=3441
TEST=
Passing WebRTC GN trybots.
Passing build from a Chromium checkout with https://codereview.chromium.org/321313006 applied and src/third_party/webrtc symlinked to the WebRTC checkout with this CL:
gn gen out/Default --args="clang_use_chrome_plugins=false" && ninja -C out/Default
gn gen out/Default --args="os=\"android\" cpu_arch=\"arm\" clang_use_chrome_plugins=false" && ninja -C out/Default
R=brettw@chromium.org
Review URL: https://webrtc-codereview.appspot.com/21179005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6921 4adac7df-926f-26a2-2b94-8c16560cd09d
The modification only uses the unique part of the spectrum (as is done for the C and asm code). It passes
byte to byte conformance test, and the single function performance
(if not specified, the code is compiled by GCC 4.6) on different
platforms:
| run 100k times | cortex-a7 | cortex-a9 | cortex-a15 |
| use C as the base on each | (1.2Ghz) | (1.0Ghz) | (1.7Ghz) |
| CPU target | | | |
|----------------------------+-----------+-----------+------------|
| C | 100% | 100% | 100% |
| Neon asm | 18% | 14% | 19% |
| Neon inline asm | 31% | 25% | 27% |
| Neon intrinsic (GCC 4.6) | 33% | 27% | 42% |
| Neon intrinscis (GCC 4.8) | 17% | 14% | 19% |
| Neon intrinsics (LLVM 3.3) | 15% | 13% | 18% |
BUG=
R=andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/13739004
Patch from Joe Yu <joe.yu@arm.com>.
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6920 4adac7df-926f-26a2-2b94-8c16560cd09d
Previous updated_rect wasn't set for frames generated by WindowCapturer
implementation. That makes them unustable with chromoting host that
uses update_rect. With that change the frames will always contain
updated_rect that coveras the whole frame.
Change by Ronak Vora <ronakvora@google.com>
R=wez@chromium.org
Review URL: https://webrtc-codereview.appspot.com/22079004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6912 4adac7df-926f-26a2-2b94-8c16560cd09d
The bot that had the problem was using an old version of STL, so relanding.
> Revert 6863 "Refactor StatsCollector and associated types."
>
> Breaks chrome compilation on Mac:
>
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/vector.tcc:252:8:
> error: no matching constructor for initialization of
> 'webrtc::StatsReport'
> _Tp __x_copy = __x;
> ^ ~~~
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/stl_vector.h:608:4:
> note: in instantiation of member function
> 'std::vector<webrtc::StatsReport, std::allocator<webrtc::StatsReport>
> >::_M_insert_aux' requested here
> _M_insert_aux(end(), __x);
> ^
> ../../content/renderer/media/mock_peer_connection_impl.cc:282:11:
> note: in instantiation of member function
> 'std::vector<webrtc::StatsReport, std::allocator<webrtc::StatsReport>
> >::push_back' requested here
> reports.push_back(report1);
> ^
> ../../third_party/libjingle/source/talk/app/webrtc/statstypes.h:49:3:
> note: candidate constructor not viable: requires 0 arguments, but 1
> was provided
> StatsReport() : timestamp(0) {}
>
>
>
> > Refactor StatsCollector and associated types.
> > * Due to the type changes, I'm going to update the OnCompleted event in two phases to sync with Chrome. This is the first phase.
> > * Reports are now managed in a set, not a map, since it's enough to store the id in one place.
> > * Report ids are now const.
> > * Copying of data has been greatly reduced.
> > * This change includes preparation work for making GetStats fully async.
> >
> > This is a reland of r6778 which was reverted due to fyi bots failing.
> > I found and fixed the issue which was that in a couple of places I needed to replace a report instead of finding+updating an existing one.
> >
> > R=xians@webrtc.org
> >
> > Review URL: https://webrtc-codereview.appspot.com/15119004
>
> TBR=tommi@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/21169004TBR=niklas.enbom@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/22099004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6908 4adac7df-926f-26a2-2b94-8c16560cd09d
Macros should in general be avoided. WEBRTC_SPL_UMUL_32_16_RSFT16 is only used in iSAC fixed point as part of multiplying with LSB and MSB. A better approach is to have one function for that complete operation in iSAC.
This CL removes the macro and replace the operation locally.
BUG=3148, 3353
TESTED=locally on Linux and trybots
R=tina.legrand@webrtc.org, turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/16349004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6907 4adac7df-926f-26a2-2b94-8c16560cd09d
Fixes issues where statistics only was reported for the first stream if
configured with simulcast, and in case of RTX the reported statistics was
depending on the order of the report blocks.
Also fixes issues with multiple report blocks in the SendStatisticsProxy and the
RtcpStatisticsCallback. SendStatisticsProxy is now aware of RTX ssrcs, and the
RTCPReceiver is calling the RtcpStatisticsCallback with the correct SSRCs, and
not only the primary stream SSRC.
R=mflodman@webrtc.org, sprang@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/20149004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6903 4adac7df-926f-26a2-2b94-8c16560cd09d
Breaks chrome compilation on Mac:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/vector.tcc:252:8:
error: no matching constructor for initialization of
'webrtc::StatsReport'
_Tp __x_copy = __x;
^ ~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/stl_vector.h:608:4:
note: in instantiation of member function
'std::vector<webrtc::StatsReport, std::allocator<webrtc::StatsReport>
>::_M_insert_aux' requested here
_M_insert_aux(end(), __x);
^
../../content/renderer/media/mock_peer_connection_impl.cc:282:11:
note: in instantiation of member function
'std::vector<webrtc::StatsReport, std::allocator<webrtc::StatsReport>
>::push_back' requested here
reports.push_back(report1);
^
../../third_party/libjingle/source/talk/app/webrtc/statstypes.h:49:3:
note: candidate constructor not viable: requires 0 arguments, but 1
was provided
StatsReport() : timestamp(0) {}
> Refactor StatsCollector and associated types.
> * Due to the type changes, I'm going to update the OnCompleted event in two phases to sync with Chrome. This is the first phase.
> * Reports are now managed in a set, not a map, since it's enough to store the id in one place.
> * Report ids are now const.
> * Copying of data has been greatly reduced.
> * This change includes preparation work for making GetStats fully async.
>
> This is a reland of r6778 which was reverted due to fyi bots failing.
> I found and fixed the issue which was that in a couple of places I needed to replace a report instead of finding+updating an existing one.
>
> R=xians@webrtc.org
>
> Review URL: https://webrtc-codereview.appspot.com/15119004TBR=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/21169004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6897 4adac7df-926f-26a2-2b94-8c16560cd09d
Some constraints, like kEchoCancellation, kMediaStreamAudioDucking are supported in Chrome but not in Libjingle, if the users set it in mandatory, LocalAudioSource::Initialize() will fail the getUserMedia call.
This patch fixes the problem by fully initializing the LocalAudioSource even though some constraints are not supported in libjingle.
BUT=crbug/398080
TEST=manual test:
var constraints = {audio: { mandatory: { googEchoCancellation: true } }};
getUserMedia(constraints, gotStream, gotStreamFailed);
verify you get a gotStream callback
R=henrika@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/21049004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6885 4adac7df-926f-26a2-2b94-8c16560cd09d
This CL turns the background noise generation in NetEq off by default. The noise generation used to kick in during long-duration packet losses, when there was no point in extrapolating the latest audio any longer. However, this sometimes produces annoying noise in situations where silence would have been preferable.
With this change, a long packet-loss concealment will be faded out to zeros instead of a low noise.
Reference files are updated where needed.
BUG=3519
R=tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/20109004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6882 4adac7df-926f-26a2-2b94-8c16560cd09d