• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 //! This file was generated by the following commands and modified manually.
6 //!
7 //! ```shell
8 //! $ bindgen virtio_video.h              \
9 //!     --whitelist-type "virtio_video.*" \
10 //!     --whitelist-var "VIRTIO_VIDEO_.*" \
11 //!     --with-derive-default            \
12 //!     --no-layout-tests                \
13 //!     --no-prepend-enum-name > protocol.rs
14 //! $ sed -i "s/__u/u/g" protocol.rs
15 //! $ sed -i "s/__le/Le/g" protocol.rs
16 //! ```
17 //!
18 //! The main points of the manual modifications are as follows:
19 //! * Removed `hdr` from each command struct so that we can read the header and a command body separately.
20 //!   (cf. [related discussion](https://markmail.org/message/tr5g6axqq2zzq64y))
21 //! * Added implementations of DataInit for each struct.
22 
23 #![allow(dead_code, non_snake_case, non_camel_case_types)]
24 
25 use data_model::{DataInit, Le32, Le64};
26 
27 pub const VIRTIO_VIDEO_F_RESOURCE_GUEST_PAGES: u32 = 0;
28 pub const VIRTIO_VIDEO_F_RESOURCE_NON_CONTIG: u32 = 1;
29 pub const VIRTIO_VIDEO_F_RESOURCE_VIRTIO_OBJECT: u32 = 2;
30 pub const VIRTIO_VIDEO_MAX_PLANES: u32 = 8;
31 pub const VIRTIO_VIDEO_FORMAT_RAW_MIN: virtio_video_format = 1;
32 pub const VIRTIO_VIDEO_FORMAT_ARGB8888: virtio_video_format = 1;
33 pub const VIRTIO_VIDEO_FORMAT_BGRA8888: virtio_video_format = 2;
34 pub const VIRTIO_VIDEO_FORMAT_NV12: virtio_video_format = 3;
35 pub const VIRTIO_VIDEO_FORMAT_YUV420: virtio_video_format = 4;
36 pub const VIRTIO_VIDEO_FORMAT_YVU420: virtio_video_format = 5;
37 pub const VIRTIO_VIDEO_FORMAT_RAW_MAX: virtio_video_format = 5;
38 pub const VIRTIO_VIDEO_FORMAT_CODED_MIN: virtio_video_format = 4096;
39 pub const VIRTIO_VIDEO_FORMAT_MPEG2: virtio_video_format = 4096;
40 pub const VIRTIO_VIDEO_FORMAT_MPEG4: virtio_video_format = 4097;
41 pub const VIRTIO_VIDEO_FORMAT_H264: virtio_video_format = 4098;
42 pub const VIRTIO_VIDEO_FORMAT_HEVC: virtio_video_format = 4099;
43 pub const VIRTIO_VIDEO_FORMAT_VP8: virtio_video_format = 4100;
44 pub const VIRTIO_VIDEO_FORMAT_VP9: virtio_video_format = 4101;
45 pub const VIRTIO_VIDEO_FORMAT_CODED_MAX: virtio_video_format = 4101;
46 pub type virtio_video_format = u32;
47 pub const VIRTIO_VIDEO_PROFILE_H264_MIN: virtio_video_profile = 256;
48 pub const VIRTIO_VIDEO_PROFILE_H264_BASELINE: virtio_video_profile = 256;
49 pub const VIRTIO_VIDEO_PROFILE_H264_MAIN: virtio_video_profile = 257;
50 pub const VIRTIO_VIDEO_PROFILE_H264_EXTENDED: virtio_video_profile = 258;
51 pub const VIRTIO_VIDEO_PROFILE_H264_HIGH: virtio_video_profile = 259;
52 pub const VIRTIO_VIDEO_PROFILE_H264_HIGH10PROFILE: virtio_video_profile = 260;
53 pub const VIRTIO_VIDEO_PROFILE_H264_HIGH422PROFILE: virtio_video_profile = 261;
54 pub const VIRTIO_VIDEO_PROFILE_H264_HIGH444PREDICTIVEPROFILE: virtio_video_profile = 262;
55 pub const VIRTIO_VIDEO_PROFILE_H264_SCALABLEBASELINE: virtio_video_profile = 263;
56 pub const VIRTIO_VIDEO_PROFILE_H264_SCALABLEHIGH: virtio_video_profile = 264;
57 pub const VIRTIO_VIDEO_PROFILE_H264_STEREOHIGH: virtio_video_profile = 265;
58 pub const VIRTIO_VIDEO_PROFILE_H264_MULTIVIEWHIGH: virtio_video_profile = 266;
59 pub const VIRTIO_VIDEO_PROFILE_H264_MAX: virtio_video_profile = 266;
60 pub const VIRTIO_VIDEO_PROFILE_HEVC_MIN: virtio_video_profile = 512;
61 pub const VIRTIO_VIDEO_PROFILE_HEVC_MAIN: virtio_video_profile = 512;
62 pub const VIRTIO_VIDEO_PROFILE_HEVC_MAIN10: virtio_video_profile = 513;
63 pub const VIRTIO_VIDEO_PROFILE_HEVC_MAIN_STILL_PICTURE: virtio_video_profile = 514;
64 pub const VIRTIO_VIDEO_PROFILE_HEVC_MAX: virtio_video_profile = 514;
65 pub const VIRTIO_VIDEO_PROFILE_VP8_MIN: virtio_video_profile = 768;
66 pub const VIRTIO_VIDEO_PROFILE_VP8_PROFILE0: virtio_video_profile = 768;
67 pub const VIRTIO_VIDEO_PROFILE_VP8_PROFILE1: virtio_video_profile = 769;
68 pub const VIRTIO_VIDEO_PROFILE_VP8_PROFILE2: virtio_video_profile = 770;
69 pub const VIRTIO_VIDEO_PROFILE_VP8_PROFILE3: virtio_video_profile = 771;
70 pub const VIRTIO_VIDEO_PROFILE_VP8_MAX: virtio_video_profile = 771;
71 pub const VIRTIO_VIDEO_PROFILE_VP9_MIN: virtio_video_profile = 1024;
72 pub const VIRTIO_VIDEO_PROFILE_VP9_PROFILE0: virtio_video_profile = 1024;
73 pub const VIRTIO_VIDEO_PROFILE_VP9_PROFILE1: virtio_video_profile = 1025;
74 pub const VIRTIO_VIDEO_PROFILE_VP9_PROFILE2: virtio_video_profile = 1026;
75 pub const VIRTIO_VIDEO_PROFILE_VP9_PROFILE3: virtio_video_profile = 1027;
76 pub const VIRTIO_VIDEO_PROFILE_VP9_MAX: virtio_video_profile = 1027;
77 pub type virtio_video_profile = u32;
78 pub const VIRTIO_VIDEO_LEVEL_H264_MIN: virtio_video_level = 256;
79 pub const VIRTIO_VIDEO_LEVEL_H264_1_0: virtio_video_level = 256;
80 pub const VIRTIO_VIDEO_LEVEL_H264_1_1: virtio_video_level = 257;
81 pub const VIRTIO_VIDEO_LEVEL_H264_1_2: virtio_video_level = 258;
82 pub const VIRTIO_VIDEO_LEVEL_H264_1_3: virtio_video_level = 259;
83 pub const VIRTIO_VIDEO_LEVEL_H264_2_0: virtio_video_level = 260;
84 pub const VIRTIO_VIDEO_LEVEL_H264_2_1: virtio_video_level = 261;
85 pub const VIRTIO_VIDEO_LEVEL_H264_2_2: virtio_video_level = 262;
86 pub const VIRTIO_VIDEO_LEVEL_H264_3_0: virtio_video_level = 263;
87 pub const VIRTIO_VIDEO_LEVEL_H264_3_1: virtio_video_level = 264;
88 pub const VIRTIO_VIDEO_LEVEL_H264_3_2: virtio_video_level = 265;
89 pub const VIRTIO_VIDEO_LEVEL_H264_4_0: virtio_video_level = 266;
90 pub const VIRTIO_VIDEO_LEVEL_H264_4_1: virtio_video_level = 267;
91 pub const VIRTIO_VIDEO_LEVEL_H264_4_2: virtio_video_level = 268;
92 pub const VIRTIO_VIDEO_LEVEL_H264_5_0: virtio_video_level = 269;
93 pub const VIRTIO_VIDEO_LEVEL_H264_5_1: virtio_video_level = 270;
94 pub const VIRTIO_VIDEO_LEVEL_H264_MAX: virtio_video_level = 270;
95 pub type virtio_video_level = u32;
96 #[repr(C)]
97 #[derive(Debug, Default, Copy, Clone)]
98 pub struct virtio_video_config {
99     pub version: Le32,
100     pub max_caps_length: Le32,
101     pub max_resp_length: Le32,
102 }
103 // Safe because auto-generated structs have no implicit padding.
104 unsafe impl DataInit for virtio_video_config {}
105 
106 pub const VIRTIO_VIDEO_CMD_QUERY_CAPABILITY: virtio_video_cmd_type = 256;
107 pub const VIRTIO_VIDEO_CMD_STREAM_CREATE: virtio_video_cmd_type = 257;
108 pub const VIRTIO_VIDEO_CMD_STREAM_DESTROY: virtio_video_cmd_type = 258;
109 pub const VIRTIO_VIDEO_CMD_STREAM_DRAIN: virtio_video_cmd_type = 259;
110 pub const VIRTIO_VIDEO_CMD_RESOURCE_CREATE: virtio_video_cmd_type = 260;
111 pub const VIRTIO_VIDEO_CMD_RESOURCE_QUEUE: virtio_video_cmd_type = 261;
112 pub const VIRTIO_VIDEO_CMD_RESOURCE_DESTROY_ALL: virtio_video_cmd_type = 262;
113 pub const VIRTIO_VIDEO_CMD_QUEUE_CLEAR: virtio_video_cmd_type = 263;
114 pub const VIRTIO_VIDEO_CMD_GET_PARAMS: virtio_video_cmd_type = 264;
115 pub const VIRTIO_VIDEO_CMD_SET_PARAMS: virtio_video_cmd_type = 265;
116 pub const VIRTIO_VIDEO_CMD_QUERY_CONTROL: virtio_video_cmd_type = 266;
117 pub const VIRTIO_VIDEO_CMD_GET_CONTROL: virtio_video_cmd_type = 267;
118 pub const VIRTIO_VIDEO_CMD_SET_CONTROL: virtio_video_cmd_type = 268;
119 pub const VIRTIO_VIDEO_RESP_OK_NODATA: virtio_video_cmd_type = 512;
120 pub const VIRTIO_VIDEO_RESP_OK_QUERY_CAPABILITY: virtio_video_cmd_type = 513;
121 pub const VIRTIO_VIDEO_RESP_OK_RESOURCE_QUEUE: virtio_video_cmd_type = 514;
122 pub const VIRTIO_VIDEO_RESP_OK_GET_PARAMS: virtio_video_cmd_type = 515;
123 pub const VIRTIO_VIDEO_RESP_OK_QUERY_CONTROL: virtio_video_cmd_type = 516;
124 pub const VIRTIO_VIDEO_RESP_OK_GET_CONTROL: virtio_video_cmd_type = 517;
125 pub const VIRTIO_VIDEO_RESP_ERR_INVALID_OPERATION: virtio_video_cmd_type = 768;
126 pub const VIRTIO_VIDEO_RESP_ERR_OUT_OF_MEMORY: virtio_video_cmd_type = 769;
127 pub const VIRTIO_VIDEO_RESP_ERR_INVALID_STREAM_ID: virtio_video_cmd_type = 770;
128 pub const VIRTIO_VIDEO_RESP_ERR_INVALID_RESOURCE_ID: virtio_video_cmd_type = 771;
129 pub const VIRTIO_VIDEO_RESP_ERR_INVALID_PARAMETER: virtio_video_cmd_type = 772;
130 pub const VIRTIO_VIDEO_RESP_ERR_UNSUPPORTED_CONTROL: virtio_video_cmd_type = 773;
131 pub type virtio_video_cmd_type = u32;
132 #[repr(C)]
133 #[derive(Debug, Default, Copy, Clone)]
134 pub struct virtio_video_cmd_hdr {
135     pub type_: Le32,
136     pub stream_id: Le32,
137 }
138 // Safe because auto-generated structs have no implicit padding.
139 unsafe impl DataInit for virtio_video_cmd_hdr {}
140 
141 pub const VIRTIO_VIDEO_QUEUE_TYPE_INPUT: virtio_video_queue_type = 256;
142 pub const VIRTIO_VIDEO_QUEUE_TYPE_OUTPUT: virtio_video_queue_type = 257;
143 pub type virtio_video_queue_type = u32;
144 #[repr(C)]
145 #[derive(Debug, Default, Copy, Clone)]
146 pub struct virtio_video_query_capability {
147     pub queue_type: Le32,
148     pub padding: [u8; 4usize],
149 }
150 // Safe because auto-generated structs have no implicit padding.
151 unsafe impl DataInit for virtio_video_query_capability {}
152 
153 pub const VIRTIO_VIDEO_PLANES_LAYOUT_SINGLE_BUFFER: virtio_video_planes_layout_flag = 1;
154 pub const VIRTIO_VIDEO_PLANES_LAYOUT_PER_PLANE: virtio_video_planes_layout_flag = 2;
155 pub type virtio_video_planes_layout_flag = u32;
156 #[repr(C)]
157 #[derive(Debug, Default, Copy, Clone)]
158 pub struct virtio_video_format_range {
159     pub min: Le32,
160     pub max: Le32,
161     pub step: Le32,
162     pub padding: [u8; 4usize],
163 }
164 // Safe because auto-generated structs have no implicit padding.
165 unsafe impl DataInit for virtio_video_format_range {}
166 
167 #[repr(C)]
168 #[derive(Debug, Default, Copy, Clone)]
169 pub struct virtio_video_format_frame {
170     pub width: virtio_video_format_range,
171     pub height: virtio_video_format_range,
172     pub num_rates: Le32,
173     pub padding: [u8; 4usize],
174 }
175 // Safe because auto-generated structs have no implicit padding.
176 unsafe impl DataInit for virtio_video_format_frame {}
177 
178 #[repr(C)]
179 #[derive(Debug, Default, Copy, Clone)]
180 pub struct virtio_video_format_desc {
181     pub mask: Le64,
182     pub format: Le32,
183     pub planes_layout: Le32,
184     pub plane_align: Le32,
185     pub num_frames: Le32,
186 }
187 // Safe because auto-generated structs have no implicit padding.
188 unsafe impl DataInit for virtio_video_format_desc {}
189 
190 #[repr(C)]
191 #[derive(Debug, Default, Copy, Clone)]
192 pub struct virtio_video_query_capability_resp {
193     pub hdr: virtio_video_cmd_hdr,
194     pub num_descs: Le32,
195     pub padding: [u8; 4usize],
196 }
197 // Safe because auto-generated structs have no implicit padding.
198 unsafe impl DataInit for virtio_video_query_capability_resp {}
199 
200 pub const VIRTIO_VIDEO_MEM_TYPE_GUEST_PAGES: virtio_video_mem_type = 0;
201 pub const VIRTIO_VIDEO_MEM_TYPE_VIRTIO_OBJECT: virtio_video_mem_type = 1;
202 pub type virtio_video_mem_type = u32;
203 #[repr(C)]
204 #[derive(Copy, Clone)]
205 pub struct virtio_video_stream_create {
206     pub in_mem_type: Le32,
207     pub out_mem_type: Le32,
208     pub coded_format: Le32,
209     pub padding: [u8; 4usize],
210     pub tag: [u8; 64usize],
211 }
212 impl Default for virtio_video_stream_create {
default() -> Self213     fn default() -> Self {
214         unsafe { ::std::mem::zeroed() }
215     }
216 }
217 // Safe because auto-generated structs have no implicit padding.
218 unsafe impl DataInit for virtio_video_stream_create {}
219 
220 #[repr(C)]
221 #[derive(Debug, Default, Copy, Clone)]
222 pub struct virtio_video_stream_destroy {}
223 // Safe because auto-generated structs have no implicit padding.
224 unsafe impl DataInit for virtio_video_stream_destroy {}
225 
226 #[repr(C)]
227 #[derive(Debug, Default, Copy, Clone)]
228 pub struct virtio_video_stream_drain {}
229 // Safe because auto-generated structs have no implicit padding.
230 unsafe impl DataInit for virtio_video_stream_drain {}
231 
232 #[repr(C)]
233 #[derive(Debug, Default, Copy, Clone)]
234 pub struct virtio_video_mem_entry {
235     pub addr: Le64,
236     pub length: Le32,
237     pub padding: [u8; 4usize],
238 }
239 #[repr(C)]
240 #[derive(Debug, Default, Copy, Clone)]
241 pub struct virtio_video_object_entry {
242     pub uuid: [u8; 16usize],
243 }
244 // Safe because auto-generated structs have no implicit padding.
245 unsafe impl DataInit for virtio_video_object_entry {}
246 
247 #[repr(C)]
248 #[derive(Debug, Default, Copy, Clone)]
249 pub struct virtio_video_resource_create {
250     pub queue_type: Le32,
251     pub resource_id: Le32,
252     pub planes_layout: Le32,
253     pub num_planes: Le32,
254     pub plane_offsets: [Le32; 8usize],
255     pub num_entries: [Le32; 8usize],
256 }
257 // Safe because auto-generated structs have no implicit padding.
258 unsafe impl DataInit for virtio_video_resource_create {}
259 
260 #[repr(C)]
261 #[derive(Debug, Default, Copy, Clone)]
262 pub struct virtio_video_resource_queue {
263     pub queue_type: Le32,
264     pub resource_id: Le32,
265     pub timestamp: Le64,
266     pub num_data_sizes: Le32,
267     pub data_sizes: [Le32; 8usize],
268     pub padding: [u8; 4usize],
269 }
270 // Safe because auto-generated structs have no implicit padding.
271 unsafe impl DataInit for virtio_video_resource_queue {}
272 
273 pub const VIRTIO_VIDEO_BUFFER_FLAG_ERR: virtio_video_buffer_flag = 1;
274 pub const VIRTIO_VIDEO_BUFFER_FLAG_EOS: virtio_video_buffer_flag = 2;
275 pub const VIRTIO_VIDEO_BUFFER_FLAG_IFRAME: virtio_video_buffer_flag = 4;
276 pub const VIRTIO_VIDEO_BUFFER_FLAG_PFRAME: virtio_video_buffer_flag = 8;
277 pub const VIRTIO_VIDEO_BUFFER_FLAG_BFRAME: virtio_video_buffer_flag = 16;
278 pub type virtio_video_buffer_flag = u32;
279 #[repr(C)]
280 #[derive(Debug, Default, Copy, Clone)]
281 pub struct virtio_video_resource_queue_resp {
282     pub hdr: virtio_video_cmd_hdr,
283     pub timestamp: Le64,
284     pub flags: Le32,
285     pub size: Le32,
286 }
287 // Safe because auto-generated structs have no implicit padding.
288 unsafe impl DataInit for virtio_video_resource_queue_resp {}
289 
290 #[repr(C)]
291 #[derive(Debug, Default, Copy, Clone)]
292 pub struct virtio_video_resource_destroy_all {
293     pub queue_type: Le32,
294     pub padding: [u8; 4usize],
295 }
296 // Safe because auto-generated structs have no implicit padding.
297 unsafe impl DataInit for virtio_video_resource_destroy_all {}
298 
299 #[repr(C)]
300 #[derive(Debug, Default, Copy, Clone)]
301 pub struct virtio_video_queue_clear {
302     pub queue_type: Le32,
303     pub padding: [u8; 4usize],
304 }
305 // Safe because auto-generated structs have no implicit padding.
306 unsafe impl DataInit for virtio_video_queue_clear {}
307 
308 #[repr(C)]
309 #[derive(Debug, Default, Copy, Clone)]
310 pub struct virtio_video_plane_format {
311     pub plane_size: Le32,
312     pub stride: Le32,
313 }
314 #[repr(C)]
315 #[derive(Debug, Default, Copy, Clone)]
316 pub struct virtio_video_crop {
317     pub left: Le32,
318     pub top: Le32,
319     pub width: Le32,
320     pub height: Le32,
321 }
322 #[repr(C)]
323 #[derive(Debug, Default, Copy, Clone)]
324 pub struct virtio_video_params {
325     pub queue_type: Le32,
326     pub format: Le32,
327     pub frame_width: Le32,
328     pub frame_height: Le32,
329     pub min_buffers: Le32,
330     pub max_buffers: Le32,
331     pub crop: virtio_video_crop,
332     pub frame_rate: Le32,
333     pub num_planes: Le32,
334     pub plane_formats: [virtio_video_plane_format; 8usize],
335 }
336 #[repr(C)]
337 #[derive(Debug, Default, Copy, Clone)]
338 pub struct virtio_video_get_params {
339     pub queue_type: Le32,
340     pub padding: [u8; 4usize],
341 }
342 // Safe because auto-generated structs have no implicit padding.
343 unsafe impl DataInit for virtio_video_get_params {}
344 
345 #[repr(C)]
346 #[derive(Debug, Default, Copy, Clone)]
347 pub struct virtio_video_get_params_resp {
348     pub hdr: virtio_video_cmd_hdr,
349     pub params: virtio_video_params,
350 }
351 // Safe because auto-generated structs have no implicit padding.
352 unsafe impl DataInit for virtio_video_get_params_resp {}
353 
354 #[repr(C)]
355 #[derive(Debug, Default, Copy, Clone)]
356 pub struct virtio_video_set_params {
357     pub params: virtio_video_params,
358 }
359 // Safe because auto-generated structs have no implicit padding.
360 unsafe impl DataInit for virtio_video_set_params {}
361 
362 pub const VIRTIO_VIDEO_CONTROL_BITRATE: virtio_video_control_type = 1;
363 pub const VIRTIO_VIDEO_CONTROL_PROFILE: virtio_video_control_type = 2;
364 pub const VIRTIO_VIDEO_CONTROL_LEVEL: virtio_video_control_type = 3;
365 pub const VIRTIO_VIDEO_CONTROL_FORCE_KEYFRAME: virtio_video_control_type = 4;
366 pub type virtio_video_control_type = u32;
367 #[repr(C)]
368 #[derive(Debug, Default, Copy, Clone)]
369 pub struct virtio_video_query_control_profile {
370     pub format: Le32,
371     pub padding: [u8; 4usize],
372 }
373 // Safe because auto-generated structs have no implicit padding.
374 unsafe impl DataInit for virtio_video_query_control_profile {}
375 
376 #[repr(C)]
377 #[derive(Debug, Default, Copy, Clone)]
378 pub struct virtio_video_query_control_level {
379     pub format: Le32,
380     pub padding: [u8; 4usize],
381 }
382 // Safe because auto-generated structs have no implicit padding.
383 unsafe impl DataInit for virtio_video_query_control_level {}
384 
385 #[repr(C)]
386 #[derive(Debug, Default, Copy, Clone)]
387 pub struct virtio_video_query_control {
388     pub control: Le32,
389     pub padding: [u8; 4usize],
390 }
391 // Safe because auto-generated structs have no implicit padding.
392 unsafe impl DataInit for virtio_video_query_control {}
393 
394 #[repr(C)]
395 #[derive(Debug, Default, Copy, Clone)]
396 pub struct virtio_video_query_control_resp_profile {
397     pub num: Le32,
398     pub padding: [u8; 4usize],
399 }
400 // Safe because auto-generated structs have no implicit padding.
401 unsafe impl DataInit for virtio_video_query_control_resp_profile {}
402 
403 #[repr(C)]
404 #[derive(Debug, Default, Copy, Clone)]
405 pub struct virtio_video_query_control_resp_level {
406     pub num: Le32,
407     pub padding: [u8; 4usize],
408 }
409 // Safe because auto-generated structs have no implicit padding.
410 unsafe impl DataInit for virtio_video_query_control_resp_level {}
411 
412 #[repr(C)]
413 #[derive(Debug, Default, Copy, Clone)]
414 pub struct virtio_video_query_control_resp {
415     pub hdr: virtio_video_cmd_hdr,
416 }
417 // Safe because auto-generated structs have no implicit padding.
418 unsafe impl DataInit for virtio_video_query_control_resp {}
419 
420 #[repr(C)]
421 #[derive(Debug, Default, Copy, Clone)]
422 pub struct virtio_video_get_control {
423     pub control: Le32,
424     pub padding: [u8; 4usize],
425 }
426 // Safe because auto-generated structs have no implicit padding.
427 unsafe impl DataInit for virtio_video_get_control {}
428 
429 #[repr(C)]
430 #[derive(Debug, Default, Copy, Clone)]
431 pub struct virtio_video_control_val_bitrate {
432     pub bitrate: Le32,
433     pub padding: [u8; 4usize],
434 }
435 // Safe because auto-generated structs have no implicit padding.
436 unsafe impl DataInit for virtio_video_control_val_bitrate {}
437 
438 #[repr(C)]
439 #[derive(Debug, Default, Copy, Clone)]
440 pub struct virtio_video_control_val_profile {
441     pub profile: Le32,
442     pub padding: [u8; 4usize],
443 }
444 // Safe because auto-generated structs have no implicit padding.
445 unsafe impl DataInit for virtio_video_control_val_profile {}
446 
447 #[repr(C)]
448 #[derive(Debug, Default, Copy, Clone)]
449 pub struct virtio_video_control_val_level {
450     pub level: Le32,
451     pub padding: [u8; 4usize],
452 }
453 // Safe because auto-generated structs have no implicit padding.
454 unsafe impl DataInit for virtio_video_control_val_level {}
455 
456 #[repr(C)]
457 #[derive(Debug, Default, Copy, Clone)]
458 pub struct virtio_video_get_control_resp {
459     pub hdr: virtio_video_cmd_hdr,
460 }
461 // Safe because auto-generated structs have no implicit padding.
462 unsafe impl DataInit for virtio_video_get_control_resp {}
463 
464 #[repr(C)]
465 #[derive(Debug, Default, Copy, Clone)]
466 pub struct virtio_video_set_control {
467     pub control: Le32,
468     pub padding: [u8; 4usize],
469 }
470 // Safe because auto-generated structs have no implicit padding.
471 unsafe impl DataInit for virtio_video_set_control {}
472 
473 #[repr(C)]
474 #[derive(Debug, Default, Copy, Clone)]
475 pub struct virtio_video_set_control_resp {
476     pub hdr: virtio_video_cmd_hdr,
477 }
478 // Safe because auto-generated structs have no implicit padding.
479 unsafe impl DataInit for virtio_video_set_control_resp {}
480 
481 pub const VIRTIO_VIDEO_EVENT_ERROR: virtio_video_event_type = 256;
482 pub const VIRTIO_VIDEO_EVENT_DECODER_RESOLUTION_CHANGED: virtio_video_event_type = 512;
483 pub type virtio_video_event_type = u32;
484 #[repr(C)]
485 #[derive(Debug, Default, Copy, Clone)]
486 pub struct virtio_video_event {
487     pub event_type: Le32,
488     pub stream_id: Le32,
489 }
490 // Safe because auto-generated structs have no implicit padding.
491 unsafe impl DataInit for virtio_video_event {}
492