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