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: https://svn.pjsip.org/repos/pjproject/trunk@785 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index c94265d..b040ff8 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -796,8 +796,8 @@
* 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 @@
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 @@
/* 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 @@
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;