On Tuesday 06 June 2006 21:49, Martin Dauskardt wrote:
> I noticed that channel switching with pvr350-plugin for vdr takes
> about 4 seconds if I use the ioctl command:
>
> struct ivtv_cfg_stop_decode stop;
>       stop.pts_stop = 0;
>       stop.hide_last = 1;
>       if ( (ret = ioctl(fd_out,IVTV_IOC_STOP_DECODE,&stop)) < 0 ) {
>               printf("Stop %d\n",ret);
>       }
>       if ( (ret = ioctl(fd_out,IVTV_IOC_DEC_FLUSH,0)) < 0 ) {
>               printf("flush %d\n",ret);
>       }
>
>
> while it goes immidiately using a fwapi call instead of the above
> code:
>
> struct ivtv_ioctl_fwapi   fwcall;
>         fwcall.cmd = 0x02;
>         fwcall.args = 1;
>         fwcall.data[0] = 1;
>
>         Clear();
>         if ((ret = ioctl(fd_out, IVTV_IOC_FWAPI, &fwcall)) < 0) {
>             printf("STOP_DECODE %d\n",ret);
>         }
>         if ( ( ret = ioctl(fd_out, IVTV_IOC_DEC_FLUSH, 0) ) < 0 ) {
>             printf("4: %d\n",ret);
>         }
>
>
> If have read that it is not recommended to use fwapi commands for
> other than for development.

Correct, in fact it will be removed from the driver in the near future.

> I gues this could be the reason for problems like
> ivtv0 warning: 1000 ms time out waiting for firmware
> ivtv0 warning: Failed api call 0x000000d2 with result 0xfffffff0

Yes, if you look at ivtv_stop_v4l2_decode_stream() in ivtv_stream.c then 
you'll see that there are a lot more things that need to be taken care 
of.

>
> 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. 
Note BTW that IVTV_IOC_STOP_DECODE already calls IVTV_IOC_DEC_FLUSH, so 
there is no need to do it twice.

Regards,

        Hans

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

Reply via email to