use crate::ffi;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum Codec {
H264,
HEVC,
ProRes422,
ProRes422HQ,
ProRes422LT,
ProRes422Proxy,
ProRes4444,
}
impl Codec {
#[must_use]
pub const fn as_cm_codec_type(self) -> ffi::CMVideoCodecType {
match self {
Self::H264 => ffi::kCMVideoCodecType_H264,
Self::HEVC => ffi::kCMVideoCodecType_HEVC,
Self::ProRes422 => ffi::kCMVideoCodecType_AppleProRes422,
Self::ProRes422HQ => ffi::kCMVideoCodecType_AppleProRes422HQ,
Self::ProRes422LT => ffi::kCMVideoCodecType_AppleProRes422LT,
Self::ProRes422Proxy => ffi::kCMVideoCodecType_AppleProRes422Proxy,
Self::ProRes4444 => ffi::kCMVideoCodecType_AppleProRes4444,
}
}
}