public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC PATCH 4/4] ivtv: implement new decoder command ioctls.
@ 2011-11-23 11:54 Martin Dauskardt
  2011-11-23 12:14 ` Hans Verkuil
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Dauskardt @ 2011-11-23 11:54 UTC (permalink / raw)
  To: linux-media, Hans Verkuil

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.

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. 

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.

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.

Greets,

Martin

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [RFC PATCH 0/4] Replace VIDEO_COMMAND with VIDIOC_DECODER_CMD
@ 2011-11-23 11:12 Hans Verkuil
  2011-11-23 11:12 ` [RFC PATCH 1/4] v4l2: add VIDIOC_(TRY_)DECODER_CMD Hans Verkuil
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Verkuil @ 2011-11-23 11:12 UTC (permalink / raw)
  To: linux-media; +Cc: Mauro Carvalho Chehab

During the 2011 workshop we discussed replacing the decoder commands in
include/linux/dvb/video.h and audio.h by a proper V4L2 API.

This patch series is the first phase of that. It adds new VIDIOC_(TRY_)DECODER_CMD
ioctls to the V4L2 API. These are identical to the VIDEO_(TRY_)COMMAND from
dvb/video.h, but the names of the fields and defines now conform to the V4L2
API conventions.

Documentation has been added and ivtv (the only V4L2 driver that used VIDEO_COMMAND)
has been adapted to support the new V4L2 API.

I do have one question for Mauro: what do you want to do with video.h? Should it be
removed altogether eventually?

Some of the commands defined there aren't used by any driver (e.g. VIDEO_GET_NAVI),
some are specific to the av7110 driver (e.g. VIDEO_STILLPICTURE), some are specific
to ivtv (VIDEO_COMMAND) and some are used by both ivtv and av7110 (e.g. VIDEO_PLAY).

My proposal would be to:

1) remove anything that is not used by any driver from audio.h and video.h
2) move av7110 specific stuff to a new linux/av7110.h header
3) move ivtv specific stuff to the linux/ivtv.h header
4) shared code should be moved to the new linux/av7110.h header and also copied
   to linux/ivtv.h. The ivtv version will rename the names (e.g. VIDEO_ becomes
   IVTV_) but is otherwise unchanged to preserve the ABI. 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.
5) remove linux/dvb/audio.h and video.h.

What do you think, Mauro?

Regards,

	Hans


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-11-23 19:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 11:54 [RFC PATCH 4/4] ivtv: implement new decoder command ioctls Martin Dauskardt
2011-11-23 12:14 ` Hans Verkuil
2011-11-23 12:51   ` Mauro Carvalho Chehab
2011-11-23 19:44   ` Martin Dauskardt
  -- strict thread matches above, loose matches on Subject: below --
2011-11-23 11:12 [RFC PATCH 0/4] Replace VIDEO_COMMAND with VIDIOC_DECODER_CMD Hans Verkuil
2011-11-23 11:12 ` [RFC PATCH 1/4] v4l2: add VIDIOC_(TRY_)DECODER_CMD Hans Verkuil
2011-11-23 11:12   ` [RFC PATCH 4/4] ivtv: implement new decoder command ioctls Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox