File: xvideo.proto

package info (click to toggle)
xtrace 1.4.0-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 900 kB
  • sloc: ansic: 5,808; sh: 1,241; makefile: 65
file content (398 lines) | stat: -rw-r--r-- 8,267 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
# This file is part of xtrace.
# Copyright (C) 2006 Bernhard R. Link
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
# 
# This file is based on /usr/include/X11/extensions/Xvproto.h which states:
# Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
# and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
# 
#                         All Rights Reserved
# 
# Permission to use, copy, modify, and distribute this software and its 
# documentation for any purpose and without fee is hereby granted, 
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in 
# supporting documentation, and that the names of Digital or MIT not be
# used in advertising or publicity pertaining to distribution of the
# software without specific, written prior permission.  
# 
# DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
# DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
#
# and on /usr/share/xcb/xv.xml, which states:
# Copyright (C) 2006 Jeremy Kolb.
# All Rights Reserved.
# 
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# 
# Except as contained in this notice, the names of the authors or their
# institutions shall not be used in advertising or otherwise to promote the
# sale, use or other dealings in this Software without prior written
# authorization from the authors.

EXTENSION "XVideo" XV
USE core

REQUESTS
QueryExtension RESPONDS /* 0 */
QueryAdaptors RESPONDS
QueryEncodings RESPONDS
GrabPort RESPONDS
UngrabPort
PutVideo
PutStill
GetVideo
GetStill
StopVideo
SelectVideoNotify /* 10 */
SelectPortNotify
QueryBestSize RESPONDS
SetPortAttribute
GetPortAttribute RESPONDS
QueryPortAttributes RESPONDS
ListImageFormats RESPONDS
QueryImageAttributes RESPONDS
PutImage
ShmPutImage
END

EVENTS
VideoNotify
PortNotify
END

ERRORS
BadPort
BadEncoding
BadMode
END

TYPE PORT	UINT32
TYPE ENCODING UINT32

BITMASK xvtype
1<<0	Input
1<<1	Output
1<<2	Video
1<<3	Still
1<<4	Image
END

CONSTANTS ImageFormatInfoType
 0	RGB
 1	YUV
END

CONSTANTS ImageFormatInfoFormat
 0	Packed
 1	Planar
END

BITMASK attribute_flag
 1	Gettable
 2	Settable
END

CONSTANTS video_notify_reason
 0	Started
 1	Stopped
 2	Busy
 3	Preempted
 4	HardError
END

CONSTANTS scanline_order
 0	TopToBottom
 1	BottomToTop
END

CONSTANTS grab_port_status
 0	Success
 1	BadExtension
 2	AlreadyGrabbed
 3	InvalidTime
 4	BadReply
 5	BadAlloc
END

STRUCT Rational length 8
0	numerator	INT32
4	denominator	INT32
END

LIST XVFormat length 8
 0	visual	VISUALID
 4	depth	UINT8
END

LIST AdaptorInfo variable min-length 12
 0	base_id	PORT
 6	num_ports	UINT16
10	type	BITMASK8 xvtype
 4	name_size	COUNT16
12	name	STRING8
ROUND
 8	num_formats	COUNT16
LATER	formats	LISTofXVFormat
END

LIST EncodingInfo variable min-length 20
 0	encoding	ENCODING
 4	name_size	COUNT16
 6	width	UINT16
 8	height	UINT16
12	rate	Rational
20	name	STRING8
ROUND
END

LIST AttributeInfo variable min-length 16
 0	flags	BITMASK32 attribute_flag
 4	min	INT32
 8	max	INT32
12	size	COUNT32
16	name	STRING8
ROUND
END

LIST ImageFormatInfo length 128
 0	id	CARD32
 4	type	ENUM8 ImageFormatInfoType
 5	byte_order	CARD8
SET_COUNTER 16
 8	guid	STRING8
24	bpp	UINT8
25	num_planes	UINT8
28	depth	UINT8
32	red_mask	CARD32
36	green_mask	CARD32
40	blue_mask	CARD32
44	format	ENUM8 ImageFormatInfoFormat
48	y_sample_bits	CARD32
52	u_sample_bits	CARD32
56	v_sample_bits	CARD32
60	vhorz_y_period	CARD32
64	vhorz_u_period	CARD32
68	vhorz_v_period	CARD32
72	vvert_y_period	CARD32
76	vvert_u_period	CARD32
80	vvert_v_period	CARD32
SET_COUNTER 32
84	vcomp_order	LISTofCARD8
116	vscanline_order	ENUM8 scanline_order
END

