Skip to main content

sniff_medium

Function sniff_medium 

Source
pub(crate) fn sniff_medium(head: &[u8], name: &str) -> Option<&'static str>
Expand description

A video’s, a sound’s, a contact card’s or a calendar entry’s content type by the file’s first bytes (head), never by its name: MP4, MOV and 3GP (ISO’s boxes, their brands), WebM, AMR, AAC, MP3, Ogg, WAV, vCard, vCalendar and iCalendar. The name only tells an MP4 of sound from one of video, which share their brands. None for anything else (a PDF named .mp4 included).