- Timestamp:
- Jul 14, 2011 4:56:08 AM (13 years ago)
- Location:
- pjproject/branches/projects/2.0-dev
- Files:
-
- 1 added
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/conference.h
r3327 r3640 47 47 * The conference bridge signature in pjmedia_port_info. 48 48 */ 49 #define PJMEDIA_CONF_BRIDGE_SIGNATURE \ 50 PJMEDIA_PORT_SIGNATURE('C', 'O', 'N', 'F') 49 #define PJMEDIA_CONF_BRIDGE_SIGNATURE PJMEDIA_SIG_PORT_CONF 51 50 52 51 /** 53 52 * The audio switchboard signature in pjmedia_port_info. 54 53 */ 55 #define PJMEDIA_CONF_SWITCH_SIGNATURE \ 56 PJMEDIA_PORT_SIGNATURE('A', 'S', 'W', 'I') 54 #define PJMEDIA_CONF_SWITCH_SIGNATURE PJMEDIA_SIG_PORT_CONF_SWITCH 57 55 58 56 -
pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/event.h
r3622 r3640 25 25 */ 26 26 #include <pjmedia/format.h> 27 #include <pjmedia/signatures.h> 27 28 #include <pj/list.h> 28 29 … … 183 184 */ 184 185 unsigned proc_cnt; 186 187 /** 188 * The object signature of the event publisher. Application may use 189 * this to check which publisher published the event. 190 */ 191 pjmedia_obj_sig epub_sig; 185 192 186 193 /** … … 269 276 struct pjmedia_event_publisher 270 277 { 278 /** The object signature of the publisher */ 279 pjmedia_obj_sig sig; 280 271 281 /** List of subscriptions for this event publisher */ 272 282 pjmedia_event_subscription subscription_list; … … 291 301 * 292 302 * @param epub The event publisher. 293 */ 294 PJ_DECL(void) pjmedia_event_publisher_init(pjmedia_event_publisher *epub); 303 * @param sig The object signature of the publisher. 304 */ 305 PJ_DECL(void) pjmedia_event_publisher_init(pjmedia_event_publisher *epub, 306 pjmedia_obj_sig sig); 295 307 296 308 /** -
pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/port.h
r3622 r3640 29 29 #include <pjmedia/format.h> 30 30 #include <pjmedia/frame.h> 31 #include <pjmedia/signatures.h> 31 32 #include <pj/assert.h> 32 33 #include <pj/os.h> … … 190 191 * Create 32bit port signature from ASCII characters. 191 192 */ 192 #define PJMEDIA_PORT_SIGNATURE(a,b,c,d) \ 193 (a<<24 | b<<16 | c<<8 | d) 193 #define PJMEDIA_PORT_SIG(a,b,c,d) PJMEDIA_OBJ_SIG(a,b,c,d) 194 194 195 195 -
pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/vid_codec.h
r3622 r3640 431 431 * 432 432 * @param codec The codec to be initialized. 433 */ 434 PJ_DECL(void) pjmedia_vid_codec_init(pjmedia_vid_codec *codec); 433 * @param sig Codec's object signature (see signatures.h) 434 */ 435 PJ_DECL(void) pjmedia_vid_codec_init(pjmedia_vid_codec *codec, 436 pjmedia_obj_sig sig); 435 437 436 438 /** -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-codec/ffmpeg_codecs.c
r3630 r3640 887 887 goto on_error; 888 888 } 889 pjmedia_vid_codec_init(codec );889 pjmedia_vid_codec_init(codec, PJMEDIA_SIG_VID_CODEC_FFMPEG); 890 890 codec->op = &ffmpeg_op; 891 891 codec->factory = factory; -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/colorbar_dev.c
r3617 r3640 417 417 pj_memcpy(&strm->vafp, &vafp, sizeof(vafp)); 418 418 strm->ts_inc = PJMEDIA_SPF2(param->clock_rate, &vfd->fps, 1); 419 pjmedia_event_publisher_init(&strm->base.epub );419 pjmedia_event_publisher_init(&strm->base.epub, PJMEDIA_SIG_VID_DEV_COLORBAR); 420 420 421 421 for (i = 0; i < vfi->plane_cnt; ++i) { -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/sdl_dev.c
r3626 r3640 1012 1012 pj_memcpy(&strm->vid_cb, cb, sizeof(*cb)); 1013 1013 strm->user_data = user_data; 1014 pjmedia_event_publisher_init(&strm->base.epub );1014 pjmedia_event_publisher_init(&strm->base.epub, PJMEDIA_SIG_VID_DEV_SDL); 1015 1015 1016 1016 /* Create render stream here */ -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/v4l2_dev.c
r3617 r3640 574 574 stream->user_data = user_data; 575 575 stream->fd = INVALID_FD; 576 pjmedia_event_publisher_init(&stream->base.epub );576 pjmedia_event_publisher_init(&stream->base.epub, PJMEDIA_SIG_VID_DEV_V4L2); 577 577 578 578 stream->fd = v4l2_open(vdi->dev_name, O_RDWR | O_NONBLOCK, 0); -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/avi_player.c
r3425 r3640 44 44 #define COMPARE_TAG(doc_tag, tag) (doc_tag == *((pj_uint32_t *)avi_tags[tag])) 45 45 46 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('A', 'V', 'I', 'P')46 #define SIGNATURE PJMEDIA_SIG_PORT_VID_AVI_PLAYER 47 47 48 48 #if 0 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/bidirectional.c
r3392 r3640 23 23 24 24 #define THIS_FILE "bidirectional.c" 25 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('B', 'D', 'I', 'R')25 #define SIGNATURE PJMEDIA_SIG_PORT_BIDIR 26 26 27 27 struct bidir_port -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/conference.c
r3392 r3640 65 65 66 66 #define SIGNATURE PJMEDIA_CONF_BRIDGE_SIGNATURE 67 #define SIGNATURE_PORT PJMEDIA_ PORT_SIGNATURE('C', 'O', 'N', 'P')67 #define SIGNATURE_PORT PJMEDIA_SIG_PORT_CONF_PASV 68 68 /* Normal level is hardcodec to 128 in all over places */ 69 69 #define NORMAL_LEVEL 128 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/echo_port.c
r3392 r3640 27 27 28 28 #define THIS_FILE "ec_port.c" 29 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('E', 'C', 'H', 'O')29 #define SIGNATURE PJMEDIA_SIG_PORT_ECHO 30 30 #define BUF_COUNT 32 31 31 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/event.c
r3622 r3640 41 41 event->timestamp.u64 = ts->u64; 42 42 event->epub = epub; 43 if (epub) 44 event->epub_sig = epub->sig; 43 45 } 44 46 45 PJ_DEF(void) pjmedia_event_publisher_init(pjmedia_event_publisher *epub) 47 PJ_DEF(void) pjmedia_event_publisher_init(pjmedia_event_publisher *epub, 48 pjmedia_obj_sig sig) 46 49 { 47 50 pj_bzero(epub, sizeof(*epub)); 48 51 pj_list_init(&epub->subscription_list); 52 epub->sig = sig; 49 53 } 50 54 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/mem_capture.c
r3392 r3640 26 26 #define THIS_FILE "mem_capture.c" 27 27 28 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('M', 'R', 'e', 'c')28 #define SIGNATURE PJMEDIA_SIG_PORT_MEM_CAPTURE 29 29 #define BYTES_PER_SAMPLE 2 30 30 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/mem_player.c
r3392 r3640 26 26 #define THIS_FILE "mem_player.c" 27 27 28 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('M', 'P', 'l', 'y')28 #define SIGNATURE PJMEDIA_SIG_PORT_MEM_PLAYER 29 29 #define BYTES_PER_SAMPLE 2 30 30 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/null_port.c
r3392 r3640 25 25 26 26 27 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('N', 'U', 'L', 'L')27 #define SIGNATURE PJMEDIA_SIG_PORT_NULL 28 28 29 29 static pj_status_t null_get_frame(pjmedia_port *this_port, -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/resample_port.c
r3448 r3640 26 26 27 27 #define BYTES_PER_SAMPLE 2 28 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('R','S','M','P')28 #define SIGNATURE PJMEDIA_SIG_PORT_RESAMPLE 29 29 30 30 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/splitcomb.c
r3392 r3640 26 26 27 27 28 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('S', 'p', 'C', 'b')29 #define SIGNATURE_PORT PJMEDIA_ PORT_SIGNATURE('S', 'p', 'C', 'P')28 #define SIGNATURE PJMEDIA_SIG_PORT_SPLIT_COMB 29 #define SIGNATURE_PORT PJMEDIA_SIG_PORT_SPLIT_COMB_P 30 30 #define THIS_FILE "splitcomb.c" 31 31 #define TMP_SAMP_TYPE pj_int16_t -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/stereo_port.c
r3392 r3640 25 25 26 26 27 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('S','T','R','O')27 #define SIGNATURE PJMEDIA_SIG_PORT_STEREO 28 28 29 29 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/stream.c
r3536 r3640 1983 1983 */ 1984 1984 pjmedia_port_info_init(&stream->port.info, &name, 1985 PJMEDIA_PORT_SIGNATURE('S', 'T', 'R', 'M'),1985 PJMEDIA_SIG_PORT_STREAM, 1986 1986 info->fmt.clock_rate, info->fmt.channel_cnt, 1987 1987 16, 80); -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/tonegen.c
r3392 r3640 335 335 /****************************************************************************/ 336 336 337 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('t', 'n', 'g', 'n')337 #define SIGNATURE PJMEDIA_SIG_PORT_TONEGEN 338 338 #define THIS_FILE "tonegen.c" 339 339 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_codec.c
r3622 r3640 70 70 * Initialize pjmedia_vid_codec structure with default values. 71 71 */ 72 PJ_DEF(void) pjmedia_vid_codec_init(pjmedia_vid_codec *codec) 72 PJ_DEF(void) pjmedia_vid_codec_init(pjmedia_vid_codec *codec, 73 pjmedia_obj_sig sig) 73 74 { 74 75 pj_bzero(codec, sizeof(*codec)); 75 pj _list_init(&codec->epub);76 pjmedia_event_publisher_init(&codec->epub, sig); 76 77 } 77 78 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_port.c
r3631 r3640 26 26 #include <pj/pool.h> 27 27 28 #define SIGNATURE PJMEDIA_SIG_VID_PORT 28 29 #define THIS_FILE "vid_port.c" 29 30 … … 202 203 vp->dir = prm->vidparam.dir; 203 204 // vp->cap_size = vfd->size; 204 pjmedia_event_publisher_init(&vp->epub );205 pjmedia_event_publisher_init(&vp->epub, SIGNATURE); 205 206 206 207 vparam = prm->vidparam; … … 312 313 pp->base.put_frame = &vid_pasv_port_put_frame; 313 314 pjmedia_port_info_init2(&pp->base.info, &vp->dev_name, 314 PJMEDIA_PORT_SIGNATURE('v', 'i', 'd', 'p'),315 PJMEDIA_SIG_VID_PORT, 315 316 prm->vidparam.dir, &prm->vidparam.fmt); 316 317 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_stream.c
r3622 r3640 43 43 #define LOGERR_(expr) stream_perror expr 44 44 #define TRC_(expr) PJ_LOG(5,expr) 45 #define SIGNATURE PJMEDIA_SIG_PORT_VID_STREAM 45 46 46 47 /* Tracing jitter buffer operations in a stream session to a CSV file. … … 1108 1109 1109 1110 /* Init port. */ 1110 pjmedia_port_info_init2(pi, &name, 1111 PJMEDIA_PORT_SIGNATURE('V', 'C', 'H', 'N'), 1112 dir, fmt); 1111 pjmedia_port_info_init2(pi, &name, SIGNATURE, dir, fmt); 1113 1112 if (dir == PJMEDIA_DIR_DECODING) { 1114 1113 channel->port.get_frame = &get_frame; … … 1253 1252 1254 1253 /* Init event publisher and subscribe to codec events */ 1255 pjmedia_event_publisher_init(&stream->epub );1254 pjmedia_event_publisher_init(&stream->epub, SIGNATURE); 1256 1255 pjmedia_event_subscription_init(&stream->esub_codec, &stream_event_cb, 1257 1256 stream); -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_tee.c
r3627 r3640 25 25 26 26 #define TEE_PORT_NAME "vid_tee" 27 #define TEE_PORT_SIGN PJMEDIA_ PORT_SIGNATURE('V', 'T', 'E', 'E')27 #define TEE_PORT_SIGN PJMEDIA_SIG_PORT_VID_TEE 28 28 #define MAX_DST_PORT_COUNT 20 29 29 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/wav_player.c
r3392 r3640 33 33 34 34 35 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('F', 'P', 'l', 'y')35 #define SIGNATURE PJMEDIA_SIG_PORT_WAV_PLAYER 36 36 #define BITS_PER_SAMPLE 16 37 37 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/wav_playlist.c
r3392 r3640 33 33 #define THIS_FILE "wav_playlist.c" 34 34 35 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('P', 'l', 's', 't')35 #define SIGNATURE PJMEDIA_SIG_PORT_WAV_PLAYLIST 36 36 #define BYTES_PER_SAMPLE 2 37 37 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/wav_writer.c
r3392 r3640 31 31 32 32 #define THIS_FILE "wav_writer.c" 33 #define SIGNATURE PJMEDIA_ PORT_SIGNATURE('F', 'W', 'R', 'T')33 #define SIGNATURE PJMEDIA_SIG_PORT_WAV_WRITER 34 34 35 35 -
pjproject/branches/projects/2.0-dev/pjsip-apps/src/samples/playsine.c
r3392 r3640 139 139 name = pj_str("sine generator"); 140 140 pjmedia_port_info_init(&port->info, &name, 141 PJMEDIA_PORT_SIGNATURE('s', 'i', 'n', 'e'),141 PJMEDIA_SIG_CLASS_PORT_AUD('s', 'i'), 142 142 sampling_rate, 143 143 channel_count,
Note: See TracChangeset
for help on using the changeset viewer.