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> 23 typedef enum { 24 VIDEO_FORMAT_4_3, 25 VIDEO_FORMAT_16_9, 26 VIDEO_FORMAT_221_1 27 } video_format_t; 28 typedef enum { 29 VIDEO_PAN_SCAN, 30 VIDEO_LETTER_BOX, 31 VIDEO_CENTER_CUT_OUT 32 } video_displayformat_t; 33 typedef struct { 34 int w; 35 int h; 36 video_format_t aspect_ratio; 37 } video_size_t; 38 typedef enum { 39 VIDEO_SOURCE_DEMUX, 40 VIDEO_SOURCE_MEMORY 41 } video_stream_source_t; 42 typedef enum { 43 VIDEO_STOPPED, 44 VIDEO_PLAYING, 45 VIDEO_FREEZED 46 } video_play_state_t; 47 #define VIDEO_CMD_PLAY (0) 48 #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) 52 #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) 56 struct video_command { 57 __u32 cmd; 58 __u32 flags; 59 union { 60 struct { 61 __u64 pts; 62 } stop; 63 struct { 64 __s32 speed; 65 __u32 format; 66 } play; 67 struct { 68 __u32 data[16]; 69 } raw; 70 }; 71 }; 72 #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) 76 struct video_event { 77 __s32 type; 78 #define VIDEO_EVENT_SIZE_CHANGED 1 79 #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 80 #define VIDEO_EVENT_DECODER_STOPPED 3 81 #define VIDEO_EVENT_VSYNC 4 82 long timestamp; 83 union { 84 video_size_t size; 85 unsigned int frame_rate; 86 unsigned char vsync_field; 87 } u; 88 }; 89 struct video_status { 90 int video_blank; 91 video_play_state_t play_state; 92 video_stream_source_t stream_source; 93 video_format_t video_format; 94 video_displayformat_t display_format; 95 }; 96 struct video_still_picture { 97 char __user * iFrame; 98 __s32 size; 99 }; 100 typedef __u16 video_attributes_t; 101 #define VIDEO_CAP_MPEG1 1 102 #define VIDEO_CAP_MPEG2 2 103 #define VIDEO_CAP_SYS 4 104 #define VIDEO_CAP_PROG 8 105 #define VIDEO_CAP_SPU 16 106 #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) 110 #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) 114 #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) 118 #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) 122 #define VIDEO_SET_STREAMTYPE _IO('o', 36) 123 #define VIDEO_SET_FORMAT _IO('o', 37) 124 #define VIDEO_GET_SIZE _IOR('o', 55, video_size_t) 125 #define VIDEO_GET_PTS _IOR('o', 57, __u64) 126 #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 130