diff options
author | wu@webrtc.org <wu@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-06-05 20:34:08 +0000 |
---|---|---|
committer | wu@webrtc.org <wu@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-06-05 20:34:08 +0000 |
commit | 81f8df9af96c6b4bf43234f2a0162146a5da6112 (patch) | |
tree | 9c40832ad59dac6f440d07f1a3fb9524dbd24b60 /test | |
parent | 553b68f8800030af6af2a5dd3a941258cd05a275 (diff) | |
download | webrtc-81f8df9af96c6b4bf43234f2a0162146a5da6112.tar.gz |
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/webrtc@6346 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'test')
-rw-r--r-- | test/fake_audio_device.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/fake_audio_device.cc b/test/fake_audio_device.cc index d3421ebd..989c12b7 100644 --- a/test/fake_audio_device.cc +++ b/test/fake_audio_device.cc @@ -121,8 +121,8 @@ void FakeAudioDevice::CaptureAudio() { samples_needed = std::min(kFrequencyHz / time_since_last_playout_ms, kBufferSizeBytes / 2); uint32_t samples_out = 0; - uint32_t rtp_timestamp = 0; - int64_t ntp_time_ms = 0; + int64_t elapsed_time_ms = -1; + int64_t ntp_time_ms = -1; EXPECT_EQ(0, audio_callback_->NeedMorePlayData(samples_needed, 2, @@ -130,7 +130,7 @@ void FakeAudioDevice::CaptureAudio() { kFrequencyHz, playout_buffer_, samples_out, - &rtp_timestamp, + &elapsed_time_ms, &ntp_time_ms)); } } |