Commit graph

58 commits

Author SHA1 Message Date
Tommi
16a140287e Remove a couple of unnecessary winsock2.h includes
Bug: None
Change-Id: I3f36aaff9cc957e5c404e23e99702eb9ff28517d
Reviewed-on: https://webrtc-review.googlesource.com/65720
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22702}
2018-04-03 08:49:58 +00:00
Ivo Creusen
767a2ced73 Fix for crash when reading from audio file in NetEq.
The neteq_rtpplay tool can crash when the replacement audio file is too short. The desired behavior is that the audio file is looped as much as necessary.

Bug: webrtc:9061
Change-Id: Iefba4c47271584845662a415598bf2197dba0fae
Reviewed-on: https://webrtc-review.googlesource.com/64460
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22585}
2018-03-23 18:29:05 +00:00
Karl Wiberg
08126349f5 Pass a real audio codec pair ID to decoders that we create
Bug: webrtc:8941
Change-Id: Ic2aed2ca759eb378164f3f65465e23fd7c13a9f8
Reviewed-on: https://webrtc-review.googlesource.com/63261
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22538}
2018-03-21 13:55:18 +00:00
Henrik Lundin
e55313988e NetEq: fix a typo by replacing a comma with a semicolon
Bug: webrtc:8999
Change-Id: I6e2fc51d74bfdc2c7009a6aedbfbb3a36edcbc54
Reviewed-on: https://webrtc-review.googlesource.com/61504
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22409}
2018-03-13 17:15:11 +00:00
Karl Wiberg
d6fbf2a4b1 Tests: Pass codec ID argument to audio codecs
Bug: webrtc:8941
Change-Id: Ia6d51dcbf7d69b38f3615e01d3f7031b8f5c31d0
Reviewed-on: https://webrtc-review.googlesource.com/58092
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22383}
2018-03-12 13:25:29 +00:00
Karl Wiberg
98cd810d31 Production code: Pass codec ID argument to audio codecs
Just a null ID for now, but future CLs will fix that.

Bug: webrtc:8941
Change-Id: I393af0fef752ca3711421bdaf4b2e41cbe286bcf
Reviewed-on: https://webrtc-review.googlesource.com/58093
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22296}
2018-03-05 18:55:19 +00:00
Henrik Lundin
8b84365c81 NetEq: Guarding against reading outside of memory
In rare and pathological circumstances, it could happen that the input
length to the merge function is very short. This CL will avoid one of
the problems with out-of-bounds read that could result from this.

Bug: chromium:799499
Change-Id: I6bde105ae88f9d130764b6dfb3d25443d07e214b
Reviewed-on: https://webrtc-review.googlesource.com/57582
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22180}
2018-02-26 09:30:00 +00:00
Alex Loiko
6df09f6f6a Add decibel conversion functions to //common_audio:common_audio
The functions replace some existing code and will be used in the
the new AutomaticGainController.

Bug: webrtc:7949
Change-Id: I9a32132d4a4699a507b8548a2eac10972a2f3fd6
Reviewed-on: https://webrtc-review.googlesource.com/53141
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22045}
2018-02-16 10:46:48 +00:00
Alex Narest
2d06e366e8 Adds fixed PL loss mode to neteq_quality_test.
It will be available in all inheriting tests.
The mode allows setting start time and duration for every loss event.

Bug: webrtc:8877
Change-Id: Ife36db6d431387083ac22406a0814e02117100bc
Reviewed-on: https://webrtc-review.googlesource.com/51822
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22005}
2018-02-13 15:34:04 +00:00
Alex Narest
7ff6ca5844 Adds voice concealment periods reporting to neteq_rtpplay.
Change-Id: Ie5a89eacef8c1cf7d5a6220b045d2c331fef199e

Bug: webrtc:8847
Change-Id: Ie5a89eacef8c1cf7d5a6220b045d2c331fef199e
Reviewed-on: https://webrtc-review.googlesource.com/48100
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21950}
2018-02-07 18:41:42 +00:00
Henrik Lundin
2cbc20bb56 NetEq quality tests: avoid default preloading of the buffer
Before this change, the test used to preload the buffer with 10
packets before starting to pull out audio. With this change, the
preloading is determined by a new flag (--preload_packets) which
defaults to 0.

This affects all tests derived from NetEqQualityTest, i.e., all
binaries called neteq_*_quality_test.

Bug: none
Change-Id: I920845b968a81ea9972ce8a8e646df29aff200ba
Reviewed-on: https://webrtc-review.googlesource.com/49261
Reviewed-by: Alex Narest <alexnarest@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21943}
2018-02-07 16:19:31 +00:00
Karl Wiberg
80ba333fc5 Move FALLTHROUGH macro to a separate header, and give it an RTC_ prefix
Bug: chromium:805946
Change-Id: Ibb5dce9af27d0e48c9aee6b0a860b6f62b3c76a0
Reviewed-on: https://webrtc-review.googlesource.com/46145
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21889}
2018-02-05 11:24:59 +00:00
Alex Narest
7ef9a0bb46 Add pcm16b quality test supporting 48khz.
Change-Id: I7abb394c61f6fd260f060ca5c16167ae6b44ef68

Bug: webrtc:8836
Change-Id: I7abb394c61f6fd260f060ca5c16167ae6b44ef68
Reviewed-on: https://webrtc-review.googlesource.com/47400
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21878}
2018-02-02 17:18:06 +00:00
Henrik Lundin
4f2a4a12df NetEq: Make the fix for Opus DTX permanent
This change makes the fix for too long delays during Opus DTX periods
permanent. The fix has up until now been under an experiment, named
WebRTC-NetEqOpusDtxDelayFix.

Bug: webrtc:8488,chromium:780849
Change-Id: I006abb67f96d9d7880bf2215d7d6b52db6cbbfbc
Reviewed-on: https://webrtc-review.googlesource.com/44420
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21786}
2018-01-29 08:51:27 +00:00
Mirko Bonadei
81ca3bfb18 Including rtc_base/flags.h after test/gtest.h.
Bug: None
Change-Id: Ic3c0db875902d006935e39139d58dfb842c7a2d6
Reviewed-on: https://webrtc-review.googlesource.com/38180
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21527}
2018-01-09 10:00:33 +00:00
Joachim Bauch
4e90919ad6 Use generic MessageDigest class instead of MD5 / SHA-1 specific classes.
This allows removing the specific classes in a later CL.

Bug: webrtc:8677
Change-Id: I3b9c1f3191c38e6d31a3de990e2d882505e79adc
Reviewed-on: https://webrtc-review.googlesource.com/35040
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Joachim Bauch <jbauch@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21412}
2017-12-21 12:39:50 +00:00
Patrik Höglund
3e113438b1 Fix circular dependencies in webrtc_common.
One reason for the circular deps is that common_types.h is a
historical dumping ground for various structs and defines that
are believed to be generally useful. I tried moving things out
that did not appear to be used downstream (StreamCounters,
RtpCounters etc) and moved the things that seemed used
(RtpHeader + supporting structs) to a new file api/rtp_headers.h.
This makes their place in the api more clear while moving out
the things that don't belong in the API in the first place.

I had to extract out typedefs.h from webrtc_common to resolve
another circular dependency. I believe checks includes typedefs,
but common depends on checks.

Bug: webrtc:7745
Change-Id: I725d49616b1ec0cdc8b74be7c078f7a4d46f084b
Reviewed-on: https://webrtc-review.googlesource.com/33001
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21295}
2017-12-15 14:33:26 +00:00
Robin Raymond
1c62ffa530 Normalize main(..) routines for WinUWP
In order to support WinUWP platform, all main(..) routines must be normalized to the formal int main(int argc, char* argv[]) form. A platform wrapper main is auto-created linking against the default main(...). This can only work if the linkage is exactly matching the proper formal definition and not a loosely defined main(...) alternative.

Bug: webrtc:8608
Change-Id: I606663aaea7df1792c7c5636279617b8926fa5cc
Reviewed-on: https://webrtc-review.googlesource.com/28721
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21229}
2017-12-12 14:32:56 +00:00
Ivo Creusen
d95a7ddbff Fix for overflow bug in histogram scaling function in NetEq.
The experimental function that scales the histogram of inter-arrival times in NetEq suffered from an overflow bug. This caused unexpected increases in the calculated target level.

Bug: webrtc:8381
Change-Id: I2af4d22119fdc684b3cac838c9b317959af17a1f
Reviewed-on: https://webrtc-review.googlesource.com/30261
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21213}
2017-12-11 17:01:36 +00:00
Henrik Lundin
f1061c2d90 rtp_encode: Unify the encoder configs somewhat
For uniformity. Uniformity is nice.

