From patchwork Tue Oct 20 01:12:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 54902 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9K8FPCt029549 for ; Tue, 20 Oct 2009 08:15:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751312AbZJTIOu (ORCPT ); Tue, 20 Oct 2009 04:14:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751148AbZJTIOr (ORCPT ); Tue, 20 Oct 2009 04:14:47 -0400 Received: from mailrelay009.isp.belgacom.be ([195.238.6.176]:43811 "EHLO mailrelay009.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751112AbZJTIOq (ORCPT ); Tue, 20 Oct 2009 04:14:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvAEANsO3UpR9RAV/2dsb2JhbABDkCjIH4QxBA Received: from 21.16-245-81.adsl-static.isp.belgacom.be (HELO ravenclaw) ([81.245.16.21]) by relay.skynet.be with SMTP; 20 Oct 2009 10:14:45 +0200 Received: by ravenclaw (sSMTP sendmail emulation); Tue, 20 Oct 2009 10:14:58 +0200 Message-Id: <20091020011215.061080010@ideasonboard.com> User-Agent: quilt/0.48-1 Date: Tue, 20 Oct 2009 03:12:14 +0200 From: laurent.pinchart@ideasonboard.com To: linux-media@vger.kernel.org Cc: sakari.ailus@maxwell.research.nokia.com, hverkuil@xs4all.nl, Laurent Pinchart Subject: [RFC/PATCH 04/14] v4l-subdev: Add pads operations References: <20091020011210.623421213@ideasonboard.com> Content-Disposition: inline; filename=v4l-subdev-add-pad-ops.patch Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Index: v4l-dvb-mc/linux/include/media/v4l2-subdev.h =================================================================== --- v4l-dvb-mc.orig/linux/include/media/v4l2-subdev.h +++ v4l-dvb-mc/linux/include/media/v4l2-subdev.h @@ -232,11 +232,21 @@ struct v4l2_subdev_video_ops { int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival); }; +struct v4l2_subdev_pad_ops { + int (*enum_fmt)(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_fmtdesc *fmtdesc); + int (*enum_framesizes)(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_frmsizeenum *fsize); + int (*enum_frameintervals)(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_frmivalenum *fival); + int (*get_fmt)(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_format *fmt); + int (*try_fmt)(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_format *fmt); + int (*set_fmt)(struct v4l2_subdev *sd, unsigned int pad, struct v4l2_format *fmt); +}; + struct v4l2_subdev_ops { const struct v4l2_subdev_core_ops *core; const struct v4l2_subdev_tuner_ops *tuner; const struct v4l2_subdev_audio_ops *audio; const struct v4l2_subdev_video_ops *video; + const struct v4l2_subdev_pad_ops *pad; }; #define V4L2_SUBDEV_NAME_SIZE 32