Implement NetEq duration estimation for Opus.

Review URL: https://webrtc-codereview.appspot.com/983004
Patch from Ralph Giles <giles@webrtc.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3314 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tina.legrand@webrtc.org
2012-12-19 09:52:45 +00:00
parent 515ef2428c
commit 4275ab1ca0
3 changed files with 35 additions and 2 deletions

View File

@ -126,6 +126,21 @@ int16_t WebRtcOpus_DecodeSlave(OpusDecInst* inst, int16_t* encoded,
int16_t WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
int16_t number_of_lost_frames);
/****************************************************************************
* WebRtcOpus_DurationEst(...)
*
* This function calculates the duration of an opus packet.
* Input:
* - inst : Decoder context
* - payload : Encoded data pointer
* - payload_length_bytes : Bytes of encoded data
*
* Return value : The duration of the packet, in samples.
*/
int WebRtcOpus_DurationEst(OpusDecInst* inst,
const uint8_t* payload,
int payload_length_bytes);
#ifdef __cplusplus
} // extern "C"
#endif