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 /voice_engine/channel.h | |
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 'voice_engine/channel.h')
-rw-r--r-- | voice_engine/channel.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/voice_engine/channel.h b/voice_engine/channel.h index 7c8a3e2e..3c49d9bd 100644 --- a/voice_engine/channel.h +++ b/voice_engine/channel.h @@ -35,6 +35,11 @@ #include "webrtc/voice_engine/include/voe_dtmf.h" #endif +namespace rtc { + +class TimestampWrapAroundHandler; +} + namespace webrtc { class AudioDeviceModule; @@ -500,6 +505,8 @@ private: int SetSendRtpHeaderExtension(bool enable, RTPExtensionType type, unsigned char id); + int32_t GetPlayoutFrequency(); + CriticalSectionWrapper& _fileCritSect; CriticalSectionWrapper& _callbackCritSect; CriticalSectionWrapper& volume_settings_critsect_; @@ -553,9 +560,9 @@ private: scoped_ptr<CriticalSectionWrapper> ts_stats_lock_; - bool first_frame_arrived_; + scoped_ptr<rtc::TimestampWrapAroundHandler> rtp_ts_wraparound_handler_; // The rtp timestamp of the first played out audio frame. - uint32_t capture_start_rtp_time_stamp_; + int64_t capture_start_rtp_time_stamp_; // The capture ntp time (in local timebase) of the first played out audio // frame. int64_t capture_start_ntp_time_ms_; |