REQUEST QueryExtension
END
RESPONSE QueryExtension
 8	major	UINT16
10	minor	UINT16
END

REQUEST QueryAdaptors
 4	window	WINDOW
END
RESPONSE QueryAdaptors
 8	num_adaptors	COUNT16
32	adaptors	LISTofAdaptorInfo
END

REQUEST QueryEncodings
 4	port	PORT
END
RESPONSE QueryEncodings
 8	num_encodings	COUNT16
32	encodings	LISTofEncodingInfo
END

REQUEST GrabPort
 4	port	PORT
 8	time	TIMESTAMP
END
RESPONSE GrabPort
 1	result	ENUM8 grab_port_status
END

REQUEST UngrabPort
 4	port	PORT
 8	time	TIMESTAMP
END

templateREQUEST Put
 4	port	PORT
 8	drawable	DRAWABLE
12	gc	GCONTEXT
16	vid_x	INT16
18	vid_y	INT16
20	vid_w	UINT16
22	vid_h	UINT16
24	drw_x	INT16
26	drw_y	INT16
28	drw_w	UINT16
30	drw_h	UINT16
END

REQUEST PutVideo ALIASES Put
REQUEST PutStill ALIASES Put
REQUEST GetVideo ALIASES Put
REQUEST GetStill ALIASES Put

REQUEST StopVideo
 4	port	PORT
 8	drawable	DRAWABLE
END

REQUEST SelectVideoNotify
 4	drawable	DRAWABLE
 8	onoff	BOOL
END

REQUEST SelectPortNotify
 4	port	PORT
 8	onoff	BOOL
END

REQUEST QueryBestSize
 4	port	PORT
 8	vid_w	UINT16
10	vid_h	UINT16
12	drw_w	UINT16
14	drw_h	UINT16
16	motion	BOOL
END
RESPONSE QueryBestSize
 8	actual_width	UINT16
10	actual_height	UINT16
END

REQUEST SetPortAttribute
 4	port	PORT
 8	attribute	ATOM
12	value	INT32
END

REQUEST GetPortAttribute
 4	port	PORT
 8	attribute	ATOM
END
RESPONSE GetPortAttribute
 8	value	INT32
END

REQUEST QueryPortAttributes
 4	port	PORT
END
RESPONSE QueryPortAttributes
 8	num_attributes	COUNT32
12	text_size	UINT32
32	attributes	LISTofAttributeInfo
END

REQUEST ListImageFormats
 4	port	PORT
END
RESPONSE ListImageFormats
 8	num_formats	COUNT32
32	format	LISTofImageFormatInfo
END

REQUEST QueryImageAttributes
 4	port	PORT
 8	id	CARD32
12	width	UINT16
14	height	UINT16
END
RESPONSE QueryImageAttributes
12	data_size	UINT32
16	width	UINT16
18	height	UINT16
 8	num_planes	COUNT32
32	pitches	LISTofUINT32
RESET_COUNTER
LATER	offsets	LISTofUINT32
END

REQUEST PutImage
 4	port	PORT
 8	drawable	DRAWABLE
12	gc	GCONTEXT
16	id	CARD32
20	src_x	INT16
22	src_y	INT16
24	src_w	UINT16
26	src_h	UINT16
28	drw_x	INT16
30	drw_y	INT16
32	drw_w	UINT16
34	drw_h	UINT16
36	width	UINT16
38	height	UINT16
40	data	LISTofCARD8
END

REQUEST ShmPutImage
 4	port	PORT
 8	drawable	DRAWABLE
12	gc	GCONTEXT
16	shmseg	Shm::ShmSeg
20	id	CARD32
24	offset	UINT32
28	src_x	INT16
30	src_y	INT16
32	src_w	UINT16
34	src_h	UINT16
36	drw_x	INT16
38	drw_y	INT16
40	drw_w	UINT16
42	drw_h	UINT16
44	width	UINT16
46	height	UINT16
48	send_event	BOOL
END

EVENT VideoNotify
 1	reason	ENUM8 video_notify_reason
 4	timestamp	TIMESTAMP
 8	drawable	DRAWABLE
12	port	PORT
END

EVENT PortNotify
 4	timestamp	TIMESTAMP
 8	port	PORT
12	attribute	ATOM
16	value	INT32
END

EOF