diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-05-21 12:44:02 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-05-21 12:44:02 +0200 |
commit | c5fbb8e80c9235232c11a933d7f0aef6b5734258 (patch) | |
tree | 786b839f0f8f31fe51969a6682334530e30d7571 /linux/drivers/media/video/ivtv/ivtv-ioctl.c | |
parent | 29993ba41c50e8096ffd25fe704990479248d061 (diff) | |
download | mediapointer-dvb-s2-c5fbb8e80c9235232c11a933d7f0aef6b5734258.tar.gz mediapointer-dvb-s2-c5fbb8e80c9235232c11a933d7f0aef6b5734258.tar.bz2 |
Backed out changeset c7cb1aaec112a3ee7d6483b54d03d6a093754f10
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-ioctl.c | 81 |
1 files changed, 54 insertions, 27 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-ioctl.c b/linux/drivers/media/video/ivtv/ivtv-ioctl.c index 15c2c9f5c..5b799f016 100644 --- a/linux/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/linux/drivers/media/video/ivtv/ivtv-ioctl.c @@ -362,46 +362,56 @@ static int ivtv_get_fmt(struct ivtv *itv, int streamtype, struct v4l2_format *fm case V4L2_BUF_TYPE_VIDEO_OUTPUT: if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) return -EINVAL; - fmt->fmt.pix_out.left = itv->main_rect.left; - fmt->fmt.pix_out.top = itv->main_rect.top; - fmt->fmt.pix_out.width = itv->main_rect.width; - fmt->fmt.pix_out.height = itv->main_rect.height; - fmt->fmt.pix_out.colorspace = V4L2_COLORSPACE_SMPTE170M; - fmt->fmt.pix_out.field = V4L2_FIELD_INTERLACED; +#if 0 + /* Temporarily removed until a better solution is in place that does not + break the ABI */ + fmt->fmt.pix.left = itv->main_rect.left; + fmt->fmt.pix.top = itv->main_rect.top; +#endif + fmt->fmt.pix.width = itv->main_rect.width; + fmt->fmt.pix.height = itv->main_rect.height; + fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; + fmt->fmt.pix.field = V4L2_FIELD_INTERLACED; if (itv->output_mode == OUT_UDMA_YUV) { switch (itv->yuv_info.lace_mode & IVTV_YUV_MODE_MASK) { case IVTV_YUV_MODE_INTERLACED: - fmt->fmt.pix_out.field = (itv->yuv_info.lace_mode & IVTV_YUV_SYNC_MASK) ? + fmt->fmt.pix.field = (itv->yuv_info.lace_mode & IVTV_YUV_SYNC_MASK) ? V4L2_FIELD_INTERLACED_BT : V4L2_FIELD_INTERLACED_TB; break; case IVTV_YUV_MODE_PROGRESSIVE: - fmt->fmt.pix_out.field = V4L2_FIELD_NONE; + fmt->fmt.pix.field = V4L2_FIELD_NONE; break; default: - fmt->fmt.pix_out.field = V4L2_FIELD_ANY; + fmt->fmt.pix.field = V4L2_FIELD_ANY; break; } - fmt->fmt.pix_out.pixelformat = V4L2_PIX_FMT_HM12; + fmt->fmt.pix.pixelformat = V4L2_PIX_FMT_HM12; /* YUV size is (Y=(h*w) + UV=(h*(w/2))) */ - fmt->fmt.pix_out.sizeimage = + fmt->fmt.pix.sizeimage = fmt->fmt.pix.height * fmt->fmt.pix.width + fmt->fmt.pix.height * (fmt->fmt.pix.width / 2); } else if (itv->output_mode == OUT_YUV || streamtype == IVTV_ENC_STREAM_TYPE_YUV || streamtype == IVTV_DEC_STREAM_TYPE_YUV) { - fmt->fmt.pix_out.pixelformat = V4L2_PIX_FMT_HM12; + fmt->fmt.pix.pixelformat = V4L2_PIX_FMT_HM12; /* YUV size is (Y=(h*w) + UV=(h*(w/2))) */ - fmt->fmt.pix_out.sizeimage = - fmt->fmt.pix_out.height * fmt->fmt.pix_out.width + - fmt->fmt.pix_out.height * (fmt->fmt.pix_out.width / 2); + fmt->fmt.pix.sizeimage = + fmt->fmt.pix.height * fmt->fmt.pix.width + + fmt->fmt.pix.height * (fmt->fmt.pix.width / 2); } else { - fmt->fmt.pix_out.pixelformat = V4L2_PIX_FMT_MPEG; - fmt->fmt.pix_out.sizeimage = 128 * 1024; + fmt->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; + fmt->fmt.pix.sizeimage = 128 * 1024; } break; case V4L2_BUF_TYPE_VIDEO_CAPTURE: +#if 0 + /* Temporarily removed until a better solution is in place that does not + break the ABI */ + fmt->fmt.pix.left = 0; + fmt->fmt.pix.top = 0; +#endif fmt->fmt.pix.width = itv->params.width; fmt->fmt.pix.height = itv->params.height; fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; @@ -495,22 +505,33 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype, if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) return -EINVAL; - field = fmt->fmt.pix_out.field; - r.top = fmt->fmt.pix_out.top; - r.left = fmt->fmt.pix_out.left; - r.width = fmt->fmt.pix_out.width; - r.height = fmt->fmt.pix_out.height; + field = fmt->fmt.pix.field; +#if 0 + /* Temporarily removed until a better solution is in place that does not + break the ABI */ + r.top = fmt->fmt.pix.top; + r.left = fmt->fmt.pix.left; +#else + r.top = 0; + r.left = 0; +#endif + r.width = fmt->fmt.pix.width; + r.height = fmt->fmt.pix.height; ivtv_get_fmt(itv, streamtype, fmt); if (itv->output_mode != OUT_UDMA_YUV) { /* TODO: would setting the rect also be valid for this mode? */ - fmt->fmt.pix_out.top = r.top; - fmt->fmt.pix_out.left = r.left; - fmt->fmt.pix_out.width = r.width; - fmt->fmt.pix_out.height = r.height; +#if 0 + /* Temporarily removed until a better solution is in place that does not + break the ABI */ + fmt->fmt.pix.top = r.top; + fmt->fmt.pix.left = r.left; +#endif + fmt->fmt.pix.width = r.width; + fmt->fmt.pix.height = r.height; } if (itv->output_mode == OUT_UDMA_YUV) { /* TODO: add checks for validity */ - fmt->fmt.pix_out.field = field; + fmt->fmt.pix.field = field; } if (set_fmt) { if (itv->output_mode == OUT_UDMA_YUV) { @@ -1151,6 +1172,12 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void fb->fmt.pixelformat = itv->osd_pixelformat; fb->fmt.width = itv->osd_rect.width; fb->fmt.height = itv->osd_rect.height; +#if 0 + /* Temporarily removed until a better solution is in place that does not + break the ABI */ + fb->fmt.left = itv->osd_rect.left; + fb->fmt.top = itv->osd_rect.top; +#endif fb->base = (void *)itv->osd_video_pbase; if (itv->osd_global_alpha_state) fb->flags |= V4L2_FBUF_FLAG_GLOBAL_ALPHA; |