summary refs log tree commit diff
path: root/devices/src/virtio/video/protocol.rs
blob: 0e2106e3f1b7aaf97e8d8ec0444150491a632e81 (plain) (blame)
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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

//! This file was generated by the following commands and modified manually.
//!
//! ```
//! $ bindgen virtio_video.h              \
//!     --whitelist-type "virtio_video.*" \
//!     --whitelist-var "VIRTIO_VIDEO_.*" \
//!     --with-derive-default            \
//!     --no-layout-tests                \
//!     --no-prepend-enum-name > protocol.rs
//! $ sed -i 's/u/u/g' protocol.rs
//! $ sed -i 's/Le/Le/g' protocol.rs
//! ```
//!
//! The main points of the manual modifications are as follows:
//! * Removed `hdr` from each command struct so that we can read the header and a command body separately.
//!   (cf. [related discussion](https://markmail.org/message/tr5g6axqq2zzq64y))
//! * Added implementations of DataInit for each struct.

#![allow(dead_code, non_snake_case, non_camel_case_types)]

use data_model::{DataInit, Le32, Le64};

pub const VIRTIO_VIDEO_F_RESOURCE_GUEST_PAGES: u32 = 0;
pub const VIRTIO_VIDEO_F_RESOURCE_NON_CONTIG: u32 = 1;
pub const VIRTIO_VIDEO_F_RESOURCE_VIRTIO_OBJECT: u32 = 2;
pub const VIRTIO_VIDEO_MAX_PLANES: u32 = 8;
pub const VIRTIO_VIDEO_FORMAT_RAW_MIN: virtio_video_format = 1;
pub const VIRTIO_VIDEO_FORMAT_ARGB8888: virtio_video_format = 1;
pub const VIRTIO_VIDEO_FORMAT_BGRA8888: virtio_video_format = 2;
pub const VIRTIO_VIDEO_FORMAT_NV12: virtio_video_format = 3;
pub const VIRTIO_VIDEO_FORMAT_YUV420: virtio_video_format = 4;
pub const VIRTIO_VIDEO_FORMAT_YVU420: virtio_video_format = 5;
pub const VIRTIO_VIDEO_FORMAT_RAW_MAX: virtio_video_format = 5;
pub const VIRTIO_VIDEO_FORMAT_CODED_MIN: virtio_video_format = 4096;
pub const VIRTIO_VIDEO_FORMAT_MPEG2: virtio_video_format = 4096;
pub const VIRTIO_VIDEO_FORMAT_MPEG4: virtio_video_format = 4097;
pub const VIRTIO_VIDEO_FORMAT_H264: virtio_video_format = 4098;
pub const VIRTIO_VIDEO_FORMAT_HEVC: virtio_video_format = 4099;
pub const VIRTIO_VIDEO_FORMAT_VP8: virtio_video_format = 4100;
pub const VIRTIO_VIDEO_FORMAT_VP9: virtio_video_format = 4101;
pub const VIRTIO_VIDEO_FORMAT_CODED_MAX: virtio_video_format = 4101;
pub type virtio_video_format = u32;
pub const VIRTIO_VIDEO_PROFILE_H264_MIN: virtio_video_profile = 256;
pub const VIRTIO_VIDEO_PROFILE_H264_BASELINE: virtio_video_profile = 256;
pub const VIRTIO_VIDEO_PROFILE_H264_MAIN: virtio_video_profile = 257;
pub const VIRTIO_VIDEO_PROFILE_H264_EXTENDED: virtio_video_profile = 258;
pub const VIRTIO_VIDEO_PROFILE_H264_HIGH: virtio_video_profile = 259;
pub const VIRTIO_VIDEO_PROFILE_H264_HIGH10PROFILE: virtio_video_profile = 260;
pub const VIRTIO_VIDEO_PROFILE_H264_HIGH422PROFILE: virtio_video_profile = 261;
pub const VIRTIO_VIDEO_PROFILE_H264_HIGH444PREDICTIVEPROFILE: virtio_video_profile = 262;
pub const VIRTIO_VIDEO_PROFILE_H264_SCALABLEBASELINE: virtio_video_profile = 263;
pub const VIRTIO_VIDEO_PROFILE_H264_SCALABLEHIGH: virtio_video_profile = 264;
pub const VIRTIO_VIDEO_PROFILE_H264_STEREOHIGH: virtio_video_profile = 265;
pub const VIRTIO_VIDEO_PROFILE_H264_MULTIVIEWHIGH: virtio_video_profile = 266;
pub const VIRTIO_VIDEO_PROFILE_H264_MAX: virtio_video_profile = 266;
pub const VIRTIO_VIDEO_PROFILE_HEVC_MIN: virtio_video_profile = 512;
pub const VIRTIO_VIDEO_PROFILE_HEVC_MAIN: virtio_video_profile = 512;
pub const VIRTIO_VIDEO_PROFILE_HEVC_MAIN10: virtio_video_profile = 513;
pub const VIRTIO_VIDEO_PROFILE_HEVC_MAIN_STILL_PICTURE: virtio_video_profile = 514;
pub const VIRTIO_VIDEO_PROFILE_HEVC_MAX: virtio_video_profile = 514;
pub const VIRTIO_VIDEO_PROFILE_VP8_MIN: virtio_video_profile = 768;
pub const VIRTIO_VIDEO_PROFILE_VP8_PROFILE0: virtio_video_profile = 768;
pub const VIRTIO_VIDEO_PROFILE_VP8_PROFILE1: virtio_video_profile = 769;
pub const VIRTIO_VIDEO_PROFILE_VP8_PROFILE2: virtio_video_profile = 770;
pub const VIRTIO_VIDEO_PROFILE_VP8_PROFILE3: virtio_video_profile = 771;
pub const VIRTIO_VIDEO_PROFILE_VP8_MAX: virtio_video_profile = 771;
pub const VIRTIO_VIDEO_PROFILE_VP9_MIN: virtio_video_profile = 1024;
pub const VIRTIO_VIDEO_PROFILE_VP9_PROFILE0: virtio_video_profile = 1024;
pub const VIRTIO_VIDEO_PROFILE_VP9_PROFILE1: virtio_video_profile = 1025;
pub const VIRTIO_VIDEO_PROFILE_VP9_PROFILE2: virtio_video_profile = 1026;
pub const VIRTIO_VIDEO_PROFILE_VP9_PROFILE3: virtio_video_profile = 1027;
pub const VIRTIO_VIDEO_PROFILE_VP9_MAX: virtio_video_profile = 1027;
pub type virtio_video_profile = u32;
pub const VIRTIO_VIDEO_LEVEL_H264_MIN: virtio_video_level = 256;
pub const VIRTIO_VIDEO_LEVEL_H264_1_0: virtio_video_level = 256;
pub const VIRTIO_VIDEO_LEVEL_H264_1_1: virtio_video_level = 257;
pub const VIRTIO_VIDEO_LEVEL_H264_1_2: virtio_video_level = 258;
pub const VIRTIO_VIDEO_LEVEL_H264_1_3: virtio_video_level = 259;
pub const VIRTIO_VIDEO_LEVEL_H264_2_0: virtio_video_level = 260;
pub const VIRTIO_VIDEO_LEVEL_H264_2_1: virtio_video_level = 261;
pub const VIRTIO_VIDEO_LEVEL_H264_2_2: virtio_video_level = 262;
pub const VIRTIO_VIDEO_LEVEL_H264_3_0: virtio_video_level = 263;
pub const VIRTIO_VIDEO_LEVEL_H264_3_1: virtio_video_level = 264;
pub const VIRTIO_VIDEO_LEVEL_H264_3_2: virtio_video_level = 265;
pub const VIRTIO_VIDEO_LEVEL_H264_4_0: virtio_video_level = 266;
pub const VIRTIO_VIDEO_LEVEL_H264_4_1: virtio_video_level = 267;
pub const VIRTIO_VIDEO_LEVEL_H264_4_2: virtio_video_level = 268;
pub const VIRTIO_VIDEO_LEVEL_H264_5_0: virtio_video_level = 269;
pub const VIRTIO_VIDEO_LEVEL_H264_5_1: virtio_video_level = 270;
pub const VIRTIO_VIDEO_LEVEL_H264_MAX: virtio_video_level = 270;
pub type virtio_video_level = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_config {
    pub version: Le32,
    pub max_caps_length: Le32,
    pub max_resp_length: Le32,
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_config {}

pub const VIRTIO_VIDEO_CMD_QUERY_CAPABILITY: virtio_video_cmd_type = 256;
pub const VIRTIO_VIDEO_CMD_STREAM_CREATE: virtio_video_cmd_type = 257;
pub const VIRTIO_VIDEO_CMD_STREAM_DESTROY: virtio_video_cmd_type = 258;
pub const VIRTIO_VIDEO_CMD_STREAM_DRAIN: virtio_video_cmd_type = 259;
pub const VIRTIO_VIDEO_CMD_RESOURCE_CREATE: virtio_video_cmd_type = 260;
pub const VIRTIO_VIDEO_CMD_RESOURCE_QUEUE: virtio_video_cmd_type = 261;
pub const VIRTIO_VIDEO_CMD_RESOURCE_DESTROY_ALL: virtio_video_cmd_type = 262;
pub const VIRTIO_VIDEO_CMD_QUEUE_CLEAR: virtio_video_cmd_type = 263;
pub const VIRTIO_VIDEO_CMD_GET_PARAMS: virtio_video_cmd_type = 264;
pub const VIRTIO_VIDEO_CMD_SET_PARAMS: virtio_video_cmd_type = 265;
pub const VIRTIO_VIDEO_CMD_QUERY_CONTROL: virtio_video_cmd_type = 266;
pub const VIRTIO_VIDEO_CMD_GET_CONTROL: virtio_video_cmd_type = 267;
pub const VIRTIO_VIDEO_CMD_SET_CONTROL: virtio_video_cmd_type = 268;
pub const VIRTIO_VIDEO_RESP_OK_NODATA: virtio_video_cmd_type = 512;
pub const VIRTIO_VIDEO_RESP_OK_QUERY_CAPABILITY: virtio_video_cmd_type = 513;
pub const VIRTIO_VIDEO_RESP_OK_RESOURCE_QUEUE: virtio_video_cmd_type = 514;
pub const VIRTIO_VIDEO_RESP_OK_GET_PARAMS: virtio_video_cmd_type = 515;
pub const VIRTIO_VIDEO_RESP_OK_QUERY_CONTROL: virtio_video_cmd_type = 516;
pub const VIRTIO_VIDEO_RESP_OK_GET_CONTROL: virtio_video_cmd_type = 517;
pub const VIRTIO_VIDEO_RESP_ERR_INVALID_OPERATION: virtio_video_cmd_type = 768;
pub const VIRTIO_VIDEO_RESP_ERR_OUT_OF_MEMORY: virtio_video_cmd_type = 769;
pub const VIRTIO_VIDEO_RESP_ERR_INVALID_STREAM_ID: virtio_video_cmd_type = 770;
pub const VIRTIO_VIDEO_RESP_ERR_INVALID_RESOURCE_ID: virtio_video_cmd_type = 771;
pub const VIRTIO_VIDEO_RESP_ERR_INVALID_PARAMETER: virtio_video_cmd_type = 772;
pub const VIRTIO_VIDEO_RESP_ERR_UNSUPPORTED_CONTROL: virtio_video_cmd_type = 773;
pub type virtio_video_cmd_type = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_cmd_hdr {
    pub type_: Le32,
    pub stream_id: Le32,
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_cmd_hdr {}

pub const VIRTIO_VIDEO_QUEUE_TYPE_INPUT: virtio_video_queue_type = 256;
pub const VIRTIO_VIDEO_QUEUE_TYPE_OUTPUT: virtio_video_queue_type = 257;
pub type virtio_video_queue_type = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_query_capability {
    pub queue_type: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_query_capability {}

pub const VIRTIO_VIDEO_PLANES_LAYOUT_SINGLE_BUFFER: virtio_video_planes_layout_flag = 1;
pub const VIRTIO_VIDEO_PLANES_LAYOUT_PER_PLANE: virtio_video_planes_layout_flag = 2;
pub type virtio_video_planes_layout_flag = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_format_range {
    pub min: Le32,
    pub max: Le32,
    pub step: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_format_range {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_format_frame {
    pub width: virtio_video_format_range,
    pub height: virtio_video_format_range,
    pub num_rates: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_format_frame {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_format_desc {
    pub mask: Le64,
    pub format: Le32,
    pub planes_layout: Le32,
    pub plane_align: Le32,
    pub num_frames: Le32,
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_format_desc {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_query_capability_resp {
    pub hdr: virtio_video_cmd_hdr,
    pub num_descs: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_query_capability_resp {}

pub const VIRTIO_VIDEO_MEM_TYPE_GUEST_PAGES: virtio_video_mem_type = 0;
pub const VIRTIO_VIDEO_MEM_TYPE_VIRTIO_OBJECT: virtio_video_mem_type = 1;
pub type virtio_video_mem_type = u32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct virtio_video_stream_create {
    pub in_mem_type: Le32,
    pub out_mem_type: Le32,
    pub coded_format: Le32,
    pub padding: [u8; 4usize],
    pub tag: [u8; 64usize],
}
impl Default for virtio_video_stream_create {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_stream_create {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_stream_destroy {}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_stream_destroy {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_stream_drain {}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_stream_drain {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_mem_entry {
    pub addr: Le64,
    pub length: Le32,
    pub padding: [u8; 4usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_object_entry {
    pub uuid: [u8; 16usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_object_entry {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_resource_create {
    pub queue_type: Le32,
    pub resource_id: Le32,
    pub planes_layout: Le32,
    pub num_planes: Le32,
    pub plane_offsets: [Le32; 8usize],
    pub num_entries: [Le32; 8usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_resource_create {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_resource_queue {
    pub queue_type: Le32,
    pub resource_id: Le32,
    pub timestamp: Le64,
    pub num_data_sizes: Le32,
    pub data_sizes: [Le32; 8usize],
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_resource_queue {}

pub const VIRTIO_VIDEO_BUFFER_FLAG_ERR: virtio_video_buffer_flag = 1;
pub const VIRTIO_VIDEO_BUFFER_FLAG_EOS: virtio_video_buffer_flag = 2;
pub const VIRTIO_VIDEO_BUFFER_FLAG_IFRAME: virtio_video_buffer_flag = 4;
pub const VIRTIO_VIDEO_BUFFER_FLAG_PFRAME: virtio_video_buffer_flag = 8;
pub const VIRTIO_VIDEO_BUFFER_FLAG_BFRAME: virtio_video_buffer_flag = 16;
pub type virtio_video_buffer_flag = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_resource_queue_resp {
    pub hdr: virtio_video_cmd_hdr,
    pub timestamp: Le64,
    pub flags: Le32,
    pub size: Le32,
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_resource_queue_resp {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_resource_destroy_all {
    pub queue_type: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_resource_destroy_all {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_queue_clear {
    pub queue_type: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_queue_clear {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_plane_format {
    pub plane_size: Le32,
    pub stride: Le32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_crop {
    pub left: Le32,
    pub top: Le32,
    pub width: Le32,
    pub height: Le32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_params {
    pub queue_type: Le32,
    pub format: Le32,
    pub frame_width: Le32,
    pub frame_height: Le32,
    pub min_buffers: Le32,
    pub max_buffers: Le32,
    pub crop: virtio_video_crop,
    pub frame_rate: Le32,
    pub num_planes: Le32,
    pub plane_formats: [virtio_video_plane_format; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_get_params {
    pub queue_type: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_get_params {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_get_params_resp {
    pub hdr: virtio_video_cmd_hdr,
    pub params: virtio_video_params,
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_get_params_resp {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_set_params {
    pub params: virtio_video_params,
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_set_params {}

pub const VIRTIO_VIDEO_CONTROL_BITRATE: virtio_video_control_type = 1;
pub const VIRTIO_VIDEO_CONTROL_PROFILE: virtio_video_control_type = 2;
pub const VIRTIO_VIDEO_CONTROL_LEVEL: virtio_video_control_type = 3;
pub type virtio_video_control_type = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_query_control_profile {
    pub format: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_query_control_profile {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_query_control_level {
    pub format: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_query_control_level {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_query_control {
    pub control: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_query_control {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_query_control_resp_profile {
    pub num: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_query_control_resp_profile {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_query_control_resp_level {
    pub num: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_query_control_resp_level {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_query_control_resp {
    pub hdr: virtio_video_cmd_hdr,
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_query_control_resp {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_get_control {
    pub control: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_get_control {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_control_val_bitrate {
    pub bitrate: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_control_val_bitrate {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_control_val_profile {
    pub profile: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_control_val_profile {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_control_val_level {
    pub level: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_control_val_level {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_get_control_resp {
    pub hdr: virtio_video_cmd_hdr,
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_get_control_resp {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_set_control {
    pub control: Le32,
    pub padding: [u8; 4usize],
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_set_control {}

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_set_control_resp {
    pub hdr: virtio_video_cmd_hdr,
}
pub const VIRTIO_VIDEO_EVENT_ERROR: virtio_video_event_type = 256;
pub const VIRTIO_VIDEO_EVENT_DECODER_RESOLUTION_CHANGED: virtio_video_event_type = 512;
pub type virtio_video_event_type = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct virtio_video_event {
    pub event_type: Le32,
    pub stream_id: Le32,
}
// Safe because auto-generated structs have no implicit padding.
unsafe impl DataInit for virtio_video_event {}