- Timestamp:
- Oct 20, 2006 11:08:49 AM (18 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/mp3_port.h
r783 r785 60 60 typedef struct pjmedia_mp3_encoder_option 61 61 { 62 /** Specify whether variable bit rate should be used (say Yes!). */ 62 /** Specify whether variable bit rate should be used. Variable bitrate 63 * would normally produce better quality at the expense of probably 64 * larger file. 65 */ 63 66 pj_bool_t vbr; 64 67 65 /** Target bitrate, in bps. If zero, bitrate will be calculated. */ 68 /** Target bitrate, in bps. For VBR, if the bitrate is specified, then 69 * the encoder will ignore the quality settings and instead will try to 70 * limit the bitrate to the desired value in this setting. 71 */ 66 72 unsigned bit_rate; 67 73 68 /** Encoding quality, 0-9, with 0 is the highest. */ 74 /** Encoding quality, 0-9, with 0 is the highest quality. For VBR, the 75 * quality setting will only take effect when bit_rate setting is zero. 76 */ 69 77 unsigned quality; 70 78 -
pjproject/trunk/pjmedia/src/pjmedia/mp3_writer.c
r783 r785 200 200 LConfig.format.LHV1.nVbrMethod = VBR_METHOD_DEFAULT; 201 201 LConfig.format.LHV1.bWriteVBRHeader = 1; 202 //LConfig.format.LHV1.dwVbrAbr_bps = fport->mp3_option.bit_rate;202 LConfig.format.LHV1.dwVbrAbr_bps = fport->mp3_option.bit_rate; 203 203 LConfig.format.LHV1.bEnableVBR = 1; 204 204 } … … 295 295 } 296 296 297 /* Calculate bitrate if it's not specified */298 if (fport->mp3_option.bit_rate == 0 )297 /* Calculate bitrate if it's not specified, only if it's not VBR. */ 298 if (fport->mp3_option.bit_rate == 0 && !fport->mp3_option.vbr) 299 299 fport->mp3_option.bit_rate = sampling_rate * channel_count; 300 300 -
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r783 r785 2530 2530 /** 2531 2531 * Create a file recorder, and automatically connect this recorder to 2532 * the conference bridge. 2532 * the conference bridge. The recorder currently supports recording WAV file, 2533 * and on Windows, MP3 file. The type of the recorder to use is determined 2534 * by the extension of the file (e.g. ".wav" or ".mp3"). 2533 2535 * 2534 2536 * @param filename Output file name. The function will determine the … … 2536 2538 * Currently ".wav" is supported on all platforms, and 2537 2539 * also ".mp3" is support on Windows. 2538 * @param file_format This option is obsolete. 2539 * @param encoding Optionally specify the encoding to be applied to the 2540 * file. By default (if NULL is specified), the encoding 2541 * is determined from the file extension (i.e. 16bit PCM 2542 * is used for the WAV files). 2543 * @param max_size Maximum file size. Specify -1 to remove size 2544 * limitation. 2540 * @param enc_type Optionally specify the type of encoder to be used to 2541 * compress the media, if the file can support different 2542 * encodings. This value must be zero for now. 2543 * @param enc_param Optionally specify codec specific parameter to be 2544 * passed to the file writer. For .MP3 recorder, this 2545 * can point to pjmedia_mp3_encoder_option structure to 2546 * specify additional settings for the .mp3 recorder. 2547 * For .WAV recorder, this value must be NULL. 2548 * @param max_size Maximum file size. Specify zero or -1 to remove size 2549 * limitation. This value must be zero or -1 for now. 2545 2550 * @param options Optional options. 2546 2551 * @param p_id Pointer to receive the recorder instance. … … 2549 2554 */ 2550 2555 PJ_DECL(pj_status_t) pjsua_recorder_create(const pj_str_t *filename, 2551 unsigned file_format,2552 const pj_str_t *encoding,2556 unsigned enc_type, 2557 void *enc_param, 2553 2558 pj_ssize_t max_size, 2554 2559 unsigned options, -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r783 r785 797 797 */ 798 798 PJ_DEF(pj_status_t) pjsua_recorder_create( const pj_str_t *filename, 799 unsigned file_format,800 const pj_str_t *encoding,799 unsigned enc_type, 800 void *enc_param, 801 801 pj_ssize_t max_size, 802 802 unsigned options, … … 812 812 char path[128]; 813 813 pj_str_t ext; 814 int file_format; 814 815 pjmedia_port *port; 815 816 pj_status_t status; … … 821 822 PJ_ASSERT_RETURN(max_size == 0 || max_size == -1, PJ_EINVAL); 822 823 823 /* Don't support file format at present */ 824 PJ_ASSERT_RETURN(file_format == 0, PJ_EINVAL); 825 826 /* Don't support encoding at present */ 827 PJ_ASSERT_RETURN(encoding == NULL, PJ_EINVAL); 824 /* Don't support encoding type at present */ 825 PJ_ASSERT_RETURN(enc_type == 0, PJ_EINVAL); 828 826 829 827 if (pjsua_var.rec_cnt >= PJ_ARRAY_SIZE(pjsua_var.recorder)) … … 875 873 pjsua_var.mconf_cfg.samples_per_frame, 876 874 pjsua_var.mconf_cfg.bits_per_sample, 877 NULL, &port);875 enc_param, &port); 878 876 } else { 879 877 port = NULL;
Note: See TracChangeset
for help on using the changeset viewer.