blob: 6577e1ffd8e7cec44d91271b96b25728343f29c1 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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>
Ben Cheng655a7c02013-10-16 16:09:24 -070022#include <time.h>
23typedef enum {
Tao Baod7db5942015-01-28 10:07:51 -080024 VIDEO_FORMAT_4_3,
25 VIDEO_FORMAT_16_9,
Tao Baod7db5942015-01-28 10:07:51 -080026 VIDEO_FORMAT_221_1
Ben Cheng655a7c02013-10-16 16:09:24 -070027} video_format_t;
28typedef enum {
Tao Baod7db5942015-01-28 10:07:51 -080029 VIDEO_PAN_SCAN,
30 VIDEO_LETTER_BOX,
31 VIDEO_CENTER_CUT_OUT
Ben Cheng655a7c02013-10-16 16:09:24 -070032} video_displayformat_t;
33typedef struct {
Tao Baod7db5942015-01-28 10:07:51 -080034 int w;
35 int h;
Tao Baod7db5942015-01-28 10:07:51 -080036 video_format_t aspect_ratio;
Ben Cheng655a7c02013-10-16 16:09:24 -070037} video_size_t;
38typedef enum {
Tao Baod7db5942015-01-28 10:07:51 -080039 VIDEO_SOURCE_DEMUX,
Tao Baod7db5942015-01-28 10:07:51 -080040 VIDEO_SOURCE_MEMORY
Ben Cheng655a7c02013-10-16 16:09:24 -070041} video_stream_source_t;
42typedef enum {
Tao Baod7db5942015-01-28 10:07:51 -080043 VIDEO_STOPPED,
Tao Baod7db5942015-01-28 10:07:51 -080044 VIDEO_PLAYING,
45 VIDEO_FREEZED
Ben Cheng655a7c02013-10-16 16:09:24 -070046} video_play_state_t;
47#define VIDEO_CMD_PLAY (0)
Ben Cheng655a7c02013-10-16 16:09:24 -070048#define VIDEO_CMD_STOP (1)
49#define VIDEO_CMD_FREEZE (2)
50#define VIDEO_CMD_CONTINUE (3)
51#define VIDEO_CMD_FREEZE_TO_BLACK (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -070052#define VIDEO_CMD_STOP_TO_BLACK (1 << 0)
53#define VIDEO_CMD_STOP_IMMEDIATELY (1 << 1)
54#define VIDEO_PLAY_FMT_NONE (0)
55#define VIDEO_PLAY_FMT_GOP (1)
Ben Cheng655a7c02013-10-16 16:09:24 -070056struct video_command {
Tao Baod7db5942015-01-28 10:07:51 -080057 __u32 cmd;
58 __u32 flags;
59 union {
Tao Baod7db5942015-01-28 10:07:51 -080060 struct {
61 __u64 pts;
62 } stop;
63 struct {
Tao Baod7db5942015-01-28 10:07:51 -080064 __s32 speed;
65 __u32 format;
66 } play;
67 struct {
Tao Baod7db5942015-01-28 10:07:51 -080068 __u32 data[16];
69 } raw;
70 };
Ben Cheng655a7c02013-10-16 16:09:24 -070071};
Ben Cheng655a7c02013-10-16 16:09:24 -070072#define VIDEO_VSYNC_FIELD_UNKNOWN (0)
73#define VIDEO_VSYNC_FIELD_ODD (1)
74#define VIDEO_VSYNC_FIELD_EVEN (2)
75#define VIDEO_VSYNC_FIELD_PROGRESSIVE (3)
Ben Cheng655a7c02013-10-16 16:09:24 -070076struct video_event {
Tao Baod7db5942015-01-28 10:07:51 -080077 __s32 type;
Ben Cheng655a7c02013-10-16 16:09:24 -070078#define VIDEO_EVENT_SIZE_CHANGED 1
79#define VIDEO_EVENT_FRAME_RATE_CHANGED 2
Ben Cheng655a7c02013-10-16 16:09:24 -070080#define VIDEO_EVENT_DECODER_STOPPED 3
81#define VIDEO_EVENT_VSYNC 4
Christopher Ferris1308ad32017-11-14 17:32:13 -080082 long timestamp;
Tao Baod7db5942015-01-28 10:07:51 -080083 union {
Tao Baod7db5942015-01-28 10:07:51 -080084 video_size_t size;
85 unsigned int frame_rate;
86 unsigned char vsync_field;
87 } u;
Ben Cheng655a7c02013-10-16 16:09:24 -070088};
89struct video_status {
Tao Baod7db5942015-01-28 10:07:51 -080090 int video_blank;
91 video_play_state_t play_state;
Tao Baod7db5942015-01-28 10:07:51 -080092 video_stream_source_t stream_source;
93 video_format_t video_format;
94 video_displayformat_t display_format;
Ben Cheng655a7c02013-10-16 16:09:24 -070095};
Ben Cheng655a7c02013-10-16 16:09:24 -070096struct video_still_picture {
Tao Baod7db5942015-01-28 10:07:51 -080097 char __user * iFrame;
98 __s32 size;
Ben Cheng655a7c02013-10-16 16:09:24 -070099};
Ben Cheng655a7c02013-10-16 16:09:24 -0700100typedef __u16 video_attributes_t;
101#define VIDEO_CAP_MPEG1 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700102#define VIDEO_CAP_MPEG2 2
103#define VIDEO_CAP_SYS 4
104#define VIDEO_CAP_PROG 8
105#define VIDEO_CAP_SPU 16
Ben Cheng655a7c02013-10-16 16:09:24 -0700106#define VIDEO_CAP_NAVI 32
107#define VIDEO_CAP_CSS 64
108#define VIDEO_STOP _IO('o', 21)
109#define VIDEO_PLAY _IO('o', 22)
Ben Cheng655a7c02013-10-16 16:09:24 -0700110#define VIDEO_FREEZE _IO('o', 23)
111#define VIDEO_CONTINUE _IO('o', 24)
112#define VIDEO_SELECT_SOURCE _IO('o', 25)
113#define VIDEO_SET_BLANK _IO('o', 26)
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define VIDEO_GET_STATUS _IOR('o', 27, struct video_status)
115#define VIDEO_GET_EVENT _IOR('o', 28, struct video_event)
116#define VIDEO_SET_DISPLAY_FORMAT _IO('o', 29)
117#define VIDEO_STILLPICTURE _IOW('o', 30, struct video_still_picture)
Ben Cheng655a7c02013-10-16 16:09:24 -0700118#define VIDEO_FAST_FORWARD _IO('o', 31)
119#define VIDEO_SLOWMOTION _IO('o', 32)
120#define VIDEO_GET_CAPABILITIES _IOR('o', 33, unsigned int)
121#define VIDEO_CLEAR_BUFFER _IO('o', 34)
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#define VIDEO_SET_STREAMTYPE _IO('o', 36)
123#define VIDEO_SET_FORMAT _IO('o', 37)
Ben Cheng655a7c02013-10-16 16:09:24 -0700124#define VIDEO_GET_SIZE _IOR('o', 55, video_size_t)
Ben Cheng655a7c02013-10-16 16:09:24 -0700125#define VIDEO_GET_PTS _IOR('o', 57, __u64)
Ben Cheng655a7c02013-10-16 16:09:24 -0700126#define VIDEO_GET_FRAME_COUNT _IOR('o', 58, __u64)
127#define VIDEO_COMMAND _IOWR('o', 59, struct video_command)
128#define VIDEO_TRY_COMMAND _IOWR('o', 60, struct video_command)
129#endif