Changeset 3691

Show
Ignore:
Timestamp:
12/17/06 15:51:04 (2 years ago)
Author:
hverkuil
Message:

More tweaks for the speed ioctls.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ivtvtv/trunk/ivtvtv.cpp

    r3689 r3691  
    9090                                             speed, 1, 1, direction, 
    9191                                             ipb_frames, 0, aud_mute, fr_field, mute); 
     92                } else if (speed == 2) { 
     93                        __ivtv_api_dec_speed(ivtvfd, 
     94                                             speed, 1, 1, direction, 
     95                                             ipb_frames, 0, aud_mute, fr_field, mute); 
    9296                } else { 
    9397                        __ivtv_api_dec_speed(ivtvfd, 
    94                                              speed, 0, 1, direction, i_frames, 0, 
    95                                              aud_mute, fr_field, mute); 
     98                                             0, 0, 0, direction, ipb_frames, 0, 
     99                                             aud_mute, 0, mute); 
    96100                } 
    97101        } else {                /* Reverse */ 
     
    108112                                             speed, 0, 1, direction, ip_frames, 
    109113                                             b_per_gop, aud_mute, fr_field, mute); 
     114                } else if (speed == 2) { 
     115                        __ivtv_api_dec_speed(ivtvfd, 
     116                                             speed, 1, 1, direction, ip_frames, 
     117                                             b_per_gop, aud_mute, fr_field, mute); 
    110118                } else { 
    111119                        __ivtv_api_dec_speed(ivtvfd, 
    112                                              speed, 0, 1, direction, i_frames, 
    113                                              b_per_gop, aud_mute, fr_field, mute); 
     120                                             2, 0, 1, direction, i_frames, 
     121                                             b_per_gop, aud_mute, 0, mute); 
    114122                } 
    115123        } 
     
    269277 
    270278                        if (dir) { 
    271                                 if (idx == 0) { 
     279                                if (idx < 0) { 
    272280                                        eof = true; 
    273281                                        break; 
     
    276284                        } 
    277285                        else { 
    278                                 if (idx == max_idx - 1) { 
     286                                if (idx >= max_idx - 1) { 
    279287                                        eof = true; 
    280288                                        break; 
     
    287295                        struct ivtv_ioctl_framesync info; 
    288296                        ioctl(fout, IVTV_IOC_GET_TIMING, &info); 
    289                         printf("frame %d %lld %d\n", info.frame, info.pts, idx); 
     297                        printf("frame %d %lld %d\n", info.frame, info.pts, i); 
    290298                        cnt++; 
    291299                        t2 = time(NULL); 
    292300                        if (t1 != t2) { 
    293 //                             printf("sec %d %d\n", cnt, t2 - t1); 
     301                               printf("sec %d %ld\n", cnt, t2 - t1); 
    294302                                cnt = 0; 
    295303                                t1 = t2; 
     
    321329        ioctl(fout, IVTV_IOC_DEC_FAST_STOP, &fast); 
    322330        struct ivtv_cfg_stop_decode stop; 
     331        printf("sleep\n"); 
     332        sleep(4); 
    323333        stop.hide_last = 1; 
    324334        stop.pts_stop = 0; 
    325         //ioctl(fout, IVTV_IOC_STOP_DECODE, &stop); 
    326         ioctl(fout, VIDIOC_STREAMOFF, 0); 
     335        ioctl(fout, IVTV_IOC_STOP_DECODE, &stop); 
     336        printf("%d\n", g_spd); 
    327337        return 0; 
    328338}