- Timestamp:
- Aug 26, 2011 4:19:04 AM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/vid_tee.c
r3667 r3725 30 30 #define TEE_PORT_NAME "vid_tee" 31 31 #define TEE_PORT_SIGN PJMEDIA_SIG_PORT_VID_TEE 32 #define MAX_DST_PORT_COUNT 2033 32 34 33 … … 52 51 unsigned dst_port_cnt; 53 52 vid_tee_dst_port *dst_ports; 53 pj_uint8_t *put_frm_flag; 54 54 55 55 struct vid_tee_conv_t { … … 80 80 PJ_ASSERT_RETURN(pool && fmt && p_vid_tee, PJ_EINVAL); 81 81 PJ_ASSERT_RETURN(fmt->type == PJMEDIA_TYPE_VIDEO, PJ_EINVAL); 82 PJ_ASSERT_RETURN(max_dst_cnt <= MAX_DST_PORT_COUNT, PJ_ETOOMANY);83 82 84 83 /* Allocate video tee structure */ … … 95 94 pj_pool_calloc(pool, max_dst_cnt, 96 95 sizeof(struct vid_tee_conv_t)); 96 tee->put_frm_flag = (pj_uint8_t*) 97 pj_pool_calloc(pool, max_dst_cnt, 98 sizeof(tee->put_frm_flag[0])); 97 99 98 100 /* Initialize video tee buffer, its size is one frame */ … … 296 298 vid_tee_port *tee = (vid_tee_port*)port; 297 299 unsigned i, j; 298 pj_bool_t done[MAX_DST_PORT_COUNT]; 299 300 pj_bzero(done, sizeof(done)); 300 const pj_uint8_t PUT_FRM_DONE = 1; 301 302 pj_bzero(tee->put_frm_flag, tee->dst_port_cnt * 303 sizeof(tee->put_frm_flag[0])); 301 304 302 305 for (i = 0; i < tee->dst_port_cnt; ++i) { 303 306 pjmedia_frame frame_ = *frame; 304 307 305 if ( done[i])308 if (tee->put_frm_flag[i]) 306 309 continue; 307 310 … … 328 331 pjmedia_frame framep; 329 332 330 if ( done[j] ||333 if (tee->put_frm_flag[j] || 331 334 (tee->dst_ports[j].dst->info.fmt.id != 332 335 tee->dst_ports[i].dst->info.fmt.id) || … … 353 356 /* Deliver the data */ 354 357 pjmedia_port_put_frame(tee->dst_ports[j].dst, &framep); 355 done[j] = PJ_TRUE;358 tee->put_frm_flag[j] = PUT_FRM_DONE; 356 359 357 360 if (!tee->tee_conv[i].conv) -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c
r3724 r3725 24 24 #if PJSUA_HAS_VIDEO 25 25 26 #define VID_TEE_MAX_PORT (PJSUA_MAX_CALLS + 1) 27 26 28 static void free_vid_win(pjsua_vid_win_id wid); 27 29 … … 406 408 407 409 /* Create video tee */ 408 status = pjmedia_vid_tee_create(w->pool, fmt, 2, &w->tee); 410 status = pjmedia_vid_tee_create(w->pool, fmt, VID_TEE_MAX_PORT, 411 &w->tee); 409 412 if (status != PJ_SUCCESS) 410 413 goto on_error;
Note: See TracChangeset
for help on using the changeset viewer.