Skip to main content

video_toolbox/
base.rs

1use core_foundation::base::OSStatus;
2
3/// Converts an `OSStatus` into a `Result`.
4#[inline]
5pub(crate) fn status_to_result(status: OSStatus) -> Result<(), OSStatus> {
6    if status == 0 {
7        Ok(())
8    } else {
9        Err(status)
10    }
11}
12
13#[repr(C)]
14#[derive(Debug, Copy, Clone)]
15pub struct VTInt32Point {
16    pub x: i32,
17    pub y: i32,
18}
19
20#[repr(C)]
21#[derive(Debug, Copy, Clone)]
22pub struct VTInt32Size {
23    pub width: i32,
24    pub height: i32,
25}