00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _LINUX_IVTV_H
00024 #define _LINUX_IVTV_H
00025
00026 #define __u32 uint32_t
00027 #define __u64 uint64_t
00028
00029
00030
00031
00032
00033 #define IVTV_IOC_START_DECODE _IOW ('@', 29, struct ivtv_cfg_start_decode)
00034 #define IVTV_IOC_STOP_DECODE _IOW ('@', 30, struct ivtv_cfg_stop_decode)
00035 #define IVTV_IOC_G_SPEED _IOR ('@', 31, struct ivtv_speed)
00036 #define IVTV_IOC_S_SPEED _IOW ('@', 32, struct ivtv_speed)
00037 #define IVTV_IOC_DEC_STEP _IOW ('@', 33, int)
00038 #define IVTV_IOC_DEC_FLUSH _IOW ('@', 34, int)
00039 #define IVTV_IOC_PAUSE_BLACK _IO ('@', 35)
00040 #define IVTV_IOC_STOP _IO ('@', 36)
00041 #define IVTV_IOC_PLAY _IO ('@', 37)
00042 #define IVTV_IOC_PAUSE _IO ('@', 38)
00043 #define IVTV_IOC_FRAMESYNC _IOR ('@', 39, struct ivtv_ioctl_framesync)
00044 #define IVTV_IOC_GET_TIMING _IOR ('@', 40, struct ivtv_ioctl_framesync)
00045 #define IVTV_IOC_S_SLOW_FAST _IOW ('@', 41, struct ivtv_slow_fast)
00046 #define IVTV_IOC_GET_FB _IOR ('@', 44, int)
00047 #define IVTV_IOC_S_GOP_END _IOWR('@', 50, int)
00048 #define IVTV_IOC_S_VBI_PASSTHROUGH _IOW ('@', 51, int)
00049 #define IVTV_IOC_G_VBI_PASSTHROUGH _IOR ('@', 52, int)
00050 #define IVTV_IOC_PASSTHROUGH _IOW ('@', 53, int)
00051 #define IVTV_IOC_PAUSE_ENCODE _IO ('@', 56)
00052 #define IVTV_IOC_RESUME_ENCODE _IO ('@', 57)
00053 #define IVTV_IOC_DEC_SPLICE _IOW ('@', 58, int)
00054 #define IVTV_IOC_DEC_FAST_STOP _IOW ('@', 59, int)
00055 #define IVTV_IOC_PREP_FRAME_YUV _IOW ('@', 60, struct ivtvyuv_ioctl_dma_host_to_ivtv_args)
00056 #define IVTV_IOC_G_YUV_INTERLACE _IOR ('@', 61, struct ivtv_ioctl_yuv_interlace)
00057 #define IVTV_IOC_S_YUV_INTERLACE _IOW ('@', 62, struct ivtv_ioctl_yuv_interlace)
00058 #define IVTV_IOC_G_PTS _IOR ('@', 63, u64)
00059
00060
00061 #ifndef V4L2_CID_PRIVATE_BASE
00062 #define V4L2_CID_PRIVATE_BASE 0x08000000
00063 #endif
00064
00065 #define V4L2_CID_IVTV_FREQ (V4L2_CID_PRIVATE_BASE + 0)
00066 #define V4L2_CID_IVTV_ENC (V4L2_CID_PRIVATE_BASE + 1)
00067 #define V4L2_CID_IVTV_BITRATE (V4L2_CID_PRIVATE_BASE + 2)
00068 #define V4L2_CID_IVTV_MONO (V4L2_CID_PRIVATE_BASE + 3)
00069 #define V4L2_CID_IVTV_JOINT (V4L2_CID_PRIVATE_BASE + 4)
00070 #define V4L2_CID_IVTV_EMPHASIS (V4L2_CID_PRIVATE_BASE + 5)
00071 #define V4L2_CID_IVTV_CRC (V4L2_CID_PRIVATE_BASE + 6)
00072 #define V4L2_CID_IVTV_COPYRIGHT (V4L2_CID_PRIVATE_BASE + 7)
00073 #define V4L2_CID_IVTV_GEN (V4L2_CID_PRIVATE_BASE + 8)
00074
00075 #define V4L2_CID_IVTV_DEC_SMOOTH_FF (V4L2_CID_PRIVATE_BASE + 9)
00076 #define V4L2_CID_IVTV_DEC_FR_MASK (V4L2_CID_PRIVATE_BASE + 10)
00077 #define V4L2_CID_IVTV_DEC_SP_MUTE (V4L2_CID_PRIVATE_BASE + 11)
00078 #define V4L2_CID_IVTV_DEC_FR_FIELD (V4L2_CID_PRIVATE_BASE + 12)
00079 #define V4L2_CID_IVTV_DEC_AUD_SKIP (V4L2_CID_PRIVATE_BASE + 13)
00080 #define V4L2_CID_IVTV_DEC_NUM_BUFFERS (V4L2_CID_PRIVATE_BASE + 14)
00081 #define V4L2_CID_IVTV_DEC_PREBUFFER (V4L2_CID_PRIVATE_BASE + 15)
00082
00083 struct ivtv_ioctl_framesync {
00084 __u32 frame;
00085 __u64 pts;
00086 __u64 scr;
00087 };
00088
00089 struct ivtv_speed {
00090 int scale;
00091 int smooth;
00092 int speed;
00093 int direction;
00094 int fr_mask;
00095 int b_per_gop;
00096 int aud_mute;
00097 int fr_field;
00098 int mute;
00099 };
00100
00101 struct ivtv_slow_fast {
00102 int speed;
00103 int scale;
00104 };
00105
00106 struct ivtv_cfg_start_decode {
00107 __u32 gop_offset;
00108 __u32 muted_audio_frames;
00109 };
00110
00111 struct ivtv_cfg_stop_decode {
00112 int hide_last;
00113
00114 __u64 pts_stop;
00115 };
00116
00117 struct ivtv_ioctl_yuv_interlace{
00118 int interlace_mode;
00119 int threshold;
00120 };
00121 #define IVTV_YUV_MODE_INTERLACED 0
00122 #define IVTV_YUV_MODE_PROGRESSIVE 1
00123 #define IVTV_YUV_MODE_AUTO 2
00124
00125
00126
00127 struct ivtvfb_ioctl_state_info {
00128 unsigned long status;
00129 unsigned long alpha;
00130 };
00131
00132 struct ivtvfb_ioctl_colorkey {
00133 int state;
00134 __u32 colorKey;
00135 };
00136
00137 struct ivtvfb_ioctl_blt_copy_args {
00138 int x, y, width, height, source_offset, source_stride;
00139 };
00140
00141 struct ivtvfb_ioctl_blt_fill_args {
00142 int rasterop, alpha_mode, alpha_mask, width, height, x, y;
00143 unsigned int destPixelMask, colour;
00144
00145 };
00146
00147 struct ivtvfb_ioctl_dma_host_to_ivtv_args {
00148 void *source;
00149 unsigned long dest_offset;
00150 int count;
00151 };
00152
00153 struct ivtvyuv_ioctl_dma_host_to_ivtv_args {
00154 void *y_source;
00155 void *uv_source;
00156 unsigned int yuv_type;
00157 int src_x;
00158 int src_y;
00159 unsigned int src_w;
00160 unsigned int src_h;
00161 int dst_x;
00162 int dst_y;
00163 unsigned int dst_w;
00164 unsigned int dst_h;
00165 int srcBuf_width;
00166 int srcBuf_height;
00167 };
00168
00169 struct ivtvfb_ioctl_get_frame_buffer {
00170 void *mem;
00171 int size;
00172 int sizex;
00173 int sizey;
00174 };
00175
00176 struct ivtv_osd_coords {
00177 unsigned long offset;
00178 unsigned long max_offset;
00179 int pixel_stride;
00180 int lines;
00181 int x;
00182 int y;
00183 };
00184
00185 struct rectangle {
00186 int x0;
00187 int y0;
00188 int x1;
00189 int y1;
00190 };
00191
00192 struct ivtvfb_ioctl_set_window {
00193 int width;
00194 int height;
00195 int left;
00196 int top;
00197 };
00198
00199
00200
00201
00202 #define IVTVFB_IOCTL_GET_STATE _IOR('@', 1, struct ivtvfb_ioctl_state_info)
00203 #define IVTVFB_IOCTL_SET_STATE _IOW('@', 2, struct ivtvfb_ioctl_state_info)
00204 #define IVTVFB_IOCTL_PREP_FRAME _IOW('@', 3, struct ivtvfb_ioctl_dma_host_to_ivtv_args)
00205 #define IVTVFB_IOCTL_BLT_COPY _IOW('@', 4, struct ivtvfb_ioctl_blt_copy_args)
00206 #define IVTVFB_IOCTL_GET_ACTIVE_BUFFER _IOR('@', 5, struct ivtv_osd_coords)
00207 #define IVTVFB_IOCTL_SET_ACTIVE_BUFFER _IOW('@', 6, struct ivtv_osd_coords)
00208 #define IVTVFB_IOCTL_GET_FRAME_BUFFER _IOR('@', 7, struct ivtvfb_ioctl_get_frame_buffer)
00209 #define IVTVFB_IOCTL_BLT_FILL _IOW('@', 8, struct ivtvfb_ioctl_blt_fill_args)
00210 #define IVTVFB_IOCTL_PREP_FRAME_BUF _IOW('@', 9, struct ivtvfb_ioctl_dma_host_to_ivtv_args)
00211 #define IVTVFB_IOCTL_SET_WINDOW _IOW('@', 11, struct ivtvfb_ioctl_set_window)
00212 #define IVTVFB_IOCTL_GET_COLORKEY _IOW('@', 12, struct ivtvfb_ioctl_colorkey)
00213 #define IVTVFB_IOCTL_SET_COLORKEY _IOW('@', 13, struct ivtvfb_ioctl_colorkey)
00214
00215 #define IVTVFB_STATUS_ENABLED (1 << 0)
00216 #define IVTVFB_STATUS_GLOBAL_ALPHA (1 << 1)
00217 #define IVTVFB_STATUS_LOCAL_ALPHA (1 << 2)
00218 #define IVTVFB_STATUS_FLICKER_REDUCTION (1 << 3)
00219
00220
00221
00222
00223
00224 #define IVTV_IOC_G_CODEC _IOR ('@', 48, struct ivtv_ioctl_codec)
00225 #define IVTV_IOC_S_CODEC _IOW ('@', 49, struct ivtv_ioctl_codec)
00226
00227
00228 struct ivtv_ioctl_codec {
00229 __u32 aspect;
00230 __u32 audio_bitmask;
00231 __u32 bframes;
00232 __u32 bitrate_mode;
00233 __u32 bitrate;
00234 __u32 bitrate_peak;
00235 __u32 dnr_mode;
00236 __u32 dnr_spatial;
00237 __u32 dnr_temporal;
00238 __u32 dnr_type;
00239 __u32 framerate;
00240 __u32 framespergop;
00241 __u32 gop_closure;
00242 __u32 pulldown;
00243 __u32 stream_type;
00244 };
00245
00246
00247
00248
00249 #define IVTV_IOC_S_VBI_MODE _IOWR('@', 35, struct ivtv_sliced_vbi_format)
00250 #define IVTV_IOC_G_VBI_MODE _IOR ('@', 36, struct ivtv_sliced_vbi_format)
00251
00252
00253 #define IVTV_IOC_S_VBI_EMBED _IOW ('@', 54, int)
00254 #define IVTV_IOC_G_VBI_EMBED _IOR ('@', 55, int)
00255
00256
00257 struct ivtv_sliced_vbi_format {
00258 unsigned long service_set;
00259 unsigned long packet_size;
00260 unsigned long io_size;
00261 unsigned long reserved;
00262 };
00263
00264
00265 struct ivtv_sliced_data {
00266 unsigned long id;
00267 unsigned long line;
00268 unsigned char *data;
00269 };
00270
00271
00272
00273 #define VBI_TYPE_TELETEXT 0x1 // Teletext (uses lines 6-22 for PAL, 10-21 for NTSC)
00274 #define VBI_TYPE_CC 0x4 // Closed Captions (line 21 NTSC, line 22 PAL)
00275 #define VBI_TYPE_WSS 0x5 // Wide Screen Signal (line 20 NTSC, line 23 PAL)
00276 #define VBI_TYPE_VPS 0x7 // Video Programming System (PAL) (line 16)
00277
00278 #endif