Changeset 5676 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_aud.c
- Timestamp:
- Oct 24, 2017 7:31:39 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_aud.c
r5651 r5676 532 532 } 533 533 534 if (call_med->strm.a.media_port) { 535 if (call_med->strm.a.destroy_port) 536 pjmedia_port_destroy(call_med->strm.a.media_port); 537 call_med->strm.a.media_port = NULL; 538 } 539 534 540 pjmedia_stream_destroy(strm); 535 541 call_med->strm.a.stream = NULL; … … 576 582 { 577 583 pjsua_call *call = call_med->call; 578 pjmedia_port *media_port;579 584 unsigned strm_idx = call_med->idx; 580 585 pj_status_t status = PJ_SUCCESS; … … 646 651 * We need the port interface to add to the conference bridge. 647 652 */ 648 pjmedia_stream_get_port(call_med->strm.a.stream, &media_port); 653 pjmedia_stream_get_port(call_med->strm.a.stream, 654 &call_med->strm.a.media_port); 649 655 650 656 /* Notify application about stream creation. … … 652 658 * media port 653 659 */ 654 if (pjsua_var.ua_cfg.cb.on_stream_created) { 655 pjsua_var.ua_cfg.cb.on_stream_created(call->index, 660 if (pjsua_var.ua_cfg.cb.on_stream_created2) { 661 pjsua_on_stream_created_param prm; 662 663 prm.stream = call_med->strm.a.stream; 664 prm.stream_idx = strm_idx; 665 prm.destroy_port = PJ_FALSE; 666 prm.port = call_med->strm.a.media_port; 667 (*pjsua_var.ua_cfg.cb.on_stream_created2)(call->index, &prm); 668 669 call_med->strm.a.destroy_port = prm.destroy_port; 670 call_med->strm.a.media_port = prm.port; 671 672 } else if (pjsua_var.ua_cfg.cb.on_stream_created) { 673 (*pjsua_var.ua_cfg.cb.on_stream_created)(call->index, 656 674 call_med->strm.a.stream, 657 strm_idx, &media_port); 675 strm_idx, 676 &call_med->strm.a.media_port); 658 677 } 659 678 … … 672 691 port_name = pj_str("call"); 673 692 } 674 status = pjmedia_conf_add_port( 675 676 677 678 679 693 status = pjmedia_conf_add_port(pjsua_var.mconf, 694 call->inv->pool, 695 call_med->strm.a.media_port, 696 &port_name, 697 (unsigned*) 698 &call_med->strm.a.conf_slot); 680 699 if (status != PJ_SUCCESS) { 681 700 goto on_return;
Note: See TracChangeset
for help on using the changeset viewer.