Ignore:
Timestamp:
Mar 17, 2011 11:25:19 AM (13 years ago)
Author:
bennylp
Message:

Re #1213 (video devices):

  • fixed devices to correctly increment the frame timestamp
  • minor fix in video port to set default "active" value to 1 in the param
File:
1 edited

Legend:

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

    r3399 r3459  
    9393    UIImageView         *imgView; 
    9494    void                *buf; 
     95     
     96    pj_timestamp         frame_ts; 
     97    unsigned             ts_inc; 
    9598}; 
    9699 
     
    356359    frame.size = stream->frame_size; 
    357360    frame.bit_info = 0; 
     361    frame.timestamp.u64 = stream->frame_ts.u64; 
     362     
    358363    if (stream->vid_cb.capture_cb) 
    359364        (*stream->vid_cb.capture_cb)(&stream->base, stream->user_data, &frame); 
    360365 
     366    stream->frame_ts.u64 += stream->ts_inc; 
     367     
    361368    /* Unlock the pixel buffer */ 
    362369    CVPixelBufferUnlockBaseAddress(imageBuffer,0); 
     
    386393    pj_pool_t *pool; 
    387394    struct ios_stream *strm; 
    388     pjmedia_video_format_detail *vfd; 
     395    const pjmedia_video_format_detail *vfd; 
    389396    const pjmedia_video_format_info *vfi; 
    390397    pj_status_t status = PJ_SUCCESS; 
     
    419426    strm->bytes_per_row = strm->size.w * strm->bpp / 8; 
    420427    strm->frame_size = strm->bytes_per_row * strm->size.h; 
     428    strm->ts_inc = PJMEDIA_SPF2(param->clock_rate, &vfd->fps, 1); 
    421429 
    422430    /* Create capture stream here */ 
Note: See TracChangeset for help on using the changeset viewer.