None
}
+/// Returns FOURCC (used in AVI format) for provided codec name.
+pub fn find_avi_fourcc(codecname: &str) -> Option<[u8; 4]> {
+ for (fourcc, name) in AVI_VIDEO_CODEC_REGISTER.iter() {
+ if *name == codecname { return Some(**fourcc); }
+ }
+ None
+}
+
/// Returns known audio codec short name for provided TWOCC (used in WAV and AVI format).
pub fn find_codec_from_wav_twocc(tcc: u16) -> Option<&'static str> {
for (twocc, name) in WAV_CODEC_REGISTER.iter() {
None
}
+/// Returns TWOCC (used in WAV and AVI format for provided codec name.
+pub fn find_wav_twocc(codecname: &str) -> Option<u16> {
+ for (twocc, name) in WAV_CODEC_REGISTER.iter() {
+ if *name == codecname { return Some(*twocc); }
+ }
+ None
+}
+
/// Returns video codec short name for provided FOURCC (used in MOV format).
pub fn find_codec_from_mov_video_fourcc(fcc: &[u8;4]) -> Option<&'static str> {
for (fourcc, name) in MOV_VIDEO_CODEC_REGISTER.iter() {