Tizen 2.1 base
[adaptation/xorg/driver/xserver-xorg-video-emulfb.git] / src / xv / fbdev_v4l2.h
1 /**************************************************************************
2
3 xserver-xorg-video-emulfb
4
5 Copyright 2010 - 2011 Samsung Electronics co., Ltd. All Rights Reserved.
6
7 Contact: Boram Park <boram1288.park@samsung.com>
8
9 Permission is hereby granted, free of charge, to any person obtaining a
10 copy of this software and associated documentation files (the
11 "Software"), to deal in the Software without restriction, including
12 without limitation the rights to use, copy, modify, merge, publish,
13 distribute, sub license, and/or sell copies of the Software, and to
14 permit persons to whom the Software is furnished to do so, subject to
15 the following conditions:
16
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial portions
19 of the Software.
20
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
24 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
25 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
29 **************************************************************************/
30
31 #ifndef __FBDEV_V4L2_H__
32 #define __FBDEV_V4L2_H__
33
34 #include "fbdev_video_types.h"
35
36
37 #define V4L2_PIX_FMT_NV12T      v4l2_fourcc('T', 'V', '1', '2') /* 12  Y/CbCr 4:2:0 64x32 macroblocks */
38 #define V4L2_CID_ROTATION       (V4L2_CID_PRIVATE_BASE + 0)
39 #define V4L2_CID_PADDR_Y        (V4L2_CID_PRIVATE_BASE + 1)
40 #define V4L2_CID_PADDR_CB       (V4L2_CID_PRIVATE_BASE + 2)
41 #define V4L2_CID_PADDR_CR       (V4L2_CID_PRIVATE_BASE + 3)
42 #define V4L2_CID_PADDR_CBCR     (V4L2_CID_PRIVATE_BASE + 4)
43 #define V4L2_CID_OVERLAY_AUTO   (V4L2_CID_PRIVATE_BASE + 5)
44 #define V4L2_CID_OVERLAY_VADDR0 (V4L2_CID_PRIVATE_BASE + 6)
45 #define V4L2_CID_OVERLAY_VADDR1 (V4L2_CID_PRIVATE_BASE + 7)
46 #define V4L2_CID_OVERLAY_VADDR2 (V4L2_CID_PRIVATE_BASE + 8)
47 #define V4L2_CID_OVLY_MODE      (V4L2_CID_PRIVATE_BASE + 9)
48
49
50 Bool    fbdev_v4l2_querycap       (int fd, int capabilities);
51 Bool    fbdev_v4l2_cropcap        (int fd, FBDevV4l2BufType type, struct v4l2_rect *crop);
52
53 Bool    fbdev_v4l2_enum_std       (int fd, struct v4l2_standard *std, v4l2_std_id std_id);
54 Bool    fbdev_v4l2_enum_output    (int fd, struct v4l2_output *output, FBDevV4l2BufType type);
55 Bool    fbdev_v4l2_enum_fmt       (int fd, struct v4l2_fmtdesc *desc, FBDevV4l2BufType type);
56
57 Bool    fbdev_v4l2_g_std          (int fd, v4l2_std_id *std_id);
58 Bool    fbdev_v4l2_s_std          (int fd, v4l2_std_id std_id);
59 Bool    fbdev_v4l2_g_output       (int fd, int *index);
60 Bool    fbdev_v4l2_s_output       (int fd, int index);
61 Bool    fbdev_v4l2_try_fmt        (int fd, struct v4l2_format *format);
62 Bool    fbdev_v4l2_g_fmt          (int fd, struct v4l2_format *format);
63 Bool    fbdev_v4l2_s_fmt          (int fd, struct v4l2_format *format);
64 Bool    fbdev_v4l2_g_parm         (int fd, struct v4l2_streamparm *parm);
65 Bool    fbdev_v4l2_s_parm         (int fd, struct v4l2_streamparm *parm);
66 Bool    fbdev_v4l2_g_fbuf         (int fd, struct v4l2_framebuffer *frame);
67 Bool    fbdev_v4l2_s_fbuf         (int fd, struct v4l2_framebuffer *frame);
68 Bool    fbdev_v4l2_g_crop         (int fd, struct v4l2_crop *crop);
69 Bool    fbdev_v4l2_s_crop         (int fd, struct v4l2_crop *crop);
70 Bool    fbdev_v4l2_g_ctrl         (int fd, struct v4l2_control *ctrl);
71 Bool    fbdev_v4l2_s_ctrl         (int fd, struct v4l2_control *ctrl);
72
73 Bool    fbdev_v4l2_reqbuf         (int fd, struct v4l2_requestbuffers *req);
74 Bool    fbdev_v4l2_querybuf       (int fd, struct v4l2_buffer *set_buf);
75 Bool    fbdev_v4l2_queue          (int fd, struct v4l2_buffer *buf);
76 Bool    fbdev_v4l2_dequeue        (int fd, struct v4l2_buffer *buf);
77
78 Bool    fbdev_v4l2_streamon       (int fd, FBDevV4l2BufType type);
79 Bool    fbdev_v4l2_streamoff      (int fd, FBDevV4l2BufType type);
80 Bool    fbdev_v4l2_start_overlay  (int fd);
81 Bool    fbdev_v4l2_stop_overlay   (int fd);
82
83
84 #endif