While searching for a method to stop the decoder in a similar way like a fwapi
api call 0x02 it does, I found this:
http://www.gossamer-threads.com/lists/ivtv/devel/19928
http://www.gossamer-threads.com/lists/ivtv/devel/20047
http://www.gossamer-threads.com/lists/ivtv/devel/20058
But I am unsure how to use the fast stop. Currently I do it for the
pvr350-vdr-plugin this way:
struct ivtv_cfg_stop_decode stop;
memset(&stop, 0, sizeof stop);
stop.hide_last = 1;
while (ioctl(fd_out, IVTV_IOC_STOP_DECODE, &stop) < 0)
{
if (errno != EBUSY)
{
perror("IVTV_IOC_STOP_DECODE");
break;
}
}
and start decoder with
struct ivtv_cfg_start_decode startd;
memset(&startd, 0, sizeof(startd));
startd.gop_offset = 0;
startd.muted_audio_frames = 0;
while (ioctl(fd_out,IVTV_IOC_START_DECODE, &startd) < 0)
{
if (errno != EBUSY)
{
perror("IVTV_IOC_START_DECODE: ");
break;
}
I looked in ivtv-ioctl.c and recognized that there is some code commented out
("FIXME"):
case IVTV_IOC_START_DECODE: {
struct ivtv_cfg_start_decode *sd = arg;
struct ivtv_stream *stream =
&itv->streams[IVTV_DEC_STREAM_TYPE_MPG];
IVTV_DEBUG_IOCTL("IVTV_IOC_START_DECODE\n");
if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT))
return -EINVAL;
if ((sd->gop_offset < 0) || (sd->gop_offset > 15))
return -EINVAL;
if (sd->muted_audio_frames < 0)
return -EINVAL;
itv->dec_options.gop_offset = sd->gop_offset;
itv->dec_options.mute_frames = sd->muted_audio_frames;
/* FIXME this is new, so not compatible with old apps */
/* We need to enable it in Myth, or have another ioctl */
/* These allow to splice and stop decoding entire buffers */
/*itv->dec_options.fast_stop = sd->fast_stop;
itv->dec_options.no_stop = sd->no_stop;*/
If I uncomment this, I also have to add something in ivtv.h
Shouldn`t it be added to struct ivtv_cfg_stop_decode ? But why is the code in
ivtv-ioctl.c in the start decode section and not in the area of
IVTV_IOC_STOP_DECODE ? My understandig was that these flags are for stopping
and not starting the decoder.
So which ioctls should I use to stop the decoder fast (without shutting it down
completely) and immidiately start it again? And is it necessary to patch the
driver?
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel