Changeset 2728 for pjproject/trunk
- Timestamp:
- Jun 1, 2009 1:56:09 PM (15 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/conference.h
r2506 r2728 239 239 240 240 /** 241 * <i><b>Warning:</b> This API has been deprecated since 1.3 and will be 242 * removed in the future release, use #PJMEDIA_SPLITCOMB instead.</i> 243 * 241 244 * Create and add a passive media port to the conference bridge. Unlike 242 245 * "normal" media port that is added with #pjmedia_conf_add_port(), media -
pjproject/trunk/pjmedia/src/pjmedia/conference.c
r2696 r2728 572 572 /* Create port zero for sound device. */ 573 573 status = create_sound_port(pool, conf); 574 if (status != PJ_SUCCESS) 574 if (status != PJ_SUCCESS) { 575 pjmedia_conf_destroy(conf); 575 576 return status; 577 } 576 578 577 579 /* Create mutex. */ 578 580 status = pj_mutex_create_recursive(pool, "conf", &conf->mutex); 579 if (status != PJ_SUCCESS) 581 if (status != PJ_SUCCESS) { 582 pjmedia_conf_destroy(conf); 580 583 return status; 584 } 581 585 582 586 /* If sound device was created, connect sound device to the … … 627 631 PJ_DEF(pj_status_t) pjmedia_conf_destroy( pjmedia_conf *conf ) 628 632 { 633 unsigned i, ci; 634 629 635 PJ_ASSERT_RETURN(conf != NULL, PJ_EINVAL); 630 636 … … 635 641 } 636 642 643 /* Destroy delay buf of all (passive) ports. */ 644 for (i=0, ci=0; i<conf->max_ports && ci<conf->port_cnt; ++i) { 645 struct conf_port *cport; 646 647 cport = conf->ports[i]; 648 if (!cport) 649 continue; 650 651 ++ci; 652 if (cport->delay_buf) { 653 pjmedia_delay_buf_destroy(cport->delay_buf); 654 cport->delay_buf = NULL; 655 } 656 } 657 637 658 /* Destroy mutex */ 638 pj_mutex_destroy(conf->mutex); 659 if (conf->mutex) 660 pj_mutex_destroy(conf->mutex); 639 661 640 662 return PJ_SUCCESS; … … 794 816 pj_status_t status; 795 817 818 PJ_LOG(1, (THIS_FILE, "This API has been deprecated since 1.3 and will " 819 "be removed in the future release!")); 820 796 821 PJ_ASSERT_RETURN(conf && pool, PJ_EINVAL); 797 822 … … 1122 1147 pj_assert(conf->connect_cnt > 0); 1123 1148 --conf->connect_cnt; 1149 } 1150 1151 /* Destroy pjmedia port if this conf port is passive port, 1152 * i.e: has delay buf. 1153 */ 1154 if (conf_port->delay_buf) { 1155 pjmedia_port_destroy(conf_port->port); 1156 conf_port->port = NULL; 1124 1157 } 1125 1158 -
pjproject/trunk/pjmedia/src/pjmedia/delaybuf.c
r2394 r2728 122 122 b->recalc_timer = RECALC_TIME; 123 123 124 status = pj_lock_create_recursive_mutex(pool, b->obj_name, 125 &b->lock); 126 if (status != PJ_SUCCESS) 127 return status; 128 124 /* Create circular buffer */ 129 125 status = pjmedia_circ_buf_create(pool, b->max_cnt, &b->circ_buf); 130 126 if (status != PJ_SUCCESS) 131 127 return status; 132 128 129 /* Create WSOLA */ 133 130 status = pjmedia_wsola_create(pool, clock_rate, samples_per_frame, 1, 134 131 0, &b->wsola); 132 if (status != PJ_SUCCESS) 133 return status; 134 135 /* Finally, create mutex */ 136 status = pj_lock_create_recursive_mutex(pool, b->obj_name, 137 &b->lock); 135 138 if (status != PJ_SUCCESS) 136 139 return status; -
pjproject/trunk/pjmedia/src/pjmedia/echo_common.c
r2394 r2728 240 240 { 241 241 (*echo->op->ec_destroy)(echo->state); 242 243 if (echo->delay_buf) { 244 pjmedia_delay_buf_destroy(echo->delay_buf); 245 echo->delay_buf = NULL; 246 } 247 242 248 pj_pool_release(echo->pool); 243 249 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.