28 Commits

Author SHA1 Message Date
wu@webrtc.org
94454b71ad Fix the chain that propagates the audio frame's rtp and ntp timestamp including:
* In AudioCodingModuleImpl::PlayoutData10Ms, don't reset the timestamp got from GetAudio.
* When there're more than one participant, set AudioFrame's RTP timestamp to 0.
* Copy ntp_time_ms_ in AudioFrame::CopyFrom method.
* In RemixAndResample, pass src frame's timestamp_ and ntp_time_ms_ to the dst frame.
* Fix how |elapsed_time_ms| is computed in channel.cc by adding GetPlayoutFrequency.

Tweaks on ntp_time_ms_:
* Init ntp_time_ms_ to -1 in AudioFrame ctor.
* When there're more than one participant, set AudioFrame's ntp_time_ms_ to an invalid value. I.e. we don't support ntp_time_ms_ in multiple participants case before the mixing is moved to chrome.

Added elapsed_time_ms to AudioFrame and pass it to chrome, where we don't have the information about the rtp timestmp's sample rate, i.e. can't convert rtp timestamp to ms.

BUG=3111
R=henrik.lundin@webrtc.org, turaj@webrtc.org, xians@webrtc.org
TBR=andrew
andrew to take another look on audio_conference_mixer_impl.cc

Review URL: https://webrtc-codereview.appspot.com/14559004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6346 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-05 20:34:08 +00:00
henrik.lundin@webrtc.org
2f816bbae7 NetEq: Add thread annotation to const scoped_ptrs
Since the objects pointed to are not const, only the pointer to them,
they too must be accessed under lock.

Move the crit_sect to above the variables it is protecting.

R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12679006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6340 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-05 10:37:13 +00:00
henrik.lundin@webrtc.org
1b9df05c85 Revert 6257 "Rename neteq4 folder to neteq"
> Rename neteq4 folder to neteq
> 
> BUG=2996
> R=turaj@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/12569005

TBR=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/13549004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6259 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-28 07:33:39 +00:00
henrik.lundin@webrtc.org
a90f6d67f7 Rename neteq4 folder to neteq
BUG=2996
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12569005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6257 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-28 06:23:34 +00:00
henrike@webrtc.org
88fbb2d86b Switch to using base/constructormagic.h and remove system_wrappers/interface/constructor_magic.h.
Same as https://webrtc-codereview.appspot.com/19519004. The issue in
http://chromegw.corp.google.com/i/internal.chromium.webrtc.fyi/builders/Linux...
is solved by this change
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/libjingle/libjing...
(tested locally).

BUG=3380
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/17619005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6218 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-21 21:18:46 +00:00
mcasas@webrtc.org
2fa7f79094 Revert 6202 "Switch to using base/constructormagic.h and remove ..."
> Switch to using base/constructormagic.h and remove system_wrappers/interface/constructor_magic.h.
> 
> BUG=N/A
> R=andrew@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/19519004

TBR=henrike@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/14579007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6210 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-21 11:07:29 +00:00
henrike@webrtc.org
125ffd709d Switch to using base/constructormagic.h and remove system_wrappers/interface/constructor_magic.h.
BUG=N/A
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/19519004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6202 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-20 15:20:44 +00:00
turaj@webrtc.org
b9863ce6ba One of the NetEq methods needs to be virtual.
BUG=
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/20449004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6099 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-10 00:58:49 +00:00
henrik.lundin@webrtc.org
116ed1d4f0 Include buffer size limits in NetEq config struct
This change includes max_packets_in_buffer and max_delay_ms in the
NetEq config struct. The packet buffer is also no longer limited in
terms of payload sizes (bytes), only number of packets.

The old constants governing the packet buffer limits are deleted.

BUG=3083
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/14389004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5989 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-28 08:20:04 +00:00
andrew@webrtc.org
8f69330310 Replace scoped_array<T> with scoped_ptr<T[]>.
scoped_array is deprecated. This was done using a Chromium clang tool:
http://src.chromium.org/viewvc/chrome/trunk/src/tools/clang/rewrite_scoped_ar...

except for the few not-built-on-Linux files which were updated manually.

TESTED=trybots
BUG=2515
R=niklas.enbom@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12429004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5985 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-25 23:10:28 +00:00
turaj@webrtc.org
a596a389ea Fix iSAC/48000 issue with ACM2.
Registeration of iSAC into NetEq is through injecting and external AudioDecoder. This is because iSAC encoder and decoder need to share instances for bandwidth estimator to work. When external decoder is registerred, the sampling rate of the decoder had to be specified. iSAC/48000 decoder has a native sampling rate of 32000 Hz, but it has been registered as 48000 Hz decoder.

