mediapipe-rs/src/bindings.rs

192 lines
5.7 KiB
Rust
Raw Normal View History

2022-03-01 13:04:01 +01:00
/* automatically generated by rust-bindgen 0.59.2 */
#[repr(C)]
#[derive(Debug, Copy, Clone)]
2022-06-07 07:06:03 +02:00
pub struct mediagraph_Landmark {
2022-03-01 13:04:01 +01:00
pub x: f32,
pub y: f32,
pub z: f32,
pub visibility: f32,
pub presence: f32,
}
#[test]
2022-06-07 07:06:03 +02:00
fn bindgen_test_layout_mediagraph_Landmark() {
2022-03-01 13:04:01 +01:00
assert_eq!(
2022-06-07 07:06:03 +02:00
::std::mem::size_of::<mediagraph_Landmark>(),
2022-03-01 13:04:01 +01:00
20usize,
2022-06-07 07:06:03 +02:00
concat!("Size of: ", stringify!(mediagraph_Landmark))
2022-03-01 13:04:01 +01:00
);
assert_eq!(
2022-06-07 07:06:03 +02:00
::std::mem::align_of::<mediagraph_Landmark>(),
2022-03-01 13:04:01 +01:00
4usize,
2022-06-07 07:06:03 +02:00
concat!("Alignment of ", stringify!(mediagraph_Landmark))
2022-03-01 13:04:01 +01:00
);
assert_eq!(
2022-06-07 07:06:03 +02:00
unsafe { &(*(::std::ptr::null::<mediagraph_Landmark>())).x as *const _ as usize },
2022-03-01 13:04:01 +01:00
0usize,
concat!(
"Offset of field: ",
2022-06-07 07:06:03 +02:00
stringify!(mediagraph_Landmark),
2022-03-01 13:04:01 +01:00
"::",
stringify!(x)
)
);
assert_eq!(
2022-06-07 07:06:03 +02:00
unsafe { &(*(::std::ptr::null::<mediagraph_Landmark>())).y as *const _ as usize },
2022-03-01 13:04:01 +01:00
4usize,
concat!(
"Offset of field: ",
2022-06-07 07:06:03 +02:00
stringify!(mediagraph_Landmark),
2022-03-01 13:04:01 +01:00
"::",
stringify!(y)
)
);
assert_eq!(
2022-06-07 07:06:03 +02:00
unsafe { &(*(::std::ptr::null::<mediagraph_Landmark>())).z as *const _ as usize },
2022-03-01 13:04:01 +01:00
8usize,
concat!(
"Offset of field: ",
2022-06-07 07:06:03 +02:00
stringify!(mediagraph_Landmark),
2022-03-01 13:04:01 +01:00
"::",
stringify!(z)
)
);
assert_eq!(
2022-06-07 07:06:03 +02:00
unsafe { &(*(::std::ptr::null::<mediagraph_Landmark>())).visibility as *const _ as usize },
2022-03-01 13:04:01 +01:00
12usize,
concat!(
"Offset of field: ",
2022-06-07 07:06:03 +02:00
stringify!(mediagraph_Landmark),
2022-03-01 13:04:01 +01:00
"::",
stringify!(visibility)
)
);
assert_eq!(
2022-06-07 07:06:03 +02:00
unsafe { &(*(::std::ptr::null::<mediagraph_Landmark>())).presence as *const _ as usize },
2022-03-01 13:04:01 +01:00
16usize,
concat!(
"Offset of field: ",
2022-06-07 07:06:03 +02:00
stringify!(mediagraph_Landmark),
2022-03-01 13:04:01 +01:00
"::",
stringify!(presence)
)
);
}
2022-06-13 07:12:19 +02:00
pub const mediagraph_DetectorType_POSE: mediagraph_DetectorType = 0;
pub const mediagraph_DetectorType_HANDS: mediagraph_DetectorType = 1;
pub const mediagraph_DetectorType_FACE: mediagraph_DetectorType = 2;
pub type mediagraph_DetectorType = ::std::os::raw::c_uint;
2022-03-01 13:04:01 +01:00
#[repr(C)]
2022-06-13 07:12:19 +02:00
pub struct mediagraph_Detector__bindgen_vtable(::std::os::raw::c_void);
2022-03-01 13:04:01 +01:00
#[repr(C)]
#[derive(Debug)]
2022-06-13 07:12:19 +02:00
pub struct mediagraph_Detector {
pub vtable_: *const mediagraph_Detector__bindgen_vtable,
pub m_graph_type: mediagraph_DetectorType,
2022-03-01 13:04:01 +01:00
}
#[test]
2022-06-13 07:12:19 +02:00
fn bindgen_test_layout_mediagraph_Detector() {
2022-03-01 13:04:01 +01:00
assert_eq!(
2022-06-13 07:12:19 +02:00
::std::mem::size_of::<mediagraph_Detector>(),
2022-06-07 08:44:28 +02:00
16usize,
2022-06-13 07:12:19 +02:00
concat!("Size of: ", stringify!(mediagraph_Detector))
2022-03-01 13:04:01 +01:00
);
assert_eq!(
2022-06-13 07:12:19 +02:00
::std::mem::align_of::<mediagraph_Detector>(),
2022-06-07 07:06:03 +02:00
8usize,
2022-06-13 07:12:19 +02:00
concat!("Alignment of ", stringify!(mediagraph_Detector))
2022-03-01 13:04:01 +01:00
);
2022-06-07 08:44:28 +02:00
assert_eq!(
unsafe {
2022-06-13 07:12:19 +02:00
&(*(::std::ptr::null::<mediagraph_Detector>())).m_graph_type as *const _ as usize
2022-06-07 08:44:28 +02:00
},
8usize,
concat!(
"Offset of field: ",
2022-06-13 07:12:19 +02:00
stringify!(mediagraph_Detector),
2022-06-07 08:44:28 +02:00
"::",
stringify!(m_graph_type)
)
);
2022-03-01 13:04:01 +01:00
}
extern "C" {
2022-06-13 07:12:19 +02:00
#[link_name = "\u{1}__ZN10mediagraph8Detector6CreateENS_12DetectorTypeEPKcS3_"]
pub fn mediagraph_Detector_Create(
t: mediagraph_DetectorType,
2022-03-01 13:04:01 +01:00
graph_config: *const ::std::os::raw::c_char,
output_node: *const ::std::os::raw::c_char,
2022-06-13 07:12:19 +02:00
) -> *mut mediagraph_Detector;
2022-03-01 13:04:01 +01:00
}
2022-06-13 07:12:19 +02:00
impl mediagraph_Detector {
2022-03-01 13:04:01 +01:00
#[inline]
2022-06-07 07:06:03 +02:00
pub unsafe fn Create(
2022-06-13 07:12:19 +02:00
t: mediagraph_DetectorType,
2022-03-01 13:04:01 +01:00
graph_config: *const ::std::os::raw::c_char,
output_node: *const ::std::os::raw::c_char,
2022-06-13 07:12:19 +02:00
) -> *mut mediagraph_Detector {
mediagraph_Detector_Create(t, graph_config, output_node)
2022-03-01 13:04:01 +01:00
}
}
extern "C" {
2022-06-13 07:12:19 +02:00
#[link_name = "\u{1}__ZN10mediagraph8DetectorD1Ev"]
pub fn mediagraph_Detector_Detector_destructor(this: *mut mediagraph_Detector);
2022-03-01 13:04:01 +01:00
}
extern "C" {
2022-06-13 07:12:19 +02:00
#[link_name = "\u{1}__ZN10mediagraph8Detector7ProcessEPhii"]
pub fn mediagraph_Detector_Process(
2022-06-07 07:06:03 +02:00
this: *mut ::std::os::raw::c_void,
data: *mut u8,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
) -> *mut mediagraph_Landmark;
2022-03-01 13:04:01 +01:00
}
2022-06-13 07:12:19 +02:00
#[repr(C)]
pub struct mediagraph_Effect__bindgen_vtable(::std::os::raw::c_void);
#[repr(C)]
#[derive(Debug)]
pub struct mediagraph_Effect {
pub vtable_: *const mediagraph_Effect__bindgen_vtable,
}
#[test]
fn bindgen_test_layout_mediagraph_Effect() {
assert_eq!(
::std::mem::size_of::<mediagraph_Effect>(),
8usize,
concat!("Size of: ", stringify!(mediagraph_Effect))
);
assert_eq!(
::std::mem::align_of::<mediagraph_Effect>(),
8usize,
concat!("Alignment of ", stringify!(mediagraph_Effect))
);
}
extern "C" {
#[link_name = "\u{1}__ZN10mediagraph6Effect6CreateEPKcS2_"]
pub fn mediagraph_Effect_Create(
graph_config: *const ::std::os::raw::c_char,
output_node: *const ::std::os::raw::c_char,
) -> *mut mediagraph_Effect;
}
impl mediagraph_Effect {
#[inline]
pub unsafe fn Create(
graph_config: *const ::std::os::raw::c_char,
output_node: *const ::std::os::raw::c_char,
) -> *mut mediagraph_Effect {
mediagraph_Effect_Create(graph_config, output_node)
}
}
extern "C" {
#[link_name = "\u{1}__ZN10mediagraph6EffectD1Ev"]
pub fn mediagraph_Effect_Effect_destructor(this: *mut mediagraph_Effect);
}
extern "C" {
#[link_name = "\u{1}__ZN10mediagraph6Effect7ProcessEPhii"]
pub fn mediagraph_Effect_Process(
this: *mut ::std::os::raw::c_void,
data: *mut u8,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
) -> *mut u8;
}