Changeset 322
- Timestamp:
- Mar 16, 2006 7:03:07 PM (19 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/conference.h
r312 r322 76 76 * is also used to set the sampling rate of the 77 77 * sound device. 78 * @param channel_count Number of channels in the PCM stream. Normally 79 * the value will be 1 for mono, but application may 80 * specify a value of 2 for stereo. Note that all 81 * ports that will be connected to the bridge MUST 82 * have the same number of channels as the bridge. 78 83 * @param samples_per_frame Set the number of samples per frame. This value 79 84 * is also used to set the sound device. … … 91 96 unsigned max_slots, 92 97 unsigned sampling_rate, 98 unsigned channel_count, 93 99 unsigned samples_per_frame, 94 100 unsigned bits_per_sample, -
pjproject/trunk/pjmedia/include/pjmedia/null_port.h
r318 r322 34 34 * 35 35 * @param sampling_rate Sampling rate of the port. 36 * @param channel_count Number of channels. 36 37 * @param samples_per_frame Number of samples per frame. 37 38 * @param bits_per_sample Number of bits per sample. … … 42 43 PJ_DECL(pj_status_t) pjmedia_null_port_create( pj_pool_t *pool, 43 44 unsigned sampling_rate, 45 unsigned channel_count, 44 46 unsigned samples_per_frame, 45 47 unsigned bits_per_sample, -
pjproject/trunk/pjmedia/src/pjmedia/conference.c
r321 r322 137 137 struct conf_port **ports; /**< Array of ports. */ 138 138 pj_uint16_t *uns_buf; /**< Buf for unsigned conversion */ 139 unsigned clock_rate; /**< Sampling rate. */ 139 unsigned clock_rate; /**< Sampling rate. */ 140 unsigned channel_count;/**< Number of channels (1=mono). */ 140 141 unsigned samples_per_frame; /**< Samples per frame. */ 141 142 unsigned bits_per_sample; /**< Bits per sample. */ … … 323 324 unsigned max_ports, 324 325 unsigned clock_rate, 326 unsigned channel_count, 325 327 unsigned samples_per_frame, 326 328 unsigned bits_per_sample, … … 493 495 494 496 PJ_ASSERT_RETURN(conf && pool && strm_port && port_name, PJ_EINVAL); 497 498 /* For this version of PJMEDIA, port MUST have the same number of 499 * PCM channels. 500 */ 501 if (strm_port->info.channel_count != conf->channel_count) { 502 pj_assert(!"Number of channels mismatch"); 503 return PJMEDIA_ENCCHANNEL; 504 } 495 505 496 506 pj_mutex_lock(conf->mutex); -
pjproject/trunk/pjmedia/src/pjmedia/file_port.c
r288 r322 201 201 202 202 if (wave_hdr.fmt_hdr.fmt_tag != 1 || 203 wave_hdr.fmt_hdr.nchan != 1 ||204 203 wave_hdr.fmt_hdr.bits_per_sample != 16 || 205 204 wave_hdr.fmt_hdr.block_align != 2) … … 225 224 226 225 /* Update port info. */ 226 fport->base.info.channel_count = wave_hdr.fmt_hdr.nchan; 227 227 fport->base.info.sample_rate = wave_hdr.fmt_hdr.sample_rate; 228 228 fport->base.info.bits_per_sample = wave_hdr.fmt_hdr.bits_per_sample; -
pjproject/trunk/pjmedia/src/pjmedia/null_port.c
r318 r322 33 33 PJ_DEF(pj_status_t) pjmedia_null_port_create( pj_pool_t *pool, 34 34 unsigned sampling_rate, 35 unsigned channel_count, 35 36 unsigned samples_per_frame, 36 37 unsigned bits_per_sample, … … 53 54 port->info.sample_rate = sampling_rate; 54 55 port->info.samples_per_frame = samples_per_frame; 56 port->info.channel_count = channel_count; 55 57 port->info.signature = 0x2411; 56 58 port->info.type = PJMEDIA_TYPE_AUDIO; -
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r321 r322 660 660 stream->port.info.pt = info->fmt.pt; 661 661 pj_strdup(pool, &stream->port.info.encoding_name, &info->fmt.encoding_name); 662 stream->port.info.channel_count = 1; 662 663 stream->port.info.sample_rate = info->fmt.sample_rate; 663 664 stream->port.user_data = stream; -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r321 r322 761 761 pjsua.max_calls+PJSUA_CONF_MORE_PORTS, 762 762 pjsua.clock_rate, 763 1, /* mono */ 763 764 pjsua.clock_rate * 20 / 1000, 16, 764 765 options, … … 774 775 /* Add NULL port to the bridge. */ 775 776 status = pjmedia_null_port_create( pjsua.pool, pjsua.clock_rate, 777 1, /* mono */ 776 778 pjsua.clock_rate * 20 / 1000, 16, 777 779 &pjsua.null_port);
Note: See TracChangeset
for help on using the changeset viewer.