Mercurial > mplayer.hg
annotate libvo/videodev_mjpeg.h @ 12001:a11f3d59353d
an almost complete re-translation of the last version of help_mp-en.h
Patch by Bogdan Butnaru <bogdanb@fastmail.fm>
author | gabucino |
---|---|
date | Fri, 27 Feb 2004 10:21:12 +0000 |
parents | 176046e35fb2 |
children | 6ac1ece1f9fe |
rev | line source |
---|---|
4669
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
1 /* These are the MJPEG API extensions for the Video4Linux API, |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
2 first introduced by the Iomega Buz driver by Rainer Johanni |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
3 <rainer@johanni.de> |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
4 */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
5 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
6 /* This is identical with the mgavideo internal params struct, |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
7 please tell me if you change this struct here ! <gz@lysator.liu.se) */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
8 struct mjpeg_params |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
9 { |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
10 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
11 /* The following parameters can only be queried */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
12 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
13 int major_version; /* Major version number of driver */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
14 int minor_version; /* Minor version number of driver */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
15 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
16 /* Main control parameters */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
17 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
18 int input; /* Input channel: 0 = Composite, 1 = S-VHS */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
19 int norm; /* Norm: VIDEO_MODE_PAL or VIDEO_MODE_NTSC */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
20 int decimation; /* decimation of captured video, |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
21 enlargement of video played back. |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
22 Valid values are 1, 2, 4 or 0. |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
23 0 is a special value where the user |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
24 has full control over video scaling */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
25 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
26 /* The following parameters only have to be set if decimation==0, |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
27 for other values of decimation they provide the data how the image is captured */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
28 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
29 int HorDcm; /* Horizontal decimation: 1, 2 or 4 */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
30 int VerDcm; /* Vertical decimation: 1 or 2 */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
31 int TmpDcm; /* Temporal decimation: 1 or 2, |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
32 if TmpDcm==2 in capture every second frame is dropped, |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
33 in playback every frame is played twice */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
34 int field_per_buff; /* Number of fields per buffer: 1 or 2 */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
35 int img_x; /* start of image in x direction */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
36 int img_y; /* start of image in y direction */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
37 int img_width; /* image width BEFORE decimation, |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
38 must be a multiple of HorDcm*16 */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
39 int img_height; /* image height BEFORE decimation, |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
40 must be a multiple of VerDcm*8 */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
41 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
42 /* --- End of parameters for decimation==0 only --- */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
43 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
44 /* JPEG control parameters */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
45 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
46 int quality; /* Measure for quality of compressed images. |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
47 Scales linearly with the size of the compressed images. |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
48 Must be beetween 0 and 100, 100 is a compression |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
49 ratio of 1:4 */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
50 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
51 int odd_even; /* Which field should come first ??? |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
52 This is more aptly named "top_first", |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
53 i.e. (odd_even==1) --> top-field-first */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
54 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
55 int APPn; /* Number of APP segment to be written, must be 0..15 */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
56 int APP_len; /* Length of data in JPEG APPn segment */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
57 char APP_data[60]; /* Data in the JPEG APPn segment. */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
58 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
59 int COM_len; /* Length of data in JPEG COM segment */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
60 char COM_data[60]; /* Data in JPEG COM segment */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
61 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
62 unsigned long jpeg_markers; /* Which markers should go into the JPEG output. |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
63 Unless you exactly know what you do, leave them untouched. |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
64 Inluding less markers will make the resulting code |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
65 smaller, but there will be fewer aplications |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
66 which can read it. |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
67 The presence of the APP and COM marker is |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
68 influenced by APP0_len and COM_len ONLY! */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
69 #define JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
70 #define JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
71 #define JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
72 #define JPEG_MARKER_COM (1<<6) /* Comment segment */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
73 #define JPEG_MARKER_APP (1<<7) /* App segment, driver will allways use APP0 */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
74 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
75 int VFIFO_FB; /* Flag for enabling Video Fifo Feedback. |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
76 If this flag is turned on and JPEG decompressing |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
77 is going to the screen, the decompress process |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
78 is stopped every time the Video Fifo is full. |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
79 This enables a smooth decompress to the screen |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
80 but the video output signal will get scrambled */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
81 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
82 /* Misc */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
83 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
84 char reserved[312]; /* Makes 512 bytes for this structure */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
85 }; |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
86 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
87 struct mjpeg_requestbuffers |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
88 { |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
89 unsigned long count; /* Number of buffers for MJPEG grabbing */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
90 unsigned long size; /* Size PER BUFFER in bytes */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
91 }; |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
92 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
93 struct mjpeg_sync |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
94 { |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
95 unsigned long frame; /* Frame (0 - n) for double buffer */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
96 unsigned long length; /* number of code bytes in buffer (capture only) */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
97 unsigned long seq; /* frame sequence number */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
98 struct timeval timestamp; /* timestamp */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
99 }; |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
100 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
101 struct mjpeg_status |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
102 { |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
103 int input; /* Input channel, has to be set prior to BUZIOC_G_STATUS */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
104 int signal; /* Returned: 1 if valid video signal detected */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
105 int norm; /* Returned: VIDEO_MODE_PAL or VIDEO_MODE_NTSC */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
106 int color; /* Returned: 1 if color signal detected */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
107 }; |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
108 |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
109 /* |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
110 Private IOCTL to set up for displaying MJPEG |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
111 */ |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
112 #define MJPIOC_G_PARAMS _IOR ('v', BASE_VIDIOCPRIVATE+0, struct mjpeg_params) |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
113 #define MJPIOC_S_PARAMS _IOWR('v', BASE_VIDIOCPRIVATE+1, struct mjpeg_params) |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
114 #define MJPIOC_REQBUFS _IOWR('v', BASE_VIDIOCPRIVATE+2, struct mjpeg_requestbuffers) |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
115 #define MJPIOC_QBUF_CAPT _IOW ('v', BASE_VIDIOCPRIVATE+3, int) |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
116 #define MJPIOC_QBUF_PLAY _IOW ('v', BASE_VIDIOCPRIVATE+4, int) |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
117 #define MJPIOC_SYNC _IOR ('v', BASE_VIDIOCPRIVATE+5, struct mjpeg_sync) |
176046e35fb2
this file obsoletes zoran.h and contains the Recommended interface definition for zr devices
rik
parents:
diff
changeset
|
118 #define MJPIOC_G_STATUS _IOWR('v', BASE_VIDIOCPRIVATE+6, struct mjpeg_status) |