/* This file is part of jellything (https://codeberg.org/metamuffin/jellything) which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2026 metamuffin */ #[allow(unused)] mod frame_type { pub const KEY_FRAME: u8 = 0; pub const NON_KEY_FRAME: u8 = 0; } pub fn is_keyframe(s: &[u8]) -> Option { let frame_marker = (s[0] >> 6) & 0b11; assert_eq!(frame_marker, 2); let profile_low_bit = (s[0] >> 5) & 0b1; let profile_high_bit = (s[0] >> 4) & 0b1; let profile = (profile_high_bit << 1) | profile_low_bit; if profile == 3 { todo!() } let show_existing_frame = (s[0] >> 3) & 0b1 != 0; if show_existing_frame { todo!() } let frame_type = (s[0] >> 2) & 0b1; Some(frame_type == frame_type::KEY_FRAME) }