Changeset 3631
- Timestamp:
- Jul 13, 2011 2:37:14 AM (13 years ago)
- Location:
- pjproject/branches/projects/2.0-dev
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/include/pjmedia/vid_port.h
r3617 r3631 142 142 * 143 143 * @param vid_port The video port. 144 * @param dir Video port's direction.145 144 * 146 145 * @return The clock source. 147 146 */ 148 147 PJ_DECL(pjmedia_clock_src *) 149 pjmedia_vid_port_get_clock_src( pjmedia_vid_port *vid_port, 150 pjmedia_dir dir ); 148 pjmedia_vid_port_get_clock_src( pjmedia_vid_port *vid_port ); 151 149 152 150 /** … … 154 152 * 155 153 * @param vid_port The video port. 156 * @param dir Video port's direction.157 154 * @param clocksrc The clock source. 158 155 * … … 161 158 PJ_DECL(pj_status_t) 162 159 pjmedia_vid_port_set_clock_src( pjmedia_vid_port *vid_port, 163 pjmedia_dir dir,164 160 pjmedia_clock_src *clocksrc ); 165 161 -
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia/vid_port.c
r3623 r3631 390 390 391 391 PJ_DEF(pjmedia_clock_src *) 392 pjmedia_vid_port_get_clock_src( pjmedia_vid_port *vid_port, 393 pjmedia_dir dir ) 392 pjmedia_vid_port_get_clock_src( pjmedia_vid_port *vid_port ) 394 393 { 395 394 PJ_ASSERT_RETURN(vid_port, NULL); … … 399 398 PJ_DECL(pj_status_t) 400 399 pjmedia_vid_port_set_clock_src( pjmedia_vid_port *vid_port, 401 pjmedia_dir dir,402 400 pjmedia_clock_src *clocksrc) 403 401 { … … 505 503 PJ_LOG(4,(THIS_FILE, "Closing %s..", vp->dev_name.ptr)); 506 504 507 if (vp->conv) {508 pjmedia_converter_destroy(vp->conv);509 vp->conv = NULL;510 }511 505 if (vp->clock) { 512 506 pjmedia_clock_destroy(vp->clock); … … 525 519 pj_mutex_destroy(vp->frm_mutex); 526 520 vp->frm_mutex = NULL; 521 } 522 if (vp->conv) { 523 pjmedia_converter_destroy(vp->conv); 524 vp->conv = NULL; 527 525 } 528 526 pj_pool_release(vp->pool); … … 723 721 return; 724 722 725 status = pjmedia_vid_dev_stream_put_frame(vp->strm, &frame); 723 if (frame.size > 0) 724 status = pjmedia_vid_dev_stream_put_frame(vp->strm, &frame); 726 725 } 727 726 … … 742 741 if (vp->client_port) 743 742 status = pjmedia_port_put_frame(vp->client_port, 744 (vp->conv? &frame_: frame));743 (vp->conv? &frame_: frame)); 745 744 if (status != PJ_SUCCESS) 746 745 return status; … … 767 766 pj_status_t status = PJ_SUCCESS; 768 767 768 pj_bzero(frame, sizeof(pjmedia_frame)); 769 769 if (vp->role==ROLE_ACTIVE) { 770 770 unsigned frame_ts = vp->clocksrc.clock_rate / 1000 * … … 877 877 pjmedia_clock_src_update(&vp->clocksrc, NULL); 878 878 879 frame = vp->frm_buf;880 if (convert_frame(vp, vp->frm_buf, frame)!= PJ_SUCCESS)879 status = convert_frame(vp, vp->frm_buf, frame); 880 if (status != PJ_SUCCESS) 881 881 return status; 882 883 if (!vp->conv) 884 pj_memcpy(frame, vp->frm_buf, sizeof(*frame)); 882 885 } else { 883 886 /* The stream is active while we are passive so we need to get the -
pjproject/branches/projects/2.0-dev/pjsip-apps/src/samples/aviplay.c
r3617 r3631 407 407 /* Synchronize video rendering and audio playback */ 408 408 pjmedia_vid_port_set_clock_src( 409 renderer, PJMEDIA_DIR_RENDER,409 renderer, 410 410 pjmedia_snd_port_get_clock_src( 411 411 snd_port, PJMEDIA_DIR_PLAYBACK));
Note: See TracChangeset
for help on using the changeset viewer.