video.h revision 1308ad3ab33294c3abfd96da12b6df58b381ce52
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_DVBVIDEO_H_
20#define _UAPI_DVBVIDEO_H_
21#include <linux/types.h>
22#include <time.h>
23typedef enum {
24  VIDEO_FORMAT_4_3,
25  VIDEO_FORMAT_16_9,
26  VIDEO_FORMAT_221_1
27} video_format_t;
28typedef enum {
29  VIDEO_SYSTEM_PAL,
30  VIDEO_SYSTEM_NTSC,
31  VIDEO_SYSTEM_PALN,
32  VIDEO_SYSTEM_PALNc,
33  VIDEO_SYSTEM_PALM,
34  VIDEO_SYSTEM_NTSC60,
35  VIDEO_SYSTEM_PAL60,
36  VIDEO_SYSTEM_PALM60
37} video_system_t;
38typedef enum {
39  VIDEO_PAN_SCAN,
40  VIDEO_LETTER_BOX,
41  VIDEO_CENTER_CUT_OUT
42} video_displayformat_t;
43typedef struct {
44  int w;
45  int h;
46  video_format_t aspect_ratio;
47} video_size_t;
48typedef enum {
49  VIDEO_SOURCE_DEMUX,
50  VIDEO_SOURCE_MEMORY
51} video_stream_source_t;
52typedef enum {
53  VIDEO_STOPPED,
54  VIDEO_PLAYING,
55  VIDEO_FREEZED
56} video_play_state_t;
57#define VIDEO_CMD_PLAY (0)
58#define VIDEO_CMD_STOP (1)
59#define VIDEO_CMD_FREEZE (2)
60#define VIDEO_CMD_CONTINUE (3)
61#define VIDEO_CMD_FREEZE_TO_BLACK (1 << 0)
62#define VIDEO_CMD_STOP_TO_BLACK (1 << 0)
63#define VIDEO_CMD_STOP_IMMEDIATELY (1 << 1)
64#define VIDEO_PLAY_FMT_NONE (0)
65#define VIDEO_PLAY_FMT_GOP (1)
66struct video_command {
67  __u32 cmd;
68  __u32 flags;
69  union {
70    struct {
71      __u64 pts;
72    } stop;
73    struct {
74      __s32 speed;
75      __u32 format;
76    } play;
77    struct {
78      __u32 data[16];
79    } raw;
80  };
81};
82#define VIDEO_VSYNC_FIELD_UNKNOWN (0)
83#define VIDEO_VSYNC_FIELD_ODD (1)
84#define VIDEO_VSYNC_FIELD_EVEN (2)
85#define VIDEO_VSYNC_FIELD_PROGRESSIVE (3)
86struct video_event {
87  __s32 type;
88#define VIDEO_EVENT_SIZE_CHANGED 1
89#define VIDEO_EVENT_FRAME_RATE_CHANGED 2
90#define VIDEO_EVENT_DECODER_STOPPED 3
91#define VIDEO_EVENT_VSYNC 4
92  long timestamp;
93  union {
94    video_size_t size;
95    unsigned int frame_rate;
96    unsigned char vsync_field;
97  } u;
98};
99struct video_status {
100  int video_blank;
101  video_play_state_t play_state;
102  video_stream_source_t stream_source;
103  video_format_t video_format;
104  video_displayformat_t display_format;
105};
106struct video_still_picture {
107  char __user * iFrame;
108  __s32 size;
109};
110typedef struct video_highlight {
111  int active;
112  __u8 contrast1;
113  __u8 contrast2;
114  __u8 color1;
115  __u8 color2;
116  __u32 ypos;
117  __u32 xpos;
118} video_highlight_t;
119typedef struct video_spu {
120  int active;
121  int stream_id;
122} video_spu_t;
123typedef struct video_spu_palette {
124  int length;
125  __u8 __user * palette;
126} video_spu_palette_t;
127typedef struct video_navi_pack {
128  int length;
129  __u8 data[1024];
130} video_navi_pack_t;
131typedef __u16 video_attributes_t;
132#define VIDEO_CAP_MPEG1 1
133#define VIDEO_CAP_MPEG2 2
134#define VIDEO_CAP_SYS 4
135#define VIDEO_CAP_PROG 8
136#define VIDEO_CAP_SPU 16
137#define VIDEO_CAP_NAVI 32
138#define VIDEO_CAP_CSS 64
139#define VIDEO_STOP _IO('o', 21)
140#define VIDEO_PLAY _IO('o', 22)
141#define VIDEO_FREEZE _IO('o', 23)
142#define VIDEO_CONTINUE _IO('o', 24)
143#define VIDEO_SELECT_SOURCE _IO('o', 25)
144#define VIDEO_SET_BLANK _IO('o', 26)
145#define VIDEO_GET_STATUS _IOR('o', 27, struct video_status)
146#define VIDEO_GET_EVENT _IOR('o', 28, struct video_event)
147#define VIDEO_SET_DISPLAY_FORMAT _IO('o', 29)
148#define VIDEO_STILLPICTURE _IOW('o', 30, struct video_still_picture)
149#define VIDEO_FAST_FORWARD _IO('o', 31)
150#define VIDEO_SLOWMOTION _IO('o', 32)
151#define VIDEO_GET_CAPABILITIES _IOR('o', 33, unsigned int)
152#define VIDEO_CLEAR_BUFFER _IO('o', 34)
153#define VIDEO_SET_ID _IO('o', 35)
154#define VIDEO_SET_STREAMTYPE _IO('o', 36)
155#define VIDEO_SET_FORMAT _IO('o', 37)
156#define VIDEO_SET_SYSTEM _IO('o', 38)
157#define VIDEO_SET_HIGHLIGHT _IOW('o', 39, video_highlight_t)
158#define VIDEO_SET_SPU _IOW('o', 50, video_spu_t)
159#define VIDEO_SET_SPU_PALETTE _IOW('o', 51, video_spu_palette_t)
160#define VIDEO_GET_NAVI _IOR('o', 52, video_navi_pack_t)
161#define VIDEO_SET_ATTRIBUTES _IO('o', 53)
162#define VIDEO_GET_SIZE _IOR('o', 55, video_size_t)
163#define VIDEO_GET_FRAME_RATE _IOR('o', 56, unsigned int)
164#define VIDEO_GET_PTS _IOR('o', 57, __u64)
165#define VIDEO_GET_FRAME_COUNT _IOR('o', 58, __u64)
166#define VIDEO_COMMAND _IOWR('o', 59, struct video_command)
167#define VIDEO_TRY_COMMAND _IOWR('o', 60, struct video_command)
168#endif
169