> From: Hans Verkuil <[EMAIL PROTECTED]>
> > But why is there such a long delay with the recommended ioctl? What
> > makes the difference? How can I improve it?
>
> No idea. Try to set from debug messages in
> ivtv_stop_v4l2_decode_stream() to see what part takes so much time.

Hi Hans,
could you describe this a little more? Which debug level do you recommend
for this?  I tried loading ivtv with ivtv_debug=16 and got the following in
syslog:

Jun  7 08:37:18 linvdr user.info vdr: [1432] switching to channel 38
Jun  7 08:37:18 linvdr user.debug vdr: [1470] transfer thread ended
(pid=1470, tid=1470)
Jun  7 08:37:18 linvdr user.info kernel: ivtv0 ioctl: v4l2 ioctl 0x400c401e
Jun  7 08:37:18 linvdr user.info kernel: ivtv0 ioctl: IVTV_IOC_STOP_DECODE
Jun  7 08:37:18 linvdr user.debug vdr: [1432] buffer stats: 72756 (3%) used
Jun  7 08:37:18 linvdr user.info kernel: ivtv0 ioctl: v4l2 ioctl 0x400c401e
Jun  7 08:37:18 linvdr user.info kernel: ivtv0 ioctl: IVTV_IOC_STOP_DECODE
Jun  7 08:37:18 linvdr user.debug vdr: [1473] TS buffer on device 1 thread
ended (pid=1473, tid=1473)
Jun  7 08:37:18 linvdr user.debug vdr: [1471] buffer stats: 75764 (3%) used
Jun  7 08:37:18 linvdr user.debug vdr: [1471] receiver on device 1 thread
ended (pid=1471, tid=1471)
Jun  7 08:37:18 linvdr user.debug vdr: [1432] buffer stats: 0 (0%) used
Jun  7 08:37:18 linvdr user.debug vdr: [1432] creating directory
/vtx/T-8468-2818-16411
Jun  7 08:37:18 linvdr user.info kernel: ivtv0 ioctl: v4l2 ioctl 0x400c401e
Jun  7 08:37:18 linvdr user.info kernel: ivtv0 ioctl: IVTV_IOC_STOP_DECODE
Jun  7 08:37:18 linvdr user.info kernel: ivtv0 ioctl: v4l2 ioctl 0x4008401d
Jun  7 08:37:18 linvdr user.info kernel: ivtv0 ioctl:
IVTV_IOC_S_START_DECODE
Jun  7 08:37:18 linvdr user.info kernel: ivtv0 ioctl: v4l2 ioctl 0x00004025
Jun  7 08:37:18 linvdr user.info kernel: ivtv0 ioctl: IVTV_IOC_PLAY
Jun  7 08:37:18 linvdr user.debug vdr: [1474] transfer thread started
(pid=1474, tid=1474)
Jun  7 08:37:18 linvdr user.debug vdr: [1475] receiver on device 1 thread
started (pid=1475, tid=1475)
Jun  7 08:37:18 linvdr user.debug vdr: [1477] TS buffer on device 1 thread
started (pid=1477, tid=1477)
Jun  7 08:37:18 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:18 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:18 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:18 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:18 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.debug vdr: [1474] setting audio track to 1 (0)
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:19 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:20 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:21 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:22 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:23 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:24 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:24 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:24 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:24 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:24 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:24 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:24 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME
Jun  7 08:37:27 linvdr user.info kernel: ivtv0-osd ioctl:
IVTVFB_IOCTL_PREP_FRAME

When I press the channel-up-key on my remote the picture becomes immidiately
black, but new picture from next channel appears about 4 seconds later,
although I can`t see this point in the log.


> Note BTW that IVTV_IOC_STOP_DECODE already calls IVTV_IOC_DEC_FLUSH, so
> there is no need to do it twice.

thanks, I removed it.



_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to