From f7d8a18e6d9b7591884c9afa2501ef49a490d4ad Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 20 Oct 2006 11:08:49 +0000 Subject: Changed the processing of mp3 _options in mp3 writer with regard to bit_rate and quality to comply with LAME, also changed the pjsua_recorder_create() parameter to allow specifying mp3 options in one of the parameter git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@785 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsua-lib/pjsua_media.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'pjsip/src') diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c index c94265d0..b040ff84 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -796,8 +796,8 @@ PJ_DEF(pj_status_t) pjsua_player_destroy(pjsua_player_id id) * the conference bridge. */ PJ_DEF(pj_status_t) pjsua_recorder_create( const pj_str_t *filename, - unsigned file_format, - const pj_str_t *encoding, + unsigned enc_type, + void *enc_param, pj_ssize_t max_size, unsigned options, pjsua_recorder_id *p_id) @@ -811,6 +811,7 @@ PJ_DEF(pj_status_t) pjsua_recorder_create( const pj_str_t *filename, unsigned slot, file_id; char path[128]; pj_str_t ext; + int file_format; pjmedia_port *port; pj_status_t status; @@ -820,11 +821,8 @@ PJ_DEF(pj_status_t) pjsua_recorder_create( const pj_str_t *filename, /* Don't support max_size at present */ PJ_ASSERT_RETURN(max_size == 0 || max_size == -1, PJ_EINVAL); - /* Don't support file format at present */ - PJ_ASSERT_RETURN(file_format == 0, PJ_EINVAL); - - /* Don't support encoding at present */ - PJ_ASSERT_RETURN(encoding == NULL, PJ_EINVAL); + /* Don't support encoding type at present */ + PJ_ASSERT_RETURN(enc_type == 0, PJ_EINVAL); if (pjsua_var.rec_cnt >= PJ_ARRAY_SIZE(pjsua_var.recorder)) return PJ_ETOOMANY; @@ -874,7 +872,7 @@ PJ_DEF(pj_status_t) pjsua_recorder_create( const pj_str_t *filename, pjsua_var.mconf_cfg.channel_count, pjsua_var.mconf_cfg.samples_per_frame, pjsua_var.mconf_cfg.bits_per_sample, - NULL, &port); + enc_param, &port); } else { port = NULL; status = PJ_ENOTSUP; -- cgit v1.2.3