Changeset 4272 for pjproject/trunk
- Timestamp:
- Oct 1, 2012 11:11:37 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/silk.c
r4264 r4272 36 36 37 37 #define FRAME_LENGTH_MS 20 38 #define CALC_BITRATE_QUALITY(quality, max_br) \ 39 (quality * max_br / 10) 38 40 #define CALC_BITRATE(max_br) \ 39 (PJMEDIA_CODEC_SILK_DEFAULT_QUALITY * max_br / 10) 41 CALC_BITRATE_QUALITY(PJMEDIA_CODEC_SILK_DEFAULT_QUALITY, \ 42 max_br); 40 43 41 44 … … 288 291 const pjmedia_codec_silk_setting *opt) 289 292 { 290 PJ_UNUSED_ARG(clock_rate); 291 PJ_UNUSED_ARG(opt); 292 return PJ_ENOTSUP; 293 unsigned i; 294 295 /* Look up in factory modes table */ 296 for (i = 0; i < sizeof(silk_factory.silk_param)/ 297 sizeof(silk_factory.silk_param[0]); ++i) 298 { 299 if (silk_factory.silk_param[i].clock_rate == clock_rate) { 300 silk_factory.silk_param[i].enabled = opt->enabled; 301 silk_factory.silk_param[i].complexity = opt->complexity; 302 silk_factory.silk_param[i].bitrate = 303 CALC_BITRATE_QUALITY(opt->quality, 304 silk_factory.silk_param[i].max_bitrate); 305 return PJ_SUCCESS; 306 } 307 } 308 309 return PJ_ENOTFOUND; 293 310 } 294 311 … … 404 421 405 422 i = 0; 406 attr->setting.dec_fmtp.param[i ++].name = pj_str("useinbandfec");423 attr->setting.dec_fmtp.param[i].name = pj_str("useinbandfec"); 407 424 attr->setting.dec_fmtp.param[i++].val = pj_str("0"); 408 425 /* 409 attr->setting.dec_fmtp.param[i ++].name = pj_str("maxaveragebitrate");426 attr->setting.dec_fmtp.param[i].name = pj_str("maxaveragebitrate"); 410 427 attr->setting.dec_fmtp.param[i++].val = pj_str(mode->bitrate_str); 411 428 */
Note: See TracChangeset
for help on using the changeset viewer.