Re: [RFC PATCH 4/4] ivtv: implement new decoder command ioctls.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, November 23, 2011 12:54:18 Martin Dauskardt wrote:
> Hi Hans,
> 
> I am not sure if I understand this right. You wrote:
> 
> "Comments are added on how to convert the legacy ioctls to standard V4L2 API 
> in applications. Perhaps these legacy ioctls in ivtv can even be removed in a 
> few years time."
> 
> But the patch looks for me as if the currently used ioctls shall be removed 
> now, which would immidiately break existing applications.

??? I'm not removing anything. All current ioctls remain present.

> This is an example of the currently used code:
> 
> void cPvr350Device::DecoderStop(int blank)
> {
> 	struct video_command cmd;
> 	memset(&cmd, 0, sizeof(cmd));
> 	cmd.cmd = VIDEO_CMD_STOP;
> 	if (blank) {
> 		cmd.flags = VIDEO_CMD_STOP_TO_BLACK | VIDEO_CMD_STOP_IMMEDIATELY;
> 	} else { //show last frame instead of a black screen
> 		cmd.flags = VIDEO_CMD_STOP_IMMEDIATELY;
> 	}
> 	if (IOCTL(fd_out, VIDEO_COMMAND, &cmd) < 0) {
> 		log(pvrERROR, "pvr350: VIDEO_CMD_STOP %s error=%d:%s", 
> 			blank ? "(blank)" : "", errno, strerror(errno));
> 	}
> }
> 
> As far as I know my pvr350-Plugin for vdr is the only application which uses 
> the hardware decoder of the PVR350 (mythtv has dropped support some years 
> ago). There are only a few users left in time of HDTV. 
> I don't really understand why it is necessary to do this changes. 

It's an DVB/V4L API cleanup: these ioctls ended up in the DVB API when they
should have been part of the V4L API. We're cleaning this up, especially
since the decoder API might become relevant for embedded systems where decoder
support is much more common.

> I suggest to increase the ivtv driver version number when implementing the 
> changes. The application (which must be backward compatible) should be able to 
> determine which ioctl it has to use.

These days the version number of all drivers is the same as the kernel version
number, so it is easy to check when new ioctls became available.
 
> It would be much better if the ivtv driver would continue to support the old 
> ioctl for the few years we still have any PVR350 user.

Don't worry, I won't be removing anything.

I checked the plugin code and you aren't using VIDEO_GET_EVENT. The VIDEO_GET_EVENT
ioctl is the only one I'd really like to get rid of in ivtv in favor of the
V4L2 event API. It's only used as far as I can tell in ivtv-ctl and ivtvplay,
both ivtv utilities that can easily be changed.

Are you perhaps aware of any other userspace applications that use that
ioctl?

Regards,

	Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux