stream_processor_test/
buffer_collection_constraints.rs1use {fidl_fuchsia_images2 as fimages2, fidl_fuchsia_sysmem2 as fsysmem2};
6
7pub fn image_format_constraints_default() -> fsysmem2::ImageFormatConstraints {
8 fsysmem2::ImageFormatConstraints {
9 pixel_format: Some(fimages2::PixelFormat::Nv12),
10 ..Default::default()
11 }
12}
13
14pub fn buffer_memory_constraints_default() -> fsysmem2::BufferMemoryConstraints {
15 fsysmem2::BufferMemoryConstraints { ..Default::default() }
16}
17
18pub fn buffer_collection_constraints_default() -> fsysmem2::BufferCollectionConstraints {
19 fsysmem2::BufferCollectionConstraints {
20 usage: Some(fsysmem2::BufferUsage {
21 cpu: Some(fsysmem2::CPU_USAGE_READ),
22 video: Some(fsysmem2::VIDEO_USAGE_HW_DECODER),
23 ..Default::default()
24 }),
25 ..Default::default()
26 }
27}