Changeset 318 for pjproject/trunk
- Timestamp:
- Mar 15, 2006 7:32:41 PM (19 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/build/pjmedia.dsp
r311 r318 121 121 # Begin Source File 122 122 123 SOURCE=..\src\pjmedia\null_port.c 124 # End Source File 125 # Begin Source File 126 123 127 SOURCE=..\src\pjmedia\nullsound.c 124 128 # PROP Exclude_From_Build 1 … … 207 211 208 212 SOURCE=..\include\pjmedia\jbuf.h 213 # End Source File 214 # Begin Source File 215 216 SOURCE=..\include\pjmedia\null_port.h 209 217 # End Source File 210 218 # Begin Source File -
pjproject/trunk/pjmedia/include/pjmedia.h
r278 r318 33 33 #include <pjmedia/g711.h> 34 34 #include <pjmedia/jbuf.h> 35 #include <pjmedia/null_port.h> 35 36 #include <pjmedia/port.h> 36 37 #include <pjmedia/rtcp.h> -
pjproject/trunk/pjmedia/src/pjmedia/conference.c
r312 r318 492 492 pj_status_t status; 493 493 494 PJ_ASSERT_RETURN(conf && pool && strm_port && port_name && p_port, 495 PJ_EINVAL); 494 PJ_ASSERT_RETURN(conf && pool && strm_port && port_name, PJ_EINVAL); 496 495 497 496 pj_mutex_lock(conf->mutex); … … 523 522 524 523 /* Done. */ 525 *p_port = index; 524 if (p_port) { 525 *p_port = index; 526 } 526 527 527 528 pj_mutex_unlock(conf->mutex); … … 1052 1053 continue; 1053 1054 } 1055 1056 /* Also skip if this port doesn't have listeners. */ 1057 if (conf_port->listener_cnt == 0) 1058 continue; 1054 1059 1055 1060 /* Get frame from this port. … … 1102 1107 } 1103 1108 1104 /* Also skip if this port doesn't have listeners. */1105 if (conf_port->listener_cnt == 0)1106 continue;1107 1108 1109 /* Get the signal level. */ 1109 1110 level = pjmedia_calc_avg_signal(output, conf->samples_per_frame); -
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r312 r318 65 65 * streams. 66 66 */ 67 #define PJSUA_CONF_MORE_PORTS 267 #define PJSUA_CONF_MORE_PORTS 3 68 68 69 69 … … 186 186 char *wav_file; /**< WAV file name to play. */ 187 187 unsigned wav_slot; /**< WAV player slot in bridge */ 188 pjmedia_port *file_port; /**< WAV player port. */ 189 pjmedia_port *null_port; /**< NULL port. */ 188 190 pj_bool_t auto_play; /**< Auto play file for calls? */ 189 191 pj_bool_t auto_loop; /**< Auto loop RTP stream? */ -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r315 r318 754 754 } 755 755 756 /* Add NULL port to the bridge. */ 757 status = pjmedia_null_port_create( pjsua.pool, pjsua.clock_rate, 758 pjsua.clock_rate * 20 / 1000, 16, 759 &pjsua.null_port); 760 pjmedia_conf_add_port( pjsua.mconf, pjsua.pool, pjsua.null_port, 761 &pjsua.null_port->info.name, NULL ); 762 756 763 /* Create WAV file player if required: */ 757 764 758 765 if (pjsua.wav_file) { 759 pjmedia_port *port;760 766 pj_str_t port_name; 761 767 762 768 /* Create the file player port. */ 763 769 status = pjmedia_file_player_port_create( pjsua.pool, pjsua.wav_file, 764 0, -1, NULL, &port); 770 0, -1, NULL, 771 &pjsua.file_port); 765 772 if (status != PJ_SUCCESS) { 766 773 pjsua_perror(THIS_FILE, … … 771 778 772 779 /* Add port to conference bridge: */ 773 status = pjmedia_conf_add_port(pjsua.mconf, pjsua.pool, port, 780 status = pjmedia_conf_add_port(pjsua.mconf, pjsua.pool, 781 pjsua.file_port, 774 782 pj_cstr(&port_name, pjsua.wav_file), 775 783 &pjsua.wav_slot); … … 1050 1058 pjmedia_conf_destroy(pjsua.mconf); 1051 1059 1060 /* Destroy file port */ 1061 pjmedia_port_destroy(pjsua.file_port); 1062 1063 /* Destroy null port. */ 1064 pjmedia_port_destroy(pjsua.null_port); 1065 1066 1052 1067 /* Destroy sound framework: 1053 1068 * (this should be done in pjmedia_shutdown())
Note: See TracChangeset
for help on using the changeset viewer.