]> git.vomp.tv Git - vompclient.git/blob - stb.h
Zero length recording segfault fixed
[vompclient.git] / stb.h
1 /*
2
3     This file is modified by Chris Tallon from the original stb.h
4     in libav, from the mvpmc project. libav is licensed under the
5     Lesser General Public License.
6
7     As per point 3 of the Lesser General Public License, I am
8     applying the General Public License to my copy of the library
9     and therefore to this file. The copyright notice below has been
10     changed accordingly.
11
12 */
13
14 /*
15     Copyright (C) 2004, BtB, Jon Gettler
16     http://mvpmc.sourceforge.net/
17
18     This file is free software; you can redistribute it and/or modify
19     it under the terms of the GNU General Public License as published by
20     the Free Software Foundation; either version 2 of the License, or
21     (at your option) any later version.
22
23     This file is distributed in the hope that it will be useful,
24     but WITHOUT ANY WARRANTY; without even the implied warranty of
25     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26     GNU General Public License for more details.
27
28     You should have received a copy of the GNU General Public License
29     along with This file; if not, write to the Free Software
30     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
31
32  */
33
34
35 #ifndef STB_H
36 #define STB_H
37
38 /*
39  * $Id$
40  *
41  * This describes the IBM STBx25xx/STBx30xxx hardware interface.
42  *
43  * Jon Gettler <gettler@acm.org>
44  */
45
46 #include <stdint.h>
47
48 typedef struct {
49   int arg;
50   int a;
51   int b;
52   int c;
53   int d;
54   int e;
55   int f;
56 } set_display_t;
57
58
59
60 typedef struct {
61   unsigned long handle1;
62   unsigned long x;
63   unsigned long y;
64   unsigned long w;
65   unsigned long h;
66   unsigned long handle2;
67   unsigned long x1;
68   unsigned long y1;
69   unsigned long w1;
70   unsigned long h1;
71   unsigned long colour1;
72 } osd_blend_t;
73
74 typedef struct {
75   unsigned long handle;
76   unsigned long x;
77   unsigned long y;
78   unsigned long w;
79   unsigned long h;
80   unsigned long colour1;
81   unsigned long colour2;
82   unsigned long colour3;
83   unsigned long colour4;
84   unsigned long colour5;
85   unsigned long colour6;
86   unsigned long colour7;
87   unsigned char c[2];
88 } osd_afillblt_t;
89
90 typedef struct {
91   unsigned long handle;
92   unsigned long left;
93   unsigned long top;
94   unsigned long right;
95   unsigned long bottom;
96 } osd_clip_rec_t;
97
98 /* OLD
99 typedef struct {
100   int w;
101   int h;
102   int scale;
103   int x1;
104   int y;
105   int x;
106   int y2;
107   int x3;
108   int y3;
109   int x4;
110   int y4;
111 } vid_pos_regs_t;
112 */
113
114 // NEW
115 typedef struct {
116   int y;
117   int x;
118   int w;
119   int h;
120 } vid_rect_t;
121
122 typedef struct {
123   vid_rect_t src;
124   vid_rect_t dest;
125 } vid_pos_regs_t;
126 //
127
128 typedef struct {
129   int stc_b32;
130   int stc_b0;
131   int pts_b32;
132   int pts_b0;
133 } pts_sync_data_t;
134
135 typedef struct {
136   int parm1;
137   int parm2;
138 } aud_sync_parms_t;
139
140 typedef struct {
141   int aud_ctl0;
142   int aud_ctl1;
143   int aud_ctl2;
144 } aud_ctl_regs_t;
145
146 typedef struct {
147   int denc0_cr1;
148   int denc1_cr1;
149   int dencmux;
150   int vid_disp_mode;
151 } vid_ctl_regs_t;
152
153 struct vid_regs {
154   unsigned char dummy[44];
155 };
156
157 typedef struct {
158   int nleft;
159   int state;
160 } vid_state_regs_t;
161
162 typedef struct {
163   uint64_t stc;
164   uint64_t pts;
165 } sync_data_t;
166
167
168 /*
169  * /dev/adec_mpeg
170  */
171 #define AV_SET_AUD_PLAY   _IOW('a',2,int)
172 #define AV_SET_AUD_PAUSE  _IOW('a',3,int)
173 #define AV_SET_AUD_UNPAUSE  _IOW('a',4,int)
174 #define AV_SET_AUD_SRC    _IOW('a',5,int)
175 #define AV_SET_AUD_MUTE   _IOW('a',6,int)
176 #define AV_SET_AUD_CHANNEL  _IOW('a',9,int)
177 #define AV_GET_AUD_INFO   _IOR('a',10,int)
178 #define AV_SET_AUD_VOLUME _IOW('a',13,int)
179 #define AV_GET_AUD_VOLUME _IOR('a',14,int)
180 #define AV_SET_AUD_STREAMTYPE _IOW('a',15,int)
181 #define AV_SET_AUD_FORMAT _IOW('a',16,int)
182 #define AV_GET_AUD_SYNC   _IOR('a',21,pts_sync_data_t*)
183 #define AV_SET_AUD_STC    _IOW('a',22,uint64_t *)
184 #define AV_SET_AUD_SYNC   _IOW('a',23,int)
185 #define AV_SET_AUD_DISABLE_SYNC _IOW('a',24,aud_sync_parms_t*)
186 #define AV_SET_AUD_RESET  _IOW('a',26,int)
187 #define AV_SET_AUD_DAC_CLK  _IOW('a',27,int)
188 #define AV_GET_AUD_REGS   _IOW('a',28,aud_ctl_regs_t*)
189
190 /*
191  * /dev/vdec_dev
192  */
193
194 // CJT
195 #define AV_SET_VID_STOP    _IOW('v', 21, int)
196
197
198 #define AV_SET_VID_PLAY   _IOW('v',22,int)
199 #define AV_SET_VID_FREEZE _IOW('v',23,int)
200 #define AV_SET_VID_RESUME _IOW('v',24,int)
201 #define AV_SET_VID_SRC    _IOW('v',25,int)
202 #define AV_SET_VID_FB   _IOW('v',26,int)
203 #define AV_GET_VID_STATE  _IOR('v',27,vid_state_regs_t*)
204 #define AV_SET_VID_PAUSE  _IOW('v',28,int)
205 #define AV_SET_VID_FFWD   _IOW('v',29,int)
206 #define AV_SET_VID_SLOMO  _IOW('v',30,int)
207 #define AV_SET_VID_BLANK  _IOW('v',32,int)
208 #define AV_SET_VID_POSITION _IOW('v',36,vid_pos_regs_t*)
209 #define AV_SET_VID_SCALE_ON _IOW('v',37,int)
210 #define AV_SET_VID_SCALE_OFF  _IOW('v',38,int)
211 #define AV_GET_VID_SYNC   _IOR('v',39,int)
212 #define AV_SET_VID_STC    _IOW('v',40,uint64_t *)
213 #define AV_SET_VID_RATIO  _IOW('v',41,int)
214 #define AV_SET_VID_SYNC   _IOW('v',42,int)
215 #define AV_SET_VID_DISABLE_SYNC _IOW('v',43,int)
216 #define AV_SET_VID_DISP_FMT _IOW('v',45,int)
217 #define AV_SET_VID_RESET  _IOW('v',51,int)
218 #define AV_SET_VID_OUTPUT _IOW('v',57,int)
219 #define AV_SET_VID_MODE   _IOW('v',58,int)
220 #define AV_GET_VID_REGS   _IOR('v',61,struct vid_regs*)
221 #define AV_SET_VID_COLORBAR _IOW('v',62,int)
222 #define AV_SET_VID_DENC   _IOW('v',63,int)
223 #define AV_CHK_SCART    _IOW('v',64,int)
224
225 /*
226  * screen device
227  */
228 #define AV_GET_VID_INFO   _IOR('s',44,int)
229
230 /*
231  * /dev/rawir
232  */
233 #define IR_SET_LED    _IOW('i',21,int)
234
235
236 #endif /* STB_H */