On Sunday 25 February 2007 12:49, Martin Dauskardt wrote:
> ivtv-0.10:
>
> after calling IVTV_IOC_PAUSE I call IVTV_IOC_PLAY to resume decoder
> playback (don`t know another way). For unknown reason this driver
> code doesn`t work:
>
> case IVTV_IOC_PLAY:{
> struct ivtv_stream *s = &itv->streams[IVTV_DEC_STREAM_TYPE_MPG];
> IVTV_DEBUG_IOCTL("IVTV_IOC_PLAY (Obsolete: use
> IVTV_IOC_START_DECODE)\n"); if (!(itv->v4l2_cap &
> V4L2_CAP_VIDEO_OUTPUT))
> return -EINVAL;
> if (ivtv_set_output_mode(itv, OUT_MPG) != OUT_MPG)
> return -EBUSY;
> return ivtv_start_v4l2_decode_stream(s, 0);
>
> although the code looks like as if the driver should do
> IVTV_IOC_START_DECODE instead. But nothing happens, the picture
> remains freezed.
>
> If I let my application call IVTV_IOC_START_DECODE to resume
> playback, it works, but I get a warning
>
> ivtv0 warning: start decode, stream already started! Stopping
>
> and playback skips a few seconds.
>
> I changed ivtv-ioctl.c back to this:
>
> case IVTV_IOC_PLAY:{
> IVTV_DEBUG_IOCTL("IVTV_IOC_PLAY\n");
> if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT))
> return -EINVAL;
> if (atomic_read(&itv->decoding) > 0) {
> ivtv_vapi(itv,CX2341X_DEC_START_PLAYBACK, 2, 0, 0);
> }
> break;
>
> and everything works fine. I think most applications use the
> IVTV_IOC_PLAY command in combination with IVTV_IOC_PAUSE. In order to
> avoid breaking compatibility, I suggest to change the 0.10-driver
> like above.
>
> I know, the new v4l2 commands will solve this anyway, but I think it
> will take some time to rewrite the applications.
I'm not going to change anything in that area at this late stage. But
there is an alternative: if you look in ivtvtv.cpp
(http://ivtvdriver.org/viewcvs/ivtvtv/trunk/ivtvtv.cpp?rev=3711&view=markup)
you'll see that I implemented the resume using the speed ioctl. That
will work (even though it's not as easy to use as IVTV_IOC_PLAY).
The upcoming new ioctls will be much, much easier to use.
Regards,
Hans
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel