diff options
-rw-r--r-- | linux/drivers/media/common/saa7146_video.c | 108 |
1 files changed, 6 insertions, 102 deletions
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c index 7b04748c0..569ad66c7 100644 --- a/linux/drivers/media/common/saa7146_video.c +++ b/linux/drivers/media/common/saa7146_video.c @@ -740,85 +740,10 @@ static int video_end(struct saa7146_fh *fh) return 0; } -/* capturing to framebuffer */ - -int overlay_reqbufs(struct saa7146_dev *dev, struct v4l2_requestbuffers *req) -{ -/* struct saa7146_fh *fh = file->private_data; - - if (req->count > VIDEO_MAX_FRAME) - req->count = VIDEO_MAX_FRAME; - - *size = fh->video_fmt.sizeimage; - -*/ - return 0; -} -int overlay_querybuf(struct saa7146_dev *dev, struct v4l2_buffer *buf) -{ - return 0; -} -int overlay_qbuf(struct saa7146_dev *dev, struct v4l2_buffer *b) -{ -/* if (b->index < 0 || b->index >= VIDEO_MAX_FRAME) { - DEB_D(("index %d out of bounds.\n",b->index)); - goto -EINVAL; - } - - buf = q->bufs[b->index]; - if (NULL == buf) { - printk("videobuf_qbuf: NULL == buf\n"); - goto done; - } - if (0 == buf->baddr) { - printk("videobuf_qbuf: 0 == buf->baddr\n"); - goto done; - } - if (buf->state == STATE_QUEUED || - buf->state == STATE_ACTIVE) { - printk("videobuf_qbuf: already queued or activated.\n"); - goto done; - } - - field = videobuf_next_field(q); - retval = q->ops->buf_prepare(file,buf,field); - if (0 != retval) { - printk("videobuf_qbuf: buf_prepare() failed.\n"); - goto done; - } - - list_add_tail(&buf->stream,&q->stream); - if (q->streaming) { - spin_lock_irqsave(q->irqlock,flags); - q->ops->buf_queue(file,buf); - spin_unlock_irqrestore(q->irqlock,flags); - } - retval = 0; - - done: - up(&q->lock); - return retval; -*/ - return 0; -} -int overlay_dqbuf(struct saa7146_dev *dev, struct v4l2_buffer *buf) -{ - return 0; -} -int overlay_streamon(struct saa7146_dev *dev) -{ - return 0; -} -int overlay_streamoff(struct saa7146_dev *dev) -{ - return 0; -} - - /* * This function is _not_ called directly, but from * video_generic_ioctl (and maybe others). userspace - * copying is done already, arg is a kernel fhinter. + * copying is done already, arg is a kernel pointer. */ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg) @@ -1141,38 +1066,24 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int case VIDIOC_REQBUFS: { struct v4l2_requestbuffers *req = arg; DEB_D(("VIDIOC_REQBUFS, type:%d\n",req->type)); -/* - if( req->type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) { - return overlay_reqbufs(dev,req); - } -*/ return videobuf_reqbufs(file,q,req); } case VIDIOC_QUERYBUF: { struct v4l2_buffer *buf = arg; DEB_D(("VIDIOC_QUERYBUF, type:%d, offset:%d\n",buf->type,buf->m.offset)); -/* if( buf->type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) { - return overlay_querybuf(dev,buf); - } - */ return videobuf_querybuf(q,buf); + return videobuf_querybuf(q,buf); } case VIDIOC_QBUF: { struct v4l2_buffer *buf = arg; int ret = 0; -/* if( buf->type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) { - return overlay_qbuf(dev,buf); - } - */ ret = videobuf_qbuf(file,q,buf); + ret = videobuf_qbuf(file,q,buf); DEB_D(("VIDIOC_QBUF: ret:%d, index:%d\n",ret,buf->index)); return ret; } case VIDIOC_DQBUF: { struct v4l2_buffer *buf = arg; int ret = 0; -/* if( buf->type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) { - return overlay_dqbuf(dev,buf); - } - */ ret = videobuf_dqbuf(file,q,buf); + ret = videobuf_dqbuf(file,q,buf); DEB_D(("VIDIOC_DQBUF: ret:%d, index:%d\n",ret,buf->index)); return ret; } @@ -1185,11 +1096,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int return err; } } -/* if( *type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) { - err = overlay_streamon(dev); - } else { */ - err = videobuf_streamon(file,q); -/* } */ + err = videobuf_streamon(file,q); return err; } case VIDIOC_STREAMOFF: { @@ -1199,10 +1106,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int if( 0 != ops->capture_end ) { ops->capture_end(fh); } -/* if( *type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) { - return overlay_streamoff(dev); - } - */ err = videobuf_streamoff(file,q); + err = videobuf_streamoff(file,q); return err; } case VIDIOCGMBUF: |