Changeset 3581 for pjproject


Ignore:
Timestamp:
Jun 9, 2011 4:13:50 AM (13 years ago)
Author:
ming
Message:

Closed #1292: Make sure each video device for Mac OS and iPhone OS is always unidir

Location:
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/ios_dev.m

    r3489 r3581  
    277277 
    278278    pj_bzero(param, sizeof(*param)); 
    279     if (di->info.dir & PJMEDIA_DIR_CAPTURE_RENDER) { 
    280         param->dir = PJMEDIA_DIR_CAPTURE_RENDER; 
    281         param->cap_id = index; 
    282         param->rend_id = index; 
    283     } else if (di->info.dir & PJMEDIA_DIR_CAPTURE) { 
     279    if (di->info.dir & PJMEDIA_DIR_CAPTURE) { 
    284280        param->dir = PJMEDIA_DIR_CAPTURE; 
    285281        param->cap_id = index; 
     
    401397    PJ_ASSERT_RETURN(f && param && p_vid_strm, PJ_EINVAL); 
    402398    PJ_ASSERT_RETURN(param->fmt.type == PJMEDIA_TYPE_VIDEO && 
    403                      param->fmt.detail_type == PJMEDIA_FORMAT_DETAIL_VIDEO, 
     399                     param->fmt.detail_type == PJMEDIA_FORMAT_DETAIL_VIDEO && 
     400                     (param->dir == PJMEDIA_DIR_CAPTURE || 
     401                     param->dir == PJMEDIA_DIR_RENDER), 
    404402                     PJ_EINVAL); 
    405403 
     
    428426    strm->ts_inc = PJMEDIA_SPF2(param->clock_rate, &vfd->fps, 1); 
    429427 
    430     /* Create capture stream here */ 
    431428    if (param->dir & PJMEDIA_DIR_CAPTURE) { 
     429        /* Create capture stream here */ 
    432430        strm->cap_session = [[AVCaptureSession alloc] init]; 
    433431        if (!strm->cap_session) { 
     
    481479        strm->video_output.minFrameDuration = CMTimeMake(vfd->fps.denum, 
    482480                                                         vfd->fps.num);  
    483     } 
    484  
    485     /* Create renderer stream here */ 
    486     if (param->dir & PJMEDIA_DIR_RENDER) { 
     481    } else if (param->dir & PJMEDIA_DIR_RENDER) { 
     482        /* Create renderer stream here */ 
    487483        /* Get the main window */ 
    488484        UIWindow *window = [[UIApplication sharedApplication] keyWindow]; 
  • pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/qt_dev.m

    r3499 r3581  
    383383    PJ_ASSERT_RETURN(f && param && p_vid_strm, PJ_EINVAL); 
    384384    PJ_ASSERT_RETURN(param->fmt.type == PJMEDIA_TYPE_VIDEO && 
    385                      param->fmt.detail_type == PJMEDIA_FORMAT_DETAIL_VIDEO, 
     385                     param->fmt.detail_type == PJMEDIA_FORMAT_DETAIL_VIDEO && 
     386                     param->dir == PJMEDIA_DIR_RENDER, 
    386387                     PJ_EINVAL); 
    387388 
     
    400401    strm->user_data = user_data; 
    401402    strm->apool = [[NSAutoreleasePool alloc]init]; 
    402      
    403     /* Create player stream here */ 
    404     if (param->dir & PJMEDIA_DIR_PLAYBACK) { 
    405     } 
    406      
     403 
    407404    /* Create capture stream here */ 
    408405    if (param->dir & PJMEDIA_DIR_CAPTURE) { 
Note: See TracChangeset for help on using the changeset viewer.