This CL fixing this issue by letting NetEq to obtain sampling rate of an external coder according to its existing database.

BUG=3143
TEST=voe_cmd_test,modules_unittest,try-bots
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12139004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5936 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-17 23:30:49 +00:00
turaj@webrtc.org
8d1cdaa84e NetEq changes.
BUG=
R=henrik.lundin@webrtc.org, minyue@webrtc.org, tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9859005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5889 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-11 18:47:55 +00:00
henrik.lundin@webrtc.org
b287d968d9 New NetEq test to verify correct timestamp propagation
BUG=3154
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/11319004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5860 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-07 21:21:45 +00:00
henrik.lundin@webrtc.org
dcc301be07 Adding thread annotations to NetEq4
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9959004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5716 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-18 11:49:22 +00:00
henrik.lundin@webrtc.org
d9faa46d57 Changing to using factory methods for some classes in NetEq
In this CL, the Expand, Accelerate and PreemptiveExpand objects are
created using factory methods. The factory methods are injected into
NetEqImpl on creation. This is a step towards implementing a no-decode
operation.

BUG=2776
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6999005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5382 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-14 10:18:45 +00:00
henrik.lundin@webrtc.org
fd11bbfb56 NetEq4: Removing templatization for AudioMultiVector
This saves approx 6% runtime for neteq4_speed_test.
$ time out/Release/neteq4_speed_test --runtime_ms=50000000

BUG=1363
R=minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2320006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4885 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-30 20:38:44 +00:00
turaj@webrtc.org
7b75ac6756 Sync-packet insertion into NetEq4. This is related to r3883 & r4052 for NetEq 3.
BUG=
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2099004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4850 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-26 00:27:56 +00:00
turaj@webrtc.org
ff43c85ef1 API add to set background noise mode.
Background noise mode.

BUG=
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2194005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4835 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-25 00:07:27 +00:00
henrik.lundin@webrtc.org
0d5da25e6c NetEq4: Making a few more members scoped_ptrs
This CL converts a few members in NetEqImpl form regular pointers
to scoped_ptrs.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2245004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4783 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-18 21:12:38 +00:00
henrik.lundin@webrtc.org
40d3fc65f5 NetEq4: Make some DSP operation classes member variables
This CL reduces the memory allocations by making the instances of
Accelerate, PreemptiveExpand, Normal and Merge member variables in
NetEqImpl.

This change reduced the allocation count by 20,000 in the bit-exactness
test.

BUG=Issue 1363
TEST=out/Debug/modules_unittests
--gtest_filter=NetEqDecodingTest.TestBitExactness

R=andrew@webrtc.org, minyue@webrtc.org, turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2158004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4776 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-18 12:19:50 +00:00
turaj@webrtc.org
036b7436df Adding APIs. These APIs are not implemented yet, they are to help developement of ACM.
Un-implemented APIs.

TBR=henrik.lundin@webrtc.org
BUG=

Review URL: https://webrtc-codereview.appspot.com/2191008

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4725 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-11 18:45:02 +00:00
henrik.lundin@webrtc.org
c487c6abb0 NetEq4: Make the algorithm buffer a member variable
This reduces the alloc count by more than 100,000 for
NetEqDecodingTest.TestBitExactness.

BUG=1363
TEST=out/Release/modules_unittests --gtest_filter=NetEqDecodingTest.TestBitExactness
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2119004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4651 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-02 07:59:30 +00:00
minyue@webrtc.org
d7301775f5 update neteq 4 to facilitate NACK
BUG=
R=turaj@webrtc.org, turajs@google.com

Review URL: https://webrtc-codereview.appspot.com/2008004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4637 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-29 00:58:14 +00:00
turaj@webrtc.org
f1efc57139 Implementing APIs to set maximum and minimum for latency.
cpplint warnning fixed

Ready for review

BUG=
R=minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1971004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4563 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-16 23:44:24 +00:00
minyue@webrtc.org
9721db799c removed NetEq::EnableDtmf()
BUG=webrtc:1373
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1822005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4492 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-06 05:36:26 +00:00
turaj@webrtc.org
7df9706a01 Add one API for implementing Initial delay.
R=minyue@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1939004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4475 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-02 18:07:13 +00:00
henrik.lundin@webrtc.org
e1d468c019 Fix a few small nits in NetEq4
TEST=try bots

Review URL: https://webrtc-codereview.appspot.com/1061010

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3431 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-30 07:37:20 +00:00
henrik.lundin@webrtc.org
d94659dc27 Initial upload of NetEq4
This is the first public upload of the new NetEq, version 4.

It has been through extensive internal review during the course of
the project.

TEST=trybots

Review URL: https://webrtc-codereview.appspot.com/1073005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3425 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-29 12:09:21 +00:00