Bug: webrtc:2692
Change-Id: Id85e54fa31bf3cc79e73a72805e57d5e3164252f
Reviewed-on: https://webrtc-review.googlesource.com/27400
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21135}
2017-12-07 09:43:17 +00:00
Ivo Creusen
d1d8dfb5c3 Add code to generate python visualization to neteq_rtpplay
This adds a command line flag to generate a python visualization script from neteq_rtpplay.

Bug: webrtc:8614
Change-Id: Ia6f10d7ff0abac6fdbe9302e7f97a8a12a5bb65b
Reviewed-on: https://webrtc-review.googlesource.com/29940
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21116}
2017-12-06 10:52:42 +00:00
Patrik Höglund
ebe62408b5 Fix circular dependency in rtc_event_log.
Bug: webrtc:6828
Change-Id: Ief948b6799455cfda6cb89e2e632f5fd42df0881
Reviewed-on: https://webrtc-review.googlesource.com/25840
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20928}
2017-11-29 10:46:19 +00:00
Henrik Lundin
abbff89b29 Add new UMA metric for NetEq target buffer delay
The UMA metric will log the same information that goes into the
googPreferredJitterBufferMs stat.

Bug: webrtc:8488
Change-Id: I4e4e1e362dd42377105d52d2c4cd49c1ecb1a90d
Reviewed-on: https://webrtc-review.googlesource.com/26740
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20923}
2017-11-29 08:56:29 +00:00
Henrik Lundin
32f64d2ef9 rtp_encode: Fixing bug related to DTX
Bug: webrtc:2692
Change-Id: I7b884b22cab21b9dce77e5599f43431bbc899f5d
Reviewed-on: https://webrtc-review.googlesource.com/26027
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20909}
2017-11-28 12:35:38 +00:00
Henrik Lundin
e9619f8f81 Add a new NetEq decoding unit test for Opus with DTX
This tests NetEq with a stream encoded with Opus using it's internal
DTX/CNG.

Also adding a new resource file which is encoded using Opus with DTX.

Bug: webrtc:8488
Change-Id: Icfba5bc5dc7f9c9d0e637a90f4df674e8ba40358
Reviewed-on: https://webrtc-review.googlesource.com/26028
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20905}
2017-11-28 10:45:38 +00:00
Henrik Lundin
81af414ffb Replacing the legacy tool RTPjitter with a new rtp_jitter
This new tool provides the similar functionality as the legacy tool, but
is implemented using less legacy helpers. It also replaces RTPtimeshift
and RTPchange. The most significant change versus the old RTPjitter tool
is that the new tool takes the timing data in the form of integers in a
text file (instead of the binary data file used by the old tool). This
should make it easier to create custom timing files when needed.

Bug: webrtc:2692
Change-Id: I5e46fe7abdd9ca8c04a04de87555204fca36e287
Reviewed-on: https://webrtc-review.googlesource.com/25700
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20868}
2017-11-24 13:38:59 +00:00
Henrik Lundin
1391bd472c Replacing the legacy tool RTPencode with a new rtp_encode
This new tool provides the same functionality as the legacy tool, but it
is implemented using AudioCodingModule and AudioEncoder APIs instead of
the naked codecs.

Bug: webrtc:2692
Change-Id: I29accd77d4ba5c7b5e1559853cbaf20ee812e6bc
Reviewed-on: https://webrtc-review.googlesource.com/24861
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20857}
2017-11-24 09:05:48 +00:00
Karl Wiberg
e40468ba3d Move some numeric utility code from rtc_base/ to rtc_base/numerics/
Specifically, I'm moving

  safe_compare.h
  safe_conversions.h
  safe_minmax.h

They shouldn't be part of the API, and moving them to an appropriate
subdirectory of rtc_base/ is a good way to keep track of that.

BUG=webrtc:8445

Change-Id: I458531aeb30bcf4291c4bec3bf22a2fffbf054ff
Reviewed-on: https://webrtc-review.googlesource.com/20860
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20829}
2017-11-22 11:21:47 +00:00
Henrik Lundin
156af4ae61 neteq_rtpplay: Add buffer size (target and current) to print-out
Bug: none
Change-Id: Id940471235e9f54e1e46569c74255759a891395d
Reviewed-on: https://webrtc-review.googlesource.com/24100
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20783}
2017-11-20 08:07:30 +00:00
Oskar Sundbom
12ab00b4d8 Optional: Use nullopt and implicit construction in /modules/audio_coding
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

R=kwiberg@webrtc.org

