Changeset 3691
- Timestamp:
- 12/17/06 15:51:04 (2 years ago)
- Files:
-
- ivtvtv/trunk/ivtvtv.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ivtvtv/trunk/ivtvtv.cpp
r3689 r3691 90 90 speed, 1, 1, direction, 91 91 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); 92 96 } else { 93 97 __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); 96 100 } 97 101 } else { /* Reverse */ … … 108 112 speed, 0, 1, direction, ip_frames, 109 113 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); 110 118 } else { 111 119 __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); 114 122 } 115 123 } … … 269 277 270 278 if (dir) { 271 if (idx ==0) {279 if (idx < 0) { 272 280 eof = true; 273 281 break; … … 276 284 } 277 285 else { 278 if (idx == max_idx - 1) {286 if (idx >= max_idx - 1) { 279 287 eof = true; 280 288 break; … … 287 295 struct ivtv_ioctl_framesync info; 288 296 ioctl(fout, IVTV_IOC_GET_TIMING, &info); 289 printf("frame %d %lld %d\n", info.frame, info.pts, i dx);297 printf("frame %d %lld %d\n", info.frame, info.pts, i); 290 298 cnt++; 291 299 t2 = time(NULL); 292 300 if (t1 != t2) { 293 // printf("sec %d %d\n", cnt, t2 - t1);301 printf("sec %d %ld\n", cnt, t2 - t1); 294 302 cnt = 0; 295 303 t1 = t2; … … 321 329 ioctl(fout, IVTV_IOC_DEC_FAST_STOP, &fast); 322 330 struct ivtv_cfg_stop_decode stop; 331 printf("sleep\n"); 332 sleep(4); 323 333 stop.hide_last = 1; 324 334 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); 327 337 return 0; 328 338 }
