V4L2_CAP_VBI_CAPTURE   | V4L2_CAP_VIDEO_OVERLAY | 
static int mpeg_do_ioctl(struct inode *inode, struct file *file,			 unsigned int cmd, void *arg){	struct cx8802_fh  *fh  = file->private_data;	struct cx8802_dev *dev = fh->dev;	struct cx88_core  *core = dev->core;	if (debug > 1)		cx88_print_ioctl(core->name,cmd);	switch (cmd) {	/* --- capabilities ------------------------------------------ */	case VIDIOC_QUERYCAP:	{		struct v4l2_capability *cap = arg;		memset(cap,0,sizeof(*cap));		strcpy(cap->driver, "cx88_blackbird");		strlcpy(cap->card, cx88_boards[core->board].name,sizeof(cap->card));		sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));		cap->version = CX88_VERSION_CODE;		cap->capabilities =			V4L2_CAP_VIDEO_CAPTURE |			V4L2_CAP_READWRITE     |			V4L2_CAP_STREAMING     |			V4L2_CAP_VBI_CAPTURE   |			V4L2_CAP_VIDEO_OVERLAY |			0;		if (UNSET != core->tuner_type)			cap->capabilities |= V4L2_CAP_TUNER;		return 0;	}	/* --- capture ioctls ---------------------------------------- */	case VIDIOC_ENUM_FMT:	{		struct v4l2_fmtdesc *f = arg;		int index;		index = f->index;		if (index != 0)			return -EINVAL;		memset(f,0,sizeof(*f));		f->index = index;		strlcpy(f->description, "MPEG TS", sizeof(f->description));		f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;		f->pixelformat = V4L2_PIX_FMT_MPEG;		return 0;	}	case VIDIOC_G_FMT:	case VIDIOC_S_FMT:	case VIDIOC_TRY_FMT:	{		/* FIXME -- quick'n'dirty for exactly one size ... */		struct v4l2_format *f = arg;		memset(f,0,sizeof(*f));		f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;		f->fmt.pix.width        = dev->width;		f->fmt.pix.height       = dev->height;		f->fmt.pix.pixelformat  = V4L2_PIX_FMT_MPEG;		f->fmt.pix.field        = V4L2_FIELD_NONE;		f->fmt.pix.bytesperline = 0;		f->fmt.pix.sizeimage    = 188 * 4 * 1024; /* 1024 * 512 */ /* FIXME: BUFFER_SIZE */;		f->fmt.pix.colorspace   = 0;		return 0;	}	/* --- streaming capture ------------------------------------- */	case VIDIOC_REQBUFS:		return videobuf_reqbufs(&fh->mpegq, arg);	case VIDIOC_QUERYBUF:		return videobuf_querybuf(&fh->mpegq, arg);	case VIDIOC_QBUF:		return videobuf_qbuf(&fh->mpegq, arg);	case VIDIOC_DQBUF:		return videobuf_dqbuf(&fh->mpegq, arg,				      file->f_flags & O_NONBLOCK);	case VIDIOC_STREAMON:		return videobuf_streamon(&fh->mpegq);	case VIDIOC_STREAMOFF:		return videobuf_streamoff(&fh->mpegq);	default:		return cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook );	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/31629424132c87f7c8bd79d7ed4d014354a06427/cx88-blackbird.c/clean/drivers/media/video/cx88/cx88-blackbird.c