Bug: None
Change-Id: I055411a3e521964c81100869a197dd92f5608f1b
Reviewed-on: https://webrtc-review.googlesource.com/23619
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20728}
2017-11-17 11:58:37 +00:00
Mirko Bonadei
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

for m in PLOG \
  LOG_TAG \
  LOG_GLEM \
  LOG_GLE_EX \
  LOG_GLE \
  LAST_SYSTEM_ERROR \
  LOG_ERRNO_EX \
  LOG_ERRNO \
  LOG_ERR_EX \
  LOG_ERR \
  LOG_V \
  LOG_F \
  LOG_T_F \
  LOG_E \
  LOG_T \
  LOG_CHECK_LEVEL_V \
  LOG_CHECK_LEVEL \
  LOG
do
  git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
Henrik Lundin
180362842a NetEq: Fix a problem with too large delay during codec-internal DTX/CNG
The length of the generated comfort noise is measured with a
counter. A bug in the implementation caused the counter to be reset
not only when a new packet was decoded, but also when NetEq asked the
decoder for more comfort noise without giving it a new packet to
decode. This means that the counter was reset once every 20 ms (in the
case of Opus), and it would never match the gap in timestamps that is
the exit criterion for CNG. This would have resulted in perpetual CNG,
but there is a stop-gap in NetEq. If the buffer level exceeds 4 times
the target level, CNG mode is exited anyway. This is what happens at
the end of every silence period.

With this CL, the bug should be fixed. The fix is wrapped in an
experiment, to allow verifying the fix and the impact of it with real
world data.

Bug: webrtc:8488
Change-Id: Idfc24df780eb2c55dbf08de840e6644e8557a0af
Reviewed-on: https://webrtc-review.googlesource.com/18181
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20551}
2017-11-02 13:09:07 +00:00
Karl Wiberg
eb254b40b3 Don't select audio codecs depending on GN vars build_with_{chromium|mozilla}
BUG=webrtc:8343

Change-Id: I5943006a4da17f72eb88eae9d7ea57574d54f680
Reviewed-on: https://webrtc-review.googlesource.com/9401
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20540}
2017-11-01 18:59:27 +00:00
Henrik Lundin
8731176b92 NetEq: Fix an UBSan error
UBSan will trigger when shifting a negative value. This change avoids
that by replacing "x << 8" with "x * (1 << 8)".

Bug: chromium:666877
Change-Id: Ic89bd98e5a3feff35075df96b104b386cb4d8803
Reviewed-on: https://webrtc-review.googlesource.com/14552
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20387}
2017-10-23 11:56:47 +00:00
Mirko Bonadei
b7e1788466 Fixing other unsafe conversions.
The bot "Win (more_configs)" has spotted another unsafe type conversion.

This CL is a follow-up of:
- https://webrtc-review.googlesource.com/c/src/+/12921
- https://webrtc-review.googlesource.com/c/src/+/13122
- https://webrtc-review.googlesource.com/c/src/+/13622

Bug: chromium:759980
Change-Id: I9a4268e7ea938cc85376211b40767fd8465f37fd
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/13623
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20381}
2017-10-23 07:59:39 +00:00
Ivo Creusen
fd7c0a566a Avoid NetEq triggering a Framelength change when receiving an FEC packet.
Internally in NetEq, an FEC packet looks very similar to a split packet, which caused NetEq to miscalculate the frame length of FEC packets. This incorrect framelength calculation was incorrectly handled as a framelength change by NetEq.

Bug: webrtc:8410
Change-Id: Icaea961d055e49d7726b87811881db0b9149805b
Reviewed-on: https://webrtc-review.googlesource.com/12420
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20373}
2017-10-20 11:56:23 +00:00
Mirko Bonadei
ea7a3f8225 Fixing unsafe conversion
The bot "Win (more_configs)" has spotted another unsafe type conversion.

This CL is a follow-up of:
- https://webrtc-review.googlesource.com/c/src/+/12921
- https://webrtc-review.googlesource.com/c/src/+/13122

Bug: chromium:759980
Change-Id: I3634c3e20fcd9f4e106914399ac40ca87d4c6137
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/13622
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20349}
2017-10-19 10:59:50 +00:00
Mirko Bonadei
737e073f8d Fixing warning C4267 on Win (more_configs).
This is a follow-up of https://webrtc-review.googlesource.com/c/src/+/12921.

Bug: chromium:759980
Change-Id: Ifd39adb6541c0c7e0337f587a8b34b84a07331ed
Reviewed-on: https://webrtc-review.googlesource.com/13122
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20341}
2017-10-19 07:39:22 +00:00
Ivo Creusen
25eb28c8c2 Bugfix for histogram scaling function in NetEq's DelayManager.
If the previous value of the histogram is unknown, no scaling should be performed. Without this check a crash would occur. This issue was introduced in https://webrtc-review.googlesource.com/c/src/+/8101, and can only be triggered if the corresponding field trial is set.

Bug: webrtc:8381
Change-Id: I6e7cd8e14f6f4cc972fc094f010ecdf5091b2017
Reviewed-on: https://webrtc-review.googlesource.com/12380
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20336}
2017-10-18 12:58:18 +00:00
Mirko Bonadei
a811027990 Fixing warning C4267 on Win (more_configs).
We added a new bot to client.webrtc.fyi (https://build.chromium.org/p/client.webrtc.fyi/builders/Win%20%28more%20configs%29).

It seems it is spotting some unsafe conversions and this CL is a test to see if we can use rtc::dchecked_cast to fix them:
../../modules/audio_coding/neteq/neteq_unittest.cc(547): error C2220: warning treated as error - no 'object' file generated
../../modules/audio_coding/neteq/neteq_unittest.cc(547): warning C4267: '=': conversion from 'size_t' to 'uint16_t', possible loss of data
../../modules/audio_coding/neteq/neteq_unittest.cc(548): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
../../modules/audio_coding/neteq/neteq_unittest.cc(977): warning C4267: '+=': conversion from 'size_t' to 'uint32_t', possible loss of data
../../modules/audio_coding/neteq/neteq_unittest.cc(979): warning C4267: '+=': conversion from 'size_t' to 'uint32_t', possible loss 

Bug: chromium:759980
Change-Id: Icd0f32ccf620c7c6642fadff797dc2482918648d
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/12921
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20335}
2017-10-18 12:28:58 +00:00
Karl Wiberg
31fbb5425e NetEq: Drop unnecessary dependency on the audio decoder implementations
BUG=webrtc:8396

Change-Id: I7524dae93b43b656a13fdd535e48373bc29b405e
Reviewed-on: https://webrtc-review.googlesource.com/10804
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20310}
2017-10-16 12:57:47 +00:00
Karl Wiberg
f52a3a78c5 We don't want implicit conversion from size_t to int
...and at least one of our compilers (Visual Studio 64-bit) complains
about it.

BUG=none

Change-Id: I271334f4da564690ff2a16a8322e7ed4a00ae173
Reviewed-on: https://webrtc-review.googlesource.com/10809
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20309}
2017-10-16 12:51:48 +00:00
Ivo Creusen
385b10bbaa Added experiment to improve handling of frame length changes in NetEq.
The field trial effects two things: after a frame length change the IAT
histogram is scaled to prevent an immediate change in target buffer
level. Also, the peak history in the delay peak detector is cleared, 
because the size of the peaks is stored in number of packets (which
will be incorrect after a frame length change).

Bug: webrtc:8381
Change-Id: I214b990f6e5959b655b6542884a7f75da181a0d8
Reviewed-on: https://webrtc-review.googlesource.com/8101
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20284}
2017-10-13 13:26:57 +00:00
Henrik Lundin
8cd750df1e Enable NetEq's Opus bit-exactness tests for Android
When the test was created, it was disabled for mobile platforms from
the beginning. This is likely a copy-paste from the related
NetEqDecodingTest.TestBitExactness which includes testing codecs not
supported on mobile platforms (e.g., iLBC). This restriction is not
needed for the Opus-only test.

The test remains disabled for iOS, since none of the bots actually run
the relevant test binary on actual iOS devices.

Bug: none
Change-Id: I9071e0e32c83b62c8c7af59ac1cb3e46227f8e8e
Reviewed-on: https://webrtc-review.googlesource.com/8561
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20264}
2017-10-13 07:01:36 +00:00
Niels Möller
84255bbe3b Add explicit includes of refcountedobject.h where it is used.
This is in preparation for deleting the include in rtc_base/refcount.h,
but that change has to wait for some downstream applications to 
not rely in the indirect include.

Partial reland of "Make rtc_base/refcount.h self contained, not including refcountedobject.h."

This is a reland of b7239a9dc8
Original change's description:
> Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> 
> The refcount.h file doesn't depend on anything from
> refcountedobject.h. The motivation of this change to make it possible
> to add additional declarations to refcount.h, and include it from
> refcountedobject.h.
> 
> Bug: webrtc:8270
> Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> Reviewed-on: https://webrtc-review.googlesource.com/5760
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20106}

Bug: webrtc:8270
Change-Id: I63a42712f6c1ec83823c629d1a954fd1a04d4a6c
Reviewed-on: https://webrtc-review.googlesource.com/7281
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20185}
2017-10-06 13:00:14 +00:00
Niels Moller
fb26f85b79 Revert "Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h.""
This reverts commit bf6937a8e9.

Reason for revert: Broke internal projects.

Original change's description:
> Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
> 
> This is a reland of b7239a9dc8
> Original change's description:
> > Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> > 
> > The refcount.h file doesn't depend on anything from
> > refcountedobject.h. The motivation of this change to make it possible
> > to add additional declarations to refcount.h, and include it from
> > refcountedobject.h.
> > 
> > Bug: webrtc:8270
> > Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> > Reviewed-on: https://webrtc-review.googlesource.com/5760
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Commit-Queue: Niels Moller <nisse@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20106}
> 
> Bug: webrtc:8270
> Change-Id: I9738f6680ab52d0f43639a1a39175fdba5957681
> Reviewed-on: https://webrtc-review.googlesource.com/5840
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20180}

TBR=kwiberg@webrtc.org,nisse@webrtc.org

Change-Id: I342b241f5bb707b59ccf2d15a1a5befecb53a52e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8270
Reviewed-on: https://webrtc-review.googlesource.com/7280
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20181}
2017-10-06 11:05:55 +00:00
Niels Möller
bf6937a8e9 Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
This is a reland of b7239a9dc8
Original change's description:
> Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> 
> The refcount.h file doesn't depend on anything from
> refcountedobject.h. The motivation of this change to make it possible
> to add additional declarations to refcount.h, and include it from
> refcountedobject.h.
> 
> Bug: webrtc:8270
> Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> Reviewed-on: https://webrtc-review.googlesource.com/5760
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20106}

Bug: webrtc:8270
Change-Id: I9738f6680ab52d0f43639a1a39175fdba5957681
Reviewed-on: https://webrtc-review.googlesource.com/5840
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20180}
2017-10-06 10:20:48 +00:00
Elad Alon
1d87b0e40f Create RtcEventLogEncoderLegacy
We're moving to an RtcEventLog interface that accepts std::unique_ptr<EventLog> and stores the event for encoding when encoding becomes necessary, rather than before. This will be useful while we maintain the legacy (current) encoding alongside the new encoding on which we're working.

This CL introduces RtcEventLogEncoderLegacy, which takes provides the encoding currently done by RtcEventLogImpl. After this, we can modify RtcEventLogImpl to use a dynamically chosen encoding, allowing us to easily choose between the current encoding and the new one on which we're working.

BUG=webrtc:8111
TBR=stefan@webrtc.org

Change-Id: I3dde7e222a40a117549a094a59b04219467f490a
Reviewed-on: https://webrtc-review.googlesource.com/1364
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20116}
2017-10-03 13:51:59 +00:00
Niels Moller
d25fa78daf Revert "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
This reverts commit b7239a9dc8.

Reason for revert: Broke chromium mac build, compilation failures on content/renderer/media/webrtc/webrtc_video_frame_adapter.h.

Original change's description:
> Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> 
> The refcount.h file doesn't depend on anything from
> refcountedobject.h. The motivation of this change to make it possible
> to add additional declarations to refcount.h, and include it from
> refcountedobject.h.
> 
> Bug: webrtc:8270
> Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> Reviewed-on: https://webrtc-review.googlesource.com/5760
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20106}

TBR=kwiberg@webrtc.org,nisse@webrtc.org

Change-Id: I7334597cc8979ba9cfaff526967084349ef27f3c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8270
Reviewed-on: https://webrtc-review.googlesource.com/5800
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20107}
2017-10-03 09:49:04 +00:00
Niels Möller
b7239a9dc8 Make rtc_base/refcount.h self contained, not including refcountedobject.h.
The refcount.h file doesn't depend on anything from
refcountedobject.h. The motivation of this change to make it possible
to add additional declarations to refcount.h, and include it from
refcountedobject.h.

Bug: webrtc:8270
Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
Reviewed-on: https://webrtc-review.googlesource.com/5760
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20106}
2017-10-03 09:37:30 +00:00