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
diff --git a/webrtc/modules/audio_coding/neteq/mcu.h b/webrtc/modules/audio_coding/neteq/mcu.h
index 6994a36..1be81c2 100644
--- a/webrtc/modules/audio_coding/neteq/mcu.h
+++ b/webrtc/modules/audio_coding/neteq/mcu.h
@@ -88,6 +88,13 @@
int16_t TSscalingInitialized;
enum TsScaling scalingFactor;
+ /* AV-sync enabled. In AV-sync NetEq screens packets for specific sync
+ * packets. Sync packets are not decoded by a decoder but generate all-zero
+ * signal with the same number of samples as previously decoded payload.
+ * Also in AV-sync mode the sample-size of a sync payload is reported as
+ * previous frame-size. */
+ int av_sync;
+
#ifdef NETEQ_STEREO
int usingStereo;
#endif
@@ -196,6 +203,7 @@
*
* Input:
* - inst : MCU instance
+ * - av_sync : 1 if NetEQ is in AV-sync mode, otherwise 0.
*
* Return value : 0 - Ok
* <0 - Error
@@ -229,12 +237,17 @@
* - MCU_inst : MCU instance
* - RTPpacket : The RTP packet, parsed into NetEQ's internal RTP struct
* - uw32_timeRec : Time stamp for the arrival of the packet (not RTP timestamp)
+ * - av_sync : indicates if AV-sync is enabled, 1 enabled,
+ * 0 disabled.
*
* Return value : 0 - Ok
* -1 - Error
*/
-int WebRtcNetEQ_SplitAndInsertPayload(RTPPacket_t *packet, PacketBuf_t *Buffer_inst,
- SplitInfo_t *split_inst, int16_t *flushed);
+int WebRtcNetEQ_SplitAndInsertPayload(RTPPacket_t* packet,
+ PacketBuf_t* Buffer_inst,
+ SplitInfo_t* split_inst,
+ int16_t* flushed,
+ int av_sync);
/****************************************************************************
* WebRtcNetEQ_GetTimestampScaling(...)