Ignore:
Timestamp:
Mar 17, 2011 11:25:19 AM (11 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/qt_dev.m

    r3395 r3459  
    7777    pj_pool_t           *pool;              /**< Memory pool.          */ 
    7878 
     79    pj_timestamp         cap_frame_ts;      /**< Captured frame tstamp */ 
     80    unsigned             cap_ts_inc;        /**< Increment             */ 
     81     
    7982    pjmedia_vid_cb       vid_cb;            /**< Stream callback.      */ 
    8083    void                *user_data;         /**< Application data.     */ 
     
    322325    frame.size = size; 
    323326    frame.bit_info = 0; 
     327    frame.timestamp.u64 = stream->cap_frame_ts.u64; 
     328     
    324329    if (stream->vid_cb.capture_cb) 
    325330        (*stream->vid_cb.capture_cb)(&stream->base, stream->user_data, 
    326331                                     &frame); 
     332     
     333    stream->cap_frame_ts.u64 += stream->cap_ts_inc; 
    327334} 
    328335@end 
     
    380387    /* Create capture stream here */ 
    381388    if (param->dir & PJMEDIA_DIR_CAPTURE) { 
    382         pjmedia_video_format_detail *vfd; 
     389        const pjmedia_video_format_detail *vfd; 
    383390        qt_fmt_info *qfi = get_qt_format_info(param->fmt.id); 
    384391         
     
    438445 
    439446        pj_assert(vfd->fps.num); 
     447        strm->cap_ts_inc = PJMEDIA_SPF2(&strm->param.clock_rate, &vfd->fps, 1); 
     448         
    440449        [strm->video_output setMinimumVideoFrameInterval: 
    441450                            (1.0f * vfd->fps.denum / (double)vfd->fps.num)]; 
Note: See TracChangeset for help on using the changeset viewer.