From 1c649378ac22d512909ebb2fbabfac041378991e Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Sat, 30 Dec 2006 02:46:57 +0000 Subject: Implement ticket #40: support for asymmetric encoding/decoding ptime (e.g. with iLBC when local and remote have different mode) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@874 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/include/pjmedia/codec.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'pjmedia/include') diff --git a/pjmedia/include/pjmedia/codec.h b/pjmedia/include/pjmedia/codec.h index 3838e8a7..f93e9333 100644 --- a/pjmedia/include/pjmedia/codec.h +++ b/pjmedia/include/pjmedia/codec.h @@ -253,7 +253,9 @@ typedef struct pjmedia_codec_param unsigned clock_rate; /**< Sampling rate in Hz */ unsigned channel_cnt; /**< Channel count. */ pj_uint32_t avg_bps; /**< Average bandwidth in bits/sec */ - pj_uint16_t frm_ptime; /**< Base frame ptime in msec. */ + pj_uint16_t frm_ptime; /**< Decoder frame ptime in msec. */ + pj_uint16_t enc_ptime; /**< Encoder ptime, or zero if it's + equal to decoder ptime. */ pj_uint8_t pcm_bits_per_sample; /**< Bits/sample in the PCM side */ pj_uint8_t pt; /**< Payload type. */ } info; @@ -306,7 +308,10 @@ typedef struct pjmedia_codec_op pj_pool_t *pool ); /** - * Open the codec and initialize with the specified parameter.. + * Open the codec and initialize with the specified parameter. + * Upon successful initialization, the codec may modify the parameter + * and fills in the unspecified values (such as enc_ptime, when + * encoder ptime is different than decoder ptime). * * @param codec The codec instance. * @param param Codec initialization parameter. @@ -314,7 +319,7 @@ typedef struct pjmedia_codec_op * @return PJ_SUCCESS on success. */ pj_status_t (*open)(pjmedia_codec *codec, - const pjmedia_codec_param *param ); + pjmedia_codec_param *param ); /** * Close and shutdown codec, releasing all resources allocated by -- cgit v1.2.3