Index: pjproject/trunk/pjmedia/include/pjmedia/mp3_port.h
===================================================================
--- pjproject/trunk/pjmedia/include/pjmedia/mp3_port.h	(revision 784)
+++ pjproject/trunk/pjmedia/include/pjmedia/mp3_port.h	(revision 785)
@@ -60,11 +60,19 @@
 typedef struct pjmedia_mp3_encoder_option
 {
-    /** Specify whether variable bit rate should be used (say Yes!).	    */
+    /** Specify whether variable bit rate should be used. Variable bitrate
+     *  would normally produce better quality at the expense of probably
+     *  larger file.
+     */
     pj_bool_t	vbr;
 
-    /** Target bitrate, in bps. If zero, bitrate will be  calculated.	    */
+    /** Target bitrate, in bps. For VBR, if the bitrate is specified, then 
+     *  the encoder will ignore the quality settings and instead will try to 
+     *  limit the bitrate to the desired value in this setting.
+     */
     unsigned	bit_rate;
 
-    /** Encoding quality, 0-9, with 0 is the highest. 			    */
+    /** Encoding quality, 0-9, with 0 is the highest quality. For VBR, the 
+     *  quality setting will only take effect when bit_rate setting is zero.
+     */
     unsigned	quality;
 
Index: pjproject/trunk/pjmedia/src/pjmedia/mp3_writer.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/mp3_writer.c	(revision 784)
+++ pjproject/trunk/pjmedia/src/pjmedia/mp3_writer.c	(revision 785)
@@ -200,5 +200,5 @@
 	LConfig.format.LHV1.nVbrMethod = VBR_METHOD_DEFAULT;
 	LConfig.format.LHV1.bWriteVBRHeader = 1;
-	//LConfig.format.LHV1.dwVbrAbr_bps = fport->mp3_option.bit_rate;
+	LConfig.format.LHV1.dwVbrAbr_bps = fport->mp3_option.bit_rate;
 	LConfig.format.LHV1.bEnableVBR = 1;
     }
@@ -295,6 +295,6 @@
     }
 
-    /* Calculate bitrate if it's not specified */
-    if (fport->mp3_option.bit_rate == 0) 
+    /* Calculate bitrate if it's not specified, only if it's not VBR. */
+    if (fport->mp3_option.bit_rate == 0 && !fport->mp3_option.vbr) 
 	fport->mp3_option.bit_rate = sampling_rate * channel_count;
 
Index: pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 784)
+++ pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 785)
@@ -2530,5 +2530,7 @@
 /**
  * Create a file recorder, and automatically connect this recorder to
- * the conference bridge.
+ * the conference bridge. The recorder currently supports recording WAV file,
+ * and on Windows, MP3 file. The type of the recorder to use is determined
+ * by the extension of the file (e.g. ".wav" or ".mp3").
  *
  * @param filename	Output file name. The function will determine the
@@ -2536,11 +2538,14 @@
  *			Currently ".wav" is supported on all platforms, and
  *			also ".mp3" is support on Windows.
- * @param file_format	This option is obsolete.
- * @param encoding	Optionally specify the encoding to be applied to the
- *			file. By default (if NULL is specified), the encoding
- *			is determined from the file extension (i.e. 16bit PCM
- *			is used for the WAV files).
- * @param max_size	Maximum file size. Specify -1 to remove size
- *			limitation.
+ * @param enc_type	Optionally specify the type of encoder to be used to
+ *			compress the media, if the file can support different
+ *			encodings. This value must be zero for now.
+ * @param enc_param	Optionally specify codec specific parameter to be 
+ *			passed to the file writer. For .MP3 recorder, this
+ *			can point to pjmedia_mp3_encoder_option structure to
+ *			specify additional settings for the .mp3 recorder.
+ *			For .WAV recorder, this value must be NULL.
+ * @param max_size	Maximum file size. Specify zero or -1 to remove size
+ *			limitation. This value must be zero or -1 for now.
  * @param options	Optional options.
  * @param p_id		Pointer to receive the recorder instance.
@@ -2549,6 +2554,6 @@
  */
 PJ_DECL(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,
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 784)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 785)
@@ -797,6 +797,6 @@
  */
 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,
@@ -812,4 +812,5 @@
     char path[128];
     pj_str_t ext;
+    int file_format;
     pjmedia_port *port;
     pj_status_t status;
@@ -821,9 +822,6 @@
     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))
@@ -875,5 +873,5 @@
 						pjsua_var.mconf_cfg.samples_per_frame,
 						pjsua_var.mconf_cfg.bits_per_sample,
-						NULL, &port);
+						enc_param, &port);
     } else {
 	port = NULL;
