Changeset 2310 for pjproject/trunk
- Timestamp:
- Sep 23, 2008 4:55:21 PM (16 years ago)
- Location:
- pjproject/trunk/pjmedia/src/pjmedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/jbuf.c
r2197 r2310 402 402 int diff, cur_size; 403 403 404 /* Update jb_max_size */405 404 cur_size = jb_framelist_size(&jb->jb_framelist); 406 405 … … 423 422 */ 424 423 if (jb->jb_stable_hist > STABLE_HISTORY_LIMIT) { 424 425 /* Update max_hist_level. */ 426 jb->jb_max_hist_level = jb->jb_prefetch; 427 425 428 diff = (jb->jb_prefetch - jb->jb_max_hist_level) / 3; 426 429 … … 432 435 jb->jb_prefetch = jb->jb_min_prefetch; 433 436 437 jb->jb_stable_hist = 0; 438 434 439 TRACE__((jb->name.ptr,"jb updated(1), prefetch=%d, size=%d", 435 440 jb->jb_prefetch, cur_size)); 436 437 jb->jb_stable_hist = 0;438 jb->jb_max_hist_level = 0;439 441 } 440 442 } … … 448 450 if (jb->jb_prefetch > jb->jb_max_prefetch) 449 451 jb->jb_prefetch = jb->jb_max_prefetch; 452 450 453 jb->jb_stable_hist = 0; 451 jb->jb_max_hist_level = 0; 454 // Keep max_hist_level. 455 //jb->jb_max_hist_level = 0; 452 456 453 457 TRACE__((jb->name.ptr,"jb updated(2), prefetch=%d, size=%d", … … 462 466 463 467 /* These code is used for shortening the delay in the jitter buffer. */ 464 diff = cur_size - jb->jb_prefetch; 468 // Shrinking based on max_hist_level (recent max level). 469 //diff = cur_size - jb->jb_prefetch; 470 diff = cur_size - jb->jb_max_hist_level; 465 471 if (diff > SAFE_SHRINKING_DIFF && 466 472 jb->jb_framelist.flist_origin-jb->jb_last_del_seq > jb->jb_min_shrink_gap) -
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r2265 r2310 1668 1668 jb_max = info->jb_max; 1669 1669 else 1670 jb_max = 360 / stream->codec_param.info.frm_ptime;1670 jb_max = 500 / stream->codec_param.info.frm_ptime; 1671 1671 1672 1672 if (info->jb_min_pre >= 0)
Note: See TracChangeset
for help on using the changeset viewer.