Allow NetEQ to use real packet durations.
This is a copy of http://review.webrtc.org/864014/ This adds a FuncDurationEst to each codec instance which estimates the duration of a packet given the packet contents and the duration of the previous packet. By default, this simply returns the duration of the previous packet (which is what is currently assumed to be the duration of all future packets). This patch also provides an initial implementation of this function for G.711 which returns the actual number of samples in the packet. BUG=issue1015 Review URL: https://webrtc-codereview.appspot.com/935016 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3129 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -46,6 +46,7 @@ typedef struct
|
||||
FuncGetMDinfo funcGetMDinfo[NUM_CODECS];
|
||||
FuncGetPitchInfo funcGetPitch[NUM_CODECS];
|
||||
FuncUpdBWEst funcUpdBWEst[NUM_CODECS];
|
||||
FuncDurationEst funcDurationEst[NUM_CODECS];
|
||||
FuncGetErrorCode funcGetErrorCode[NUM_CODECS];
|
||||
void * codec_state[NUM_CODECS];
|
||||
WebRtc_UWord16 codec_fs[NUM_CODECS];
|
||||
@@ -74,8 +75,9 @@ int WebRtcNetEQ_DbAdd(CodecDbInst_t *inst, enum WebRtcNetEQDecoder codec,
|
||||
FuncDecode funcDecodeRCU, FuncDecodePLC funcDecodePLC,
|
||||
FuncDecodeInit funcDecodeInit, FuncAddLatePkt funcAddLatePkt,
|
||||
FuncGetMDinfo funcGetMDinfo, FuncGetPitchInfo funcGetPitch,
|
||||
FuncUpdBWEst funcUpdBWEst, FuncGetErrorCode funcGetErrorCode,
|
||||
void* codec_state, WebRtc_UWord16 codec_fs);
|
||||
FuncUpdBWEst funcUpdBWEst, FuncDurationEst funcDurationEst,
|
||||
FuncGetErrorCode funcGetErrorCode, void* codec_state,
|
||||
WebRtc_UWord16 codec_fs);
|
||||
|
||||
/*
|
||||
* Removes a codec from the database.
|
||||
@@ -98,7 +100,7 @@ int WebRtcNetEQ_DbGetPayload(CodecDbInst_t *inst, enum WebRtcNetEQDecoder codecI
|
||||
* Returns codec identifier given a payload number.
|
||||
*/
|
||||
|
||||
int WebRtcNetEQ_DbGetCodec(CodecDbInst_t *inst, int payloadType);
|
||||
int WebRtcNetEQ_DbGetCodec(const CodecDbInst_t *inst, int payloadType);
|
||||
|
||||
/*
|
||||
* Extracts the Payload Split information of the codec with the specified payloadType.
|
||||
@@ -115,7 +117,7 @@ int WebRtcNetEQ_DbIsMDCodec(enum WebRtcNetEQDecoder codecID);
|
||||
/*
|
||||
* Returns 1 if payload type is registered as a CNG codec, 0 otherwise.
|
||||
*/
|
||||
int WebRtcNetEQ_DbIsCNGPayload(CodecDbInst_t *inst, int payloadType);
|
||||
int WebRtcNetEQ_DbIsCNGPayload(const CodecDbInst_t *inst, int payloadType);
|
||||
|
||||
/*
|
||||
* Return the sample rate for the codec with the given payload type, 0 if error.
|
||||
|
||||
Reference in New Issue
Block a user