Improve AV-sync when initial delay is set and NetEq has long buffer.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3883 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
turaj@webrtc.org
2013-04-22 18:53:35 +00:00
parent 1b427719dc
commit 28d54ab18f
17 changed files with 522 additions and 123 deletions

View File

@ -60,13 +60,31 @@ class ACMNetEQ {
// - rtp_info : RTP header for the incoming payload containing
// information about payload type, sequence number,
// timestamp, SSRC and marker bit.
// - receive_timestamp : received timestamp.
//
// Return value : 0 if ok.
// <0 if NetEQ returned an error.
//
int32_t RecIn(const uint8_t* incoming_payload,
const int32_t length_payload,
const WebRtcRTPHeader& rtp_info);
const WebRtcRTPHeader& rtp_info,
uint32_t receive_timestamp);
//
// RecIn()
// Insert a sync payload to NetEq. Should only be called if |av_sync_| is
// enabled;
//
// Input:
// - rtp_info : RTP header for the incoming payload containing
// information about payload type, sequence number,
// timestamp, SSRC and marker bit.
// - receive_timestamp : received timestamp.
//
// Return value : 0 if ok.
// <0 if NetEQ returned an error.
//
int RecIn(const WebRtcRTPHeader& rtp_info, uint32_t receive_timestamp);
//
// RecOut()
@ -278,6 +296,11 @@ class ACMNetEQ {
overhead_bytes = per_packet_overhead_bytes_;
}
//
// Set AV-sync mode.
//
void EnableAVSync(bool enable);
private:
//
// RTPPack()
@ -350,6 +373,9 @@ class ACMNetEQ {
// Minimum of buffer-size among all NetEq instances.
int min_of_buffer_size_bytes_;
int per_packet_overhead_bytes_;
// Keep track of AV-sync. Just used to set the slave when a slave is added.
bool av_sync_;
};
} // namespace webrtc