Changeset 631 for pjproject/trunk
- Timestamp:
- Jul 27, 2006 10:03:51 PM (18 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/build/Makefile
r628 r631 69 69 g711.o jbuf.o master_port.o mem_capture.o mem_player.o \ 70 70 null_port.o plc_common.o plc_g711.o \ 71 port.o resample.o \71 port.o splitcomb.o resample.o \ 72 72 resample_port.o rtcp.o rtp.o sdp.o sdp_cmp.o sdp_neg.o \ 73 73 session.o silencedet.o sound_port.o stream.o \ -
pjproject/trunk/pjmedia/build/pjmedia.dsp
r584 r631 200 200 # Begin Source File 201 201 202 SOURCE=..\src\pjmedia\splitcomb.c 203 # End Source File 204 # Begin Source File 205 202 206 SOURCE=..\src\pjmedia\stream.c 203 207 # End Source File -
pjproject/trunk/pjmedia/include/pjmedia/port.h
r622 r631 357 357 358 358 /** 359 * This is an auxiliary function to initialize port info for 360 * ports which deal with PCM audio. 361 * 362 * @param info The port info to be initialized. 363 * @param name Port name. 364 * @param signature Port signature. 365 * @param channel_count Number of channels. 366 * @param bits_per_sample Bits per sample. 367 * @param samples_per_frame Number of samples per frame. 368 * 369 * @return PJ_SUCCESS on success. 370 */ 371 PJ_DECL(pj_status_t) pjmedia_port_info_init( pjmedia_port_info *info, 372 const pj_str_t *name, 373 unsigned signature, 374 unsigned clock_rate, 375 unsigned channel_count, 376 unsigned bits_per_sample, 377 unsigned samples_per_frame); 378 379 380 /** 359 381 * Get a frame from the port (and subsequent downstream ports). 382 * 383 * @param port The media port. 384 * @param frame Frame to store samples. 385 * 386 * @return PJ_SUCCESS on success, or the appropriate error code. 360 387 */ 361 388 PJ_DECL(pj_status_t) pjmedia_port_get_frame( pjmedia_port *port, … … 364 391 /** 365 392 * Put a frame to the port (and subsequent downstream ports). 393 * 394 * @param port The media port. 395 * @param frame Frame to the put to the port. 396 * 397 * @return PJ_SUCCESS on success, or the appropriate error code. 366 398 */ 367 399 PJ_DECL(pj_status_t) pjmedia_port_put_frame( pjmedia_port *port, … … 371 403 /** 372 404 * Destroy port (and subsequent downstream ports) 405 * 406 * @param port The media port. 407 * 408 * @return PJ_SUCCESS on success, or the appropriate error code. 373 409 */ 374 410 PJ_DECL(pj_status_t) pjmedia_port_destroy( pjmedia_port *port ); -
pjproject/trunk/pjmedia/include/pjmedia/splitcomb.h
r531 r631 25 25 * @brief Media channel splitter/combiner port. 26 26 */ 27 #include <pjmedia/ types.h>27 #include <pjmedia/port.h> 28 28 29 29 … … 35 35 * This section describes media port to split and combine media 36 36 * channels in the stream. 37 * 38 * A splitter/combiner splits a single stereo/multichannels audio frame into 39 * multiple audio frames to each channel when put_frame() is called, 40 * and combines mono frames from each channel into a stereo/multichannel 41 * frame when get_frame() is called. A common application for the splitter/ 42 * combiner is to split frames from stereo to mono and vise versa. 37 43 */ 38 44 … … 42 48 /** 43 49 * Create a media splitter/combiner with the specified parameters. 44 * A splitter/combiner splits a single stereo/multichannel audio frame into45 * multiple mono audio frames to each channel when put_frame() is called,46 * and combines mono frames from each channel into a stereo/multichannel47 * frame when get_frame() is called.48 *49 50 * When the splitter/combiner is created, it creates an instance of 50 51 * pjmedia_port. This media port represents the stereo/multichannel side … … 80 81 * 81 82 * @param splitcomb The splitter/combiner. 82 * @param ch_num Audio channel number. 83 * @param options Valid options are: 84 * - PJMEDIA_SPLITCOMB_AUTO_DESTROY to destroy the 85 * media port when the splitter is destroyed. 83 * @param ch_num Audio channel starting number (zero based). 84 * @param options Must be zero at the moment. 86 85 * @param port The media port. 87 86 * … … 108 107 * buffers. 109 108 * @param splitcomb The splitter/combiner. 110 * @param ch_num Audio channel number. 111 * @param options Valid options are: 112 * - PJMEDIA_SPLITCOMB_AUTO_DESTROY to destroy the 113 * media port when the splitter is destroyed. 109 * @param ch_num Audio channel starting number (zero based). 110 * @param options Normally is zero, but the lower 8-bit of the 111 * options can be used to specify the number of 112 * buffers in the circular buffer. If zero, then 113 * default number will be used (default: 8). 114 114 * @param p_chport The media port created with reverse phase for 115 115 * the specified audio channel. -
pjproject/trunk/pjmedia/src/pjmedia/port.c
r518 r631 23 23 24 24 #define THIS_FILE "port.c" 25 26 27 /** 28 * This is an auxiliary function to initialize port info for 29 * ports which deal with PCM audio. 30 */ 31 PJ_DEF(pj_status_t) pjmedia_port_info_init( pjmedia_port_info *info, 32 const pj_str_t *name, 33 unsigned signature, 34 unsigned clock_rate, 35 unsigned channel_count, 36 unsigned bits_per_sample, 37 unsigned samples_per_frame) 38 { 39 pj_bzero(info, sizeof(*info)); 40 41 info->name = *name; 42 info->signature = signature; 43 info->type = PJMEDIA_TYPE_AUDIO; 44 info->has_info = PJ_TRUE; 45 info->need_info = PJ_FALSE; 46 info->pt = 0xFF; 47 info->encoding_name = pj_str("pcm"); 48 info->clock_rate = clock_rate; 49 info->channel_count = channel_count; 50 info->bits_per_sample = bits_per_sample; 51 info->samples_per_frame = samples_per_frame; 52 info->bytes_per_frame = samples_per_frame * bits_per_sample / 8; 53 54 return PJ_SUCCESS; 55 } 25 56 26 57
Note: See TracChangeset
for help on using the changeset